Re: PWD not made canonical on shell start

2017-05-30 Thread Chet Ramey
On 5/29/17 6:48 PM, dualbus wrote: > On Mon, May 29, 2017 at 06:25:06PM -0400, Chet Ramey wrote: > [...] >> If PWD appears in the environment, and it is an absolute pathname of the >> CWD, set PWD to the canonicalized version of the environment value. The >> canonicalized version removes . and ..,

Re: PWD not made canonical on shell start

2017-05-29 Thread dualbus
On Mon, May 29, 2017 at 06:25:06PM -0400, Chet Ramey wrote: [...] > If PWD appears in the environment, and it is an absolute pathname of the > CWD, set PWD to the canonicalized version of the environment value. The > canonicalized version removes . and .., makes sure that the length is > less than

Re: PWD not made canonical on shell start

2017-05-29 Thread Chet Ramey
On 5/29/17 12:22 PM, dualbus wrote: > Bash doesn't really do that. What bash does is: This isn't quite an accurate representation of the bash behavior. > > case 1) > > If PWD is passed through the environment, > and the value is an absolute pathname of the CWD, > then set PWD to the

Re: PWD not made canonical on shell start

2017-05-29 Thread dualbus
On Wed, May 24, 2017 at 11:53:45AM -0400, Chet Ramey wrote: [...] > It was changed back in 2015 as the result of > > http://lists.gnu.org/archive/html/bug-bash/2015-09/msg00053.html After reading POSIX's [1] (section 2.5.3 "Shell Variables"), I noticed that bash may not be following the specifica

Re: PWD not made canonical on shell start

2017-05-24 Thread Chet Ramey
On 5/23/17 9:51 AM, idal...@idallen-fibe.dyndns.org wrote: > Bash Version: 4.3 > Patch Level: 48 > Release Status: release > > Description: > In both BASH and DASH the shell variable $PWD is not always set > by the shell on start-up to be the actual absolute path to the > curren

Re: PWD not made canonical on shell start

2017-05-23 Thread Eduardo Bustamante
On Tue, May 23, 2017 at 8:51 AM, wrote: [...] > Bash Version: 4.3 > Patch Level: 48 > Release Status: release I can reproduce with 4.4.11(1)-release and the latest devel branch [...] > As implemented, I now have to start every shell script that > uses $PWD before using "cd" with