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
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to