diff options
author | Mike Frysinger | 2006-06-06 06:26:12 +0000 |
---|---|---|
committer | Mike Frysinger | 2006-06-06 06:26:12 +0000 |
commit | 2a13175440420169e575c433de6c35e1399290e9 (patch) | |
tree | 38887ee4813345e26f857382b4345a664b01542f /shell/msh.c | |
parent | 75c6b7962d009114b51a979be86766512589027c (diff) | |
download | busybox-2a13175440420169e575c433de6c35e1399290e9.zip busybox-2a13175440420169e575c433de6c35e1399290e9.tar.gz |
make the default prompt suck less when using fancy prompts
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/msh.c b/shell/msh.c index 8bc769b..62e6b6e 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -93,6 +93,15 @@ int mshdbg_rc = 0; #endif /* MSHDEBUG */ +#ifdef CONFIG_FEATURE_SH_FANCY_PROMPT +# define DEFAULT_ROOT_PROMPT "\\u:\\w> " +# define DEFAULT_USER_PROMPT "\\u:\\w$ " +#else +# define DEFAULT_ROOT_PROMPT "# " +# define DEFAULT_USER_PROMPT "$ " +#endif + + /* -------- sh.h -------- */ /* * shell @@ -877,9 +886,9 @@ int msh_main(int argc, char **argv) #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT if (prompt->value == null) #endif - setval(prompt, "$ "); + setval(prompt, DEFAULT_USER_PROMPT); if (geteuid() == 0) { - setval(prompt, "# "); + setval(prompt, DEFAULT_ROOT_PROMPT); prompt->status &= ~EXPORT; } cprompt = lookup("PS2"); |