[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #24949] coreutils pwd not implementing latest POSIX features
From: |
Jim Meyering |
Subject: |
Re: [bug #24949] coreutils pwd not implementing latest POSIX features |
Date: |
Tue, 24 Mar 2009 19:41:01 +0100 |
Eric Blake wrote:
> According to Eric Blake on 3/23/2009 2:53 PM:
>> Follow-up Comment #3, bug #24949 (project coreutils):
>>
>> How about the attached patch?
>
> To make it easier to review, this is my proposed patch to make pwd
> understand -L and -P, per POSIX. I made the choice of having the behavior
> depend on POSIXLY_CORRECT, because I disagree with POSIX' choice of
> mandating the -L option as the default (too many scripts expect /bin/pwd
> to behave differently from pwd).
Good! I agree.
> Subject: [PATCH] pwd: support -L and -P
>
> * src/pwd.c (longopts): New variable.
> (logical_getcwd): New function.
> (main): Use it.
> (usage): Document new options.
> * doc/coreutils.texi (pwd invocation): Likewise.
> * NEWS: Likewise.
> * tests/misc/pwd-option: New file.
> * tests/Makefile.am (TESTS): Add test.
> * THANKS: Update.
...
Thanks for doing that! It looks fine, modulo a couple nits:
- remove this item from TODO
- use SAME_INODE
- use $(...) rather than `...` in the test
...
> + case_GETOPT_HELP_CHAR;
> +
> + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
> +
> + default:
and please make the "case" labels align consistently.
Yeah, this is annoying, but I have a solution.
Details coming soon.