From f1225b3726a63b3c124636bbc2bdd1225fc2f668 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jan 2014 09:50:54 -0600 Subject: [PATCH] Back quoted NSH arguments now functional --- Documentation/NuttShell.html | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 78b4a84b32..c35cb371da 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -548,6 +548,37 @@ nsh> NSH will accept multiple commands per command line with each command separated with the semi-colon character (;).

+

+ Optional Syntax Extensions + Because these features commit significant resources, it is disabled by default. +

+ + + + + + + + + + + + + + + + + +
@@ -2663,6 +2694,49 @@ nsh> Default: n
CONFIG_NSH_CMDPARMS + If selected, then the output from commands, from file applications, and from NSH built-in commands can be used as arguments to other commands. + The entity to be executed is identified by enclosing the command line in back quotes. + For example, +
    +set FOO `myprogram $BAR
    +
+ will execute the program named myprogram passing it the value of the environment variable BAR. + The value of the environment variable FOO is then set output of myprogram on stdout. Because this feature commits significant resources, it is disabled by default. +
CONFIG_NSH_TMPDIR + If CONFIG_NSH_CMDPARMS is selected, then function output will be retained + in a temporary file. In that case, this string must be provided to + specify the full path to a directory where temporary files can be + created. This would be a good application of RAM disk: To provide + temporary storage for function output. +
CONFIG_NSH_MAXARGUMENTS + The maximum number of NSH command arguments. Default: 6 +
CONFIG_NSH_ARGCAT + Support concatenation of strings with environment variables or command output. + For example: +
    +set FOO XYZ
    +set BAR 123
    +set FOOBAR ABC_${FOO}_${BAR}
    +
+ would set the environment variable FOO to XYZ, BAR to 123 and FOOBAR to ABC_XYZ_123. + If CONFIG_NSH_ARGCAT is not selected, then a slightly small FLASH footprint results but then also only simple environment variables like $FOO can be used on the command line. +
CONFIG_NSH_NESTDEPTH