prompt display when cd to dir symoblic link

Harald Becker ralda at gmx.de
Thu Apr 2 08:34:22 UTC 2015


On 02.04.2015 10:17, Ron Yorston wrote:
> Harald Becker wrote:
>> ... but I can't find the location in BB ash.c, where this \w is replaced
>> with the directory name :( ... (any hint?)
>
> libbb/lineedit.c

Thanks, I stumbled on this at the same moment your message came in ... 
and the separation into a different file is the problem:

As the code for this prompt display has got moved into libbb, it has no 
more access to the value of ash's curdir variable ... using getcwd to 
get the value to display. Originally this used the same logic for \w 
(and \W) as the pwd command, accessing the variables curdir or physdir 
(depending on shell flag).

I don't know how to fix this.

IMO this is a bug, as most users expect \w and \W to honor the shell 
flag settings and display either physical or logical directory. That was 
the original concern.

--
Harald


More information about the busybox mailing list