diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/command.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/command.c b/common/command.c index e192bb2a61..db25bf54e0 100644 --- a/common/command.c +++ b/common/command.c @@ -356,8 +356,13 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp) int i, j, k, len, seplen, argc; int cnt; char last_char; +#ifdef CONFIG_CMDLINE_PS_SUPPORT + const char *ps_prompt = env_get("PS1"); +#else + const char *ps_prompt = CONFIG_SYS_PROMPT; +#endif - if (strcmp(prompt, CONFIG_SYS_PROMPT) != 0) + if (strcmp(prompt, ps_prompt) != 0) return 0; /* not in normal console */ cnt = strlen(buf); |