From 3e89d5bb9b34861c17cd23f5efd8323eec4f0bab Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 30 Jun 2014 10:15:26 +0100 Subject: 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. --- src/pwd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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]); -- cgit v1.2.3-54-g00ecf