bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pwd doesn't support -L or -P


From: Eric Blake
Subject: Re: pwd doesn't support -L or -P
Date: Wed, 22 Oct 2008 06:15:00 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Reuben Thomas on 10/22/2008 6:08 AM:
> These two switches are necessary for POSIX compatibility. I note that
> bash's pwd does support them; is the intention that bash's built-in pwd,
> which does, should fill this gap in a GNU system?

It simply means that no one has ever written the patch to supply them.
Would you care to try?

I tried, several years ago (the mailing list archives documents my initial
attempt), but I abandoned the effort at that time when I realized that we
couldn't necessarily rely on $PWD to be accurate, and that the gnulib path
canonicalization routines didn't have a handy way to remove ./ and ../
elements from a bogus $PWD.

But yes, you generally use the shell's builtin pwd anyway, so it's nice
that bash already supplies these options.  As for the fact that POSIX
requires pwd to default to -L, but coreutils defaults to -P, I'm not sure
whether we would be breaking the large number of scripts that have come to
rely on /bin/pwd supplying -P semantics.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj/GUQACgkQ84KuGfSFAYAF7QCeM7YJZMPVxFVFQUKF2Fe0MUdb
/CEAoMGh4/wMx7Cz+Rumjx8vuWj9PDjO
=X5rW
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]