diff options
author | Tim Riker <tim@rikers.org> | 2002-04-13 09:37:10 +0400 |
---|---|---|
committer | Tim Riker <tim@rikers.org> | 2002-04-13 09:37:10 +0400 |
commit | 497a88506e796d20ea07f1a6acad7fe3c48c4690 (patch) | |
tree | e62d8959a11d25c8d8d71689500a41f8ea0a787a | |
parent | 85208e2ab94ddd60cc97dd7ae4a3b2a588281398 (diff) |
make ash prompt the same as other shells if cmdedit and fancyprompt
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index a4c415643..c77bfec4f 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -1213,9 +1213,10 @@ static const struct varinit varinit[] = { NULL }, { &vpath, VSTRFIXED|VTEXTFIXED, defpathvar, changepath }, - /* - * vps1 depends on uid - */ +#if defined(CONFIG_FEATURE_COMMAND_EDITING) && defined(CONFIG_FEATURE_SH_FANCY_PROMPT) + { &vps1, VSTRFIXED|VTEXTFIXED, "PS1=\\w \\$ ", + NULL }, +#endif /* else vps1 depends on uid */ { &vps2, VSTRFIXED|VTEXTFIXED, "PS2=> ", NULL }, { &voptind, VSTRFIXED|VTEXTFIXED, "OPTIND=1", @@ -11896,6 +11897,7 @@ initvar() { vp->func = ip->func; } } +#if !defined(CONFIG_FEATURE_COMMAND_EDITING) || !defined(CONFIG_FEATURE_SH_FANCY_PROMPT) /* * PS1 depends on uid */ @@ -11906,6 +11908,7 @@ initvar() { vps1.text = xstrdup(geteuid() ? "PS1=$ " : "PS1=# "); vps1.flags = VSTRFIXED|VTEXTFIXED; } +#endif } /* @@ -12430,7 +12433,7 @@ findvar(struct var **vpp, const char *name) /* * Copyright (c) 1999 Herbert Xu <herbert@debian.org> * This file contains code for the times builtin. - * $Id: ash.c,v 1.46 2002/01/09 15:37:36 andersen Exp $ + * $Id: ash.c,v 1.47 2002/04/13 05:37:10 timr Exp $ */ static int timescmd (int argc, char **argv) { |