diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-20 07:54:39 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-20 07:54:39 +0000 |
commit | bc86a28ef99dc024f02f390d835d6933650a4dd3 (patch) | |
tree | 51cfa0ace2f194f589309f0b4345f84a9b3034b4 /bin/sh/sh.1 | |
parent | 3eafd11a94317478ed072142843a3507e0844360 (diff) | |
download | FreeBSD-src-bc86a28ef99dc024f02f390d835d6933650a4dd3.zip FreeBSD-src-bc86a28ef99dc024f02f390d835d6933650a4dd3.tar.gz |
Add the SUSv3 -L and -P options to the cd and pwd builtin utilities. `Logical'
handling of .. is now the default.
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r-- | bin/sh/sh.1 | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 54e4465..8518687 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -1317,7 +1317,11 @@ Execute the specified builtin command, .Ar cmd . This is useful when the user wishes to override a shell function with the same name as a builtin command. -.It Ic cd Op Ar directory +.It Xo +.Ic cd +.Op Fl LP +.Op Ar directory +.Xc Switch to the specified .Ar directory , or to the directory specified in the @@ -1351,6 +1355,20 @@ if this is different from the name that the user gave. These may be different either because the .Ev CDPATH mechanism was used or because a symbolic link was crossed. +.Pp +If the +.Fl P +option is specified, +.Dq \&.. +is handled physically and symbolic links are resolved before +.Dq \&.. +components are processed. +If the +.Fl L +option is specified, +.Dq \&.. +is handled logically. +This is the default. .It Ic chdir A synonym for the .Ic cd @@ -1622,7 +1640,10 @@ argument is omitted, use the current job. .It Ic jobs This command lists out all the background processes which are children of the current shell process. -.It Ic pwd +.It Xo +.Ic pwd +.Op Fl LP +.Xc Print the path of the current directory. The builtin command may differ from the program of the same name because the builtin command remembers what the current directory @@ -1632,6 +1653,15 @@ renamed, the builtin version of .Xr pwd 1 will continue to print the old name for the directory. +.Pp +If the +.Fl P +option is specified, symbolic links are resolved. +If the +.Fl L +option is specified, the shell's notion of the current directory +is printed (symbolic links are not resolved). +This is the default. .It Xo .Ic read .Op Fl p Ar prompt |