NSH: Add support for basename and dirname commands

This commit is contained in:
Gregory Nutt
2015-11-23 10:21:15 -06:00
parent ea7aab8afa
commit 178c9780a8
6 changed files with 118 additions and 18 deletions

View File

@@ -123,6 +123,10 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#ifndef CONFIG_NSH_DISABLE_BASENAME
{ "basename", cmd_basename, 2, 3, "<path> [<suffix>]" },
#endif
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_LOOPS)
{ "break", cmd_break, 1, 1, NULL },
#endif
@@ -144,6 +148,10 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#ifndef CONFIG_NSH_DISABLE_DIRNAME
{ "dirname", cmd_dirname, 2, 2, "<path>" },
#endif
#ifndef CONFIG_NSH_DISABLE_DATE
{ "date", cmd_date, 1, 3, "[-s \"MMM DD HH:MM:SS YYYY\"]" },
#endif