diff options
| author | Meco Man <[email protected]> | 2022-06-29 23:18:14 -0400 |
|---|---|---|
| committer | guo <[email protected]> | 2022-07-01 11:38:31 +0800 |
| commit | 584d06bd2733f926f64ece56fc76cff4bfbc0ad5 (patch) | |
| tree | 0cd9bb0ec872837d985f385aa9e53bf4908d81c4 /components/finsh | |
| parent | c651f9e6c794c66708655746f31f188b515ff07f (diff) | |
[finsh]修复使用finsh_set_prompt重定向了msh提示符的名称后,路径功能没有的问题
Diffstat (limited to 'components/finsh')
| -rw-r--r-- | components/finsh/shell.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index c06b688ed3..fecb4f4af3 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -101,9 +101,11 @@ const char *finsh_get_prompt(void) if (finsh_prompt_custom) { strncpy(finsh_prompt, finsh_prompt_custom, sizeof(finsh_prompt) - 1); - return finsh_prompt; } - strcpy(finsh_prompt, _MSH_PROMPT); + else + { + strcpy(finsh_prompt, _MSH_PROMPT); + } #if defined(DFS_USING_POSIX) && defined(DFS_USING_WORKDIR) /* get current working directory */ |
