RFC: Change pwd to assume -L by default

2014-06-29 Thread Pádraig Brady
POSIX says that `pwd` without options should assume -L is specified. pwd is most often invoked as a shell builtin and bash, dash, zsh, ksh all follow POSIX and assume that -L is the default. However coreutils pwd assumes -P is the default, according to this comment in the source: "POSIX requires

Re: RFC: Change pwd to assume -L by default

2014-06-29 Thread Jim Meyering
On Sun, Jun 29, 2014 at 9:42 AM, Pádraig Brady wrote: > POSIX says that `pwd` without options should assume -L is specified. > pwd is most often invoked as a shell builtin and bash, dash, zsh, ksh > all follow POSIX and assume that -L is the default. > However coreutils pwd assumes -P is the defau

Re: RFC: Change pwd to assume -L by default

2014-06-30 Thread Pádraig Brady
On 06/30/2014 03:40 AM, Jim Meyering wrote: > On Sun, Jun 29, 2014 at 9:42 AM, Pádraig Brady wrote: >> POSIX says that `pwd` without options should assume -L is specified. >> pwd is most often invoked as a shell builtin and bash, dash, zsh, ksh >> all follow POSIX and assume that -L is the default

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Bernhard Voelker
On 06/30/2014 11:29 AM, Pádraig Brady wrote: I'll push the attached for the pwd change later. +1 Have a nice day, Berny

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Jim Meyering
On Mon, Jun 30, 2014 at 2:29 AM, Pádraig Brady wrote: > I'll push the attached for the pwd change later. That looks fine. Thanks.

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Jim Meyering
On Tue, Jul 1, 2014 at 8:02 AM, Jim Meyering wrote: > On Mon, Jun 30, 2014 at 2:29 AM, Pádraig Brady wrote: >> I'll push the attached for the pwd change later. > > That looks fine. Thanks. I spoke too soon. Now that I test the patch, I see that the test now fails for me, since $(env pwd) is no

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Pádraig Brady
On 07/01/2014 04:36 PM, Jim Meyering wrote: > On Tue, Jul 1, 2014 at 8:02 AM, Jim Meyering wrote: >> On Mon, Jun 30, 2014 at 2:29 AM, Pádraig Brady wrote: >>> I'll push the attached for the pwd change later. >> >> That looks fine. Thanks. > > I spoke too soon. Now that I test the patch, I see t

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Jim Meyering
On Tue, Jul 1, 2014 at 8:36 AM, Jim Meyering wrote: > On Tue, Jul 1, 2014 at 8:02 AM, Jim Meyering wrote: >> On Mon, Jun 30, 2014 at 2:29 AM, Pádraig Brady wrote: >>> I'll push the attached for the pwd change later. >> >> That looks fine. Thanks. > > I spoke too soon. Now that I test the patch,

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Pádraig Brady
On 07/01/2014 04:55 PM, Jim Meyering wrote: > On Tue, Jul 1, 2014 at 8:36 AM, Jim Meyering wrote: >> On Tue, Jul 1, 2014 at 8:02 AM, Jim Meyering wrote: >>> On Mon, Jun 30, 2014 at 2:29 AM, Pádraig Brady wrote: I'll push the attached for the pwd change later. >>> >>> That looks fine. Thank

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Bob Proulx
Jim Meyering wrote: > Pádraig Brady wrote: > > POSIX says that `pwd` without options should assume -L is specified. Hmm... It does? If so I think that is a bad thing in the standard since it does not standardize existing behavior but requires an incompatible change to it. Existing behavior of /

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Jim Meyering
On Tue, Jul 1, 2014 at 12:02 PM, Bob Proulx wrote: > Jim Meyering wrote: >> Pádraig Brady wrote: >> > POSIX says that `pwd` without options should assume -L is specified. > > Hmm... It does? If so I think that is a bad thing in the standard > since it does not standardize existing behavior but r

Re: RFC: Change pwd to assume -L by default

2014-07-01 Thread Bob Proulx
Jim Meyering wrote: > Do you know of other uses of /bin/pwd that require -P's behavior? About every script at my old employer used to use it in one way or another. Since that is my past employer I no longer have access to take an inventory. But it was quite a popular thing for people to do. As

Re: RFC: Change pwd to assume -L by default

2014-07-02 Thread Pádraig Brady
On 07/02/2014 12:23 AM, Bob Proulx wrote: > It is also the exact opposite of very long standing traditional > behavior. And as Pádraig noted different from some other venerable > systems such as Solaris and I will also note HP-UX too. Is there any > legacy Unix where /bin/pwd returns the logical

Re: RFC: Change pwd to assume -L by default

2014-07-02 Thread Jim Meyering
On Wed, Jul 2, 2014 at 3:39 AM, Pádraig Brady wrote: > On 07/02/2014 12:23 AM, Bob Proulx wrote: >> It is also the exact opposite of very long standing traditional >> behavior. And as Pádraig noted different from some other venerable >> systems such as Solaris and I will also note HP-UX too. Is

Re: RFC: Change pwd to assume -L by default

2014-07-02 Thread Bob Proulx
Jim Meyering wrote: > Pádraig Brady wrote: > > OK you've convinced me. Yay! :-) > > It seems all /bin/pwd default to -P > > while all builtin pwd default to -L I think so too. > > POSIX should probably say something about that. Yes. Because it really should be standardizing on existing behavi

Re: RFC: Change pwd to assume -L by default

2014-07-02 Thread Eric Blake
On 07/02/2014 05:57 PM, Bob Proulx wrote: > Jim Meyering wrote: >> Pádraig Brady wrote: >>> OK you've convinced me. > > Yay! :-) > >>> It seems all /bin/pwd default to -P >>> while all builtin pwd default to -L > > I think so too. > >>> POSIX should probably say something about that. > > Yes.