Ron Yorston 298ac9507b lineedit: get PWD from ash
The line editing code and ash disagree when the current directory
is changed to a symbolic link:

   ~ $ mkdir real
   ~ $ ln -s real link
   ~ $ cd link
   ~/real $ pwd
   /home/rmyf36/link

Note the prompt says we're in ~/real.  Bash does:

   [rmy@random ~]$ cd link
   [rmy@random link]$ pwd
   /home/rmyf36/link

Ash uses the name supplied by the user while the line editing code
calls getcwd(3).  The discrepancy can be avoided by fetching the
value of PWD from ash.

Hush calls getcwd(3) when the directory is changed
so there's no disagreement with the line editing code.

There is no standard how shells should handle cd'ing into
symlinks.

function                                             old     new   delta
parse_and_put_prompt                                 838     869     +31

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-07-03 21:41:38 +02:00
..
2022-05-01 17:06:00 +02:00
2021-06-22 15:28:34 +02:00
2020-12-14 18:25:28 +01:00
2020-12-17 11:22:44 +01:00
2013-02-26 00:36:53 +01:00
2021-02-03 20:43:07 +01:00
2012-10-03 09:42:21 +02:00
2022-02-11 23:03:27 +01:00
2022-02-11 23:03:27 +01:00
2020-10-01 03:07:22 +02:00
2022-07-03 21:41:38 +02:00
2021-02-03 20:52:40 +01:00
2018-07-17 15:04:17 +02:00
2021-09-17 00:47:23 +02:00
2022-01-18 00:36:42 +01:00
2010-07-26 01:49:12 +02:00
2020-12-17 20:53:43 +01:00
2010-10-29 11:46:52 +02:00
2015-04-02 23:03:46 +02:00

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>