From c07b1db85fdfb0fe250066865972c0be0889208b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 23 Nov 2015 10:17:55 -0600 Subject: [PATCH] Update NSH documentation to include basename and dirname --- Documentation/NuttShell.html | 60 +++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 01e98a9169..d6da3052c4 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@

NuttShell (NSH)

-

Last Updated: July 13, 2015

+

Last Updated: November 23, 2015

@@ -110,6 +110,12 @@ 2.4 Base64 Encode (base64enc) + +
+ + 2.5 Extract Base File/Directory Name (basename) + +
@@ -164,6 +170,12 @@ 2.13 Show volume status (df) + +
+ + 2.14 Extract Path to a File/Directory (dirname) + +
@@ -1083,6 +1095,23 @@ base64enc [-w] [-f] <string or filepath> To be provided.

+ + + + +
+

2.5 Extract Base File/Directory Name (basename)

+
+

Command Syntax:

+ +

+ Synopsis. + Extract the final string from a <path> by removing the preceding path + segments and (optionally) removing any trailing <suffix>. +

+
@@ -1336,6 +1365,23 @@ nsh> If CONFIG_NSH_CMDOPT_DF_H is defined in the NuttX configuration, then the df will also support an option -h which may be used to show the volume information in human readable format.

+ + + + +
+

2.14 Extract Path to a File/Directory (dirname)

+
+

Command Syntax:

+
    +dirname <path>
    +
+

+ Synopsis. + Extract the path string leading up to the full <path> by removing + the final directory or file name. +

+ + + + + + @@ -2765,6 +2816,11 @@ nsh> + + + + + @@ -4359,6 +4415,7 @@ mount -t vfat /dev/ram1 /tmp
  • builtin_proto.h
  • base64dec
  • base64enc
  • +
  • basename
  • cat
  • cd
  • cmp
  • @@ -4432,6 +4489,7 @@ mount -t vfat /dev/ram1 /tmp
  • dd
  • delroute
  • df
  • +
  • dirname
  • do
  • done
  • echo
  • @@ -2720,6 +2766,11 @@ nsh> CONFIG_NETUTILS_CODECS && CONFIG_CODECS_BASE64 CONFIG_NSH_DISABLE_BASE64ENC
    basename CONFIG_NSH_DISABLE_BASENAME
    break !CONFIG_NSH_DISABLESCRIPT && !CONFIG_NSH_DISABLE_LOOPS!CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_READABLE3 CONFIG_NSH_DISABLE_DF
    dirname CONFIG_NSH_DISABLE_DIRNAME
    echo