Re: cd // produces unexpected results

2012-06-23 Thread Bob Proulx
Stefano Lattarini wrote: > A little more info, quoting from the Autoconf manual: And I will respond to the quoted part from the autoconf manual realizing that Stefano isn't saying it but just passing the message along. :-) > POSIX lets implementations treat leading // specially, but requires le

Re: cd // produces unexpected results

2012-06-23 Thread Chet Ramey
On 6/22/12 5:58 PM, Stefano Lattarini wrote: > On 06/22/2012 09:47 PM, Chet Ramey wrote: >>> By accident I keyed in : >>> >>> cd // >>> >>> and noticed that my prompt included both slashes. >> >> Posix says shells have to leave two leading slashes in a pathname alone. >> Three or more can be collap

Re: cd // produces unexpected results

2012-06-22 Thread Stefano Lattarini
On 06/22/2012 09:47 PM, Chet Ramey wrote: >> By accident I keyed in : >> >> cd // >> >> and noticed that my prompt included both slashes. > > Posix says shells have to leave two leading slashes in a pathname alone. > Three or more can be collapsed to one, but two have to stay unchanged. > This has

Re: cd // produces unexpected results

2012-06-22 Thread Chet Ramey
> By accident I keyed in : > > cd // > > and noticed that my prompt included both slashes. Posix says shells have to leave two leading slashes in a pathname alone. Three or more can be collapsed to one, but two have to stay unchanged. This has come up multiple times in the past. Chet -- ``The

cd // produces unexpected results

2012-06-22 Thread Bill Gradwohl
By accident I keyed in : cd // and noticed that my prompt included both slashes. Further testing, I think, reveals a minor issue: root@billlaptop ~# pwd; cd //; echo PWD=$PWD; cd /root; echo OLDPWD=$OLDPWD /root PWD=// OLDPWD=// I don't believe PWD and OLDPWD should contain double slashes as th