Commit Graph

15 Commits

Author SHA1 Message Date
Xiang Xiao
b1b45de3db Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"
This reverts commit ac5632fc50.
2020-04-19 10:15:23 -06:00
Xiang Xiao
650b58d6b2 nshlib: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
d307758c3c nshlib: Rename 'sh' command to 'source' command
since this command change the parent environment variable and
add new '.' command which has the same functionality as 'source'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
9dbdc73df6 nshlib: Reset NSH_NP_SET_OPTIONS_INIT in nsh_initscript
to ensure the reset get executed in all console implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
ac5632fc50 nshlib: Move BOARDIOC_FINALINIT into nsh_initscript
1.Avoid the code duplication
2.Call BOARDIOC_FINALINIT onnce and only once
3.Ensure BOARDIOC_FINALINIT get called in all case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Gregory Nutt
9db029e318 The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0 2019-02-11 13:10:10 -06:00
GregoryN
3bf4b6d245 Merged altconsole into master 2018-12-08 18:53:54 -06:00
David Sidrane
35cf98d4df Print expanded variables if -x 2017-04-05 18:31:47 -06:00
David Sidrane
d03aa9112e Added support for set [{+|-}{e|x|xe|ex}] [<name> <value>]
Set the 'exit on error control' and/or 'print a trace' of commands when parsing scripts in NSH.  The settinngs are in effect from the point of exection, until they are changed again, or in the case of the init script, the settings are returned to the default settings when it exits.

Included child scripts will run with the parents settings and changes made in the child script will effect the parent on return.

Use 'set -e' to enable and 'set +e' to disable (ignore) the exit condition on commands. The default is -e. Errors cause script to exit.

Use 'set -x' to enable and 'set +x' to disable (silence) printing a trace of the script commands as they are ececuted. The default is +x. No printing of a trace of script commands as they are executed.
2017-04-05 18:25:59 -06:00
Gregory Nutt
8cfa1dbd3b The previous commit was reverted. My concern was misplaced: There is a guard boolean to prevent running the init script more than once. This comment just restores some of the good cosmetic changes that were included in the reverted commit. 2016-08-25 14:28:25 -06:00
Gregory Nutt
e9447c6058 Standardize nameing of the pre-processor definitiongs group header 2015-10-02 14:06:11 -06:00
Gregory Nutt
612d8ed14c NSH: Add a break command; if-then-else and looping behavior can not be configured out of the build for small systems that need minimal scripting capability 2014-01-18 09:39:16 -06:00
Gregory Nutt
cfb7c77ed3 NSH: Add support for while-do-done and until-do-done loops 2014-01-17 15:56:32 -06:00
Gregory Nutt
97e1d8b535 Add true and false commands; repartition some logic to better support forthcoming looping 2014-01-17 13:24:44 -06:00
patacongo
978d3212ff Add support for a login script (in addition to the init script); Add logic so that a USB console session can connect and reconnect to the USB serial device
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5582 42af7a65-404d-4744-a932-0658087f49c3
2013-01-29 22:11:04 +00:00