On Fri, 2007-09-21 at 19:51 +0100, Denys Vlasenko wrote:
...
> > > > Currently the default PS1='\w \$ ' will always show a '$' as prompt
> > > > while PS1='\w \\$ ' will show a '#' if effective user is root and '$'
> > > > otherwise.
... 
> > Maybe we should check if ASH_EXPAND_PRMT is enabled before trying to fix
> > the prompt expansion. See attatched patch.
> 
> With this patch I get this:
> 
> $ env - ./busybox ash
> w $ set
> IFS='
> '
> OPTIND='1'
> PATH='/sbin:/usr/sbin:/bin:/usr/bin'
> PPID='12606'
> PS1='\w \$ '
> PS2='> '
> PS4='+ '
> PWD='/usr/local/google/vda/srcdev/bbox/fix/busybox.t5'
> w $

its \w that is not getting expanded. That does not even happen in ash
code. It happens afterwards in libbb/lineedit.c

> 
> Looks like it got worse, not better...
> I am attaching my .config too.

How does it look with your config and without the patch?

> (I edited ash.c in svn. I rediffed your patch, see attached).

thanks!

-nc

> --
> vda

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to