mirror of
https://github.com/HEYAHONG/nuttx-apps.git
synced 2025-10-20 04:26:00 +08:00
nshlib/[cd|ls|pwd]: add support for local CWD(Current working directory)
This PR will still allow basic shell operations such as cd/ls/pwd to be used even when the environment is disabled. Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
@@ -162,10 +162,8 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
"[<path> [<path> [<path> ...]]]"),
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
# ifndef CONFIG_NSH_DISABLE_CD
|
||||
#ifndef CONFIG_NSH_DISABLE_CD
|
||||
CMD_MAP("cd", cmd_cd, 1, 2, "[<dir-path>|-|~|..]"),
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_CP
|
||||
@@ -485,10 +483,8 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
# ifndef CONFIG_NSH_DISABLE_PWD
|
||||
#ifndef CONFIG_NSH_DISABLE_PWD
|
||||
CMD_MAP("pwd", cmd_pwd, 1, 1, NULL),
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NSH_DISABLE_READLINK) && defined(CONFIG_PSEUDOFS_SOFTLINKS)
|
||||
|
Reference in New Issue
Block a user