Subject: Re: bug#6194: bug: pwd

From: Eric Blake <[email-masked]>
Date: Fri, 14 May 2010 15:08:38 -0600

[please don't top-post on technical lists]

On 05/14/2010 02:47 PM, eran shaham wrote:
> Thanks.
> I suggest you add into
> $man pwd

'man pwd' is auto-generated from '/bin/pwd --help'.  Here's the output I
get when using pwd from coreutils 8.4:

> $ /bin/pwd --help
> Usage: /bin/pwd [OPTION]...
> Print the full filename of the current working directory.
> 
>   -L, --logical   use PWD from environment, even if it contains symlinks
>   -P, --physical  avoid all symlinks
>       --help     display this help and exit
>       --version  output version information and exit
> 
> NOTE: your shell may have its own version of pwd, which usually supersedes
> the version described here.  Please refer to your shell's documentation
> for details about the options it supports.
> 
> Report pwd bugs to [email-masked]
> GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
> General help using GNU software: <http://www.gnu.org/gethelp/>
> For complete documentation, run: info coreutils 'pwd invocation'

Note that we already do mention the possibility of a shell built-in, as
well as cleaner wording on when symlinks are avoided.  The --help output
is terse, and doesn't really mention the effects of POSIXLY_CORRECT, nor
the fact that shells tend to default to -L while coreutils defaults to
-P unless POSIXLY_CORRECT, but there's only so much you can cram in one
screen-full.  But at the time that I implemented /bin/pwd -L for
coreutils 7.2, I took care to also edit 'info pwd' in a similar manner,
where I did go into those extra details.

Most likely, your confusion stems from using an earlier version of
coreutils, prior to 7.2, where the coreutils man page was definitely
more biased towards 'pwd -P' behavior.  But if you still think that
there is anything to tweak in the current upstream documentation, we'd
like to hear about it.

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org