HomeFreeBSD

sh: Use OLDPWD shell variable for 'cd -'.

Description

sh: Use OLDPWD shell variable for 'cd -'.

Per POSIX, 'cd -' should use the OLDPWD shell variable, not internal state.
This variable is normally exported.

Also, if OLDPWD is not set, fail 'cd -' instead of changing to the current
directory.

Details

Provenance
jillesAuthored on
Parents
rS294648: MFhead @ r294647
Branches
Unknown
Tags
Unknown