diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-07-02 11:28:05 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-07-02 19:45:18 +0100 |
commit | 8e2219b09c513e6e0e8f83cca73baa05cd876f12 (patch) | |
tree | a30d9adbd0fc5032b922414318b8e490270fa317 /src | |
parent | 07e40d5de8fe2a8276bd27f32af702e412d10206 (diff) | |
download | coreutils-8e2219b09c513e6e0e8f83cca73baa05cd876f12.tar.xz |
pwd: revert default mode back to -P
Revert commit v8.22-131-g3e89d5b as even though POSIX
states that the default mode should be -L,
common practice for stand-alone pwd implementations
is to default to -P.
* src/pwd.c (usage): Retain mention of the default mode of operation.
Suggested by Bob Proulx
Diffstat (limited to 'src')
-rw-r--r-- | src/pwd.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -65,7 +65,7 @@ Print the full filename of the current working directory.\n\ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\n\ -If no option is specified, -L is assumed.\n\ +If no option is specified, -P is assumed.\n\ "), stdout); printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME); emit_ancillary_info (); @@ -327,8 +327,10 @@ int main (int argc, char **argv) { char *wd; - /* POSIX requires a default of -L. */ - bool logical = true; + /* POSIX requires a default of -L, but most scripts expect -P. + Currently shells default to -L, while stand-alone + pwd implementations default to -P. */ + bool logical = (getenv ("POSIXLY_CORRECT") != NULL); initialize_main (&argc, &argv); set_program_name (argv[0]); |