bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

minor bash man page "cd -" annoyance


From: Jason Quinn
Subject: minor bash man page "cd -" annoyance
Date: Tue, 26 Jul 2011 22:45:22 -0400

In the bash man page's section for "cd" it says

An argument of - is equivalent to $OLDPWD. If a non-empty directory
name from CDPATH is used, or if -
is the first argument, and the directory change is successful, the
absolute pathname of the new working directory
is written to the standard output.

The first sentence is potentially confusing as "cd -" is not 100%
equivalent to "cd $OLDPWD". I would word
the above as

If a non-empty directory name from CDPATH is used, or if - is the
first argument, and the directory change is
successful, the absolute pathname of the new working directory is
written to the standard output. An argument
of - is otherwise equivalent to $OLDPWD.

Jason



reply via email to

[Prev in Thread] Current Thread [Next in Thread]