summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-06-30 10:15:26 +0100
committerPádraig Brady <P@draigBrady.com>2014-06-30 10:27:48 +0100
commit3e89d5bb9b34861c17cd23f5efd8323eec4f0bab (patch)
treeeba49317d57cc4c42db3e3bf2aa96102b37de23c /src
parentacb422bdd1b325285bb46883f02d8fc6402efd14 (diff)
downloadcoreutils-3e89d5bb9b34861c17cd23f5efd8323eec4f0bab.tar.xz
pwd: assume -L mode by default, as per POSIX
* src/pwd.c (main): Adjust default mode to be "logical" and independent of the POSIXLY_CORRECT env var. (usage): Mention the default mode of operation. * doc/coreutils.texi (pwd invocation): Adjust accordingly. * tests/misc/pwd-option.sh: Likewise. * NEWS: Mention the change in behavior.
Diffstat (limited to 'src')
-rw-r--r--src/pwd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pwd.c b/src/pwd.c
index 4993dfb9d..af9ef50a1 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -64,6 +64,9 @@ Print the full filename of the current working directory.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
+ fputs (_("\n\
+If no option is specified, -L is assumed.\n\
+"), stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_ancillary_info ();
}
@@ -324,8 +327,8 @@ int
main (int argc, char **argv)
{
char *wd;
- /* POSIX requires a default of -L, but most scripts expect -P. */
- bool logical = (getenv ("POSIXLY_CORRECT") != NULL);
+ /* POSIX requires a default of -L. */
+ bool logical = true;
initialize_main (&argc, &argv);
set_program_name (argv[0]);