Subject: bin/36533: minor doc fixes for sh(1)
To: None <firstname.lastname@example.org, email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 06/23/2007 19:05:00
>Synopsis: minor doc fixes for sh(1)
>Arrival-Date: Sat Jun 23 19:05:00 +0000 2007
>Originator: Greg A. Woods
>Release: netbsd-4 2007/06/22
Planix, Inc.; Toronto, Ontario; Canada
some minor doc fixes for sh(1)
mostly formatting and grammar, plus a minor semantic fix
RCS file: /cvs/master/m-NetBSD/main/src/bin/sh/sh.1,v
retrieving revision 126.96.36.199
diff -u -r188.8.131.52 sh.1
--- bin/sh/sh.1 16 Apr 2007 19:33:51 -0000 184.108.40.206
+++ bin/sh/sh.1 17 Apr 2007 22:00:52 -0000
@@ -672,6 +672,9 @@
and nothing else.
This is not the way it works in C.
+Also, if you forget the left-hand side (for example when continuing lines but
+forgetting to use a backslash) it defaults to a true statement.
+This behavior is not useful and should not be relied upon.
.Ss Flow-Control Constructs -- if, while, for, case
The syntax of the if command is
.Bd -literal -offset indent
@@ -775,7 +778,8 @@
.Dl local [ variable | - ] ...
-Local is implemented as a built-in command.
+is implemented as a built-in command.
When a variable is made local, it inherits the initial value and exported
and read-only flags from the variable with the same name in the surrounding
@@ -1163,7 +1167,7 @@
need to perform some operation that can't be performed by a separate
In addition to these, there are several other commands that may
-be built-in for efficiency (e.g.
+be built in for efficiency (e.g.
.Xr printf 1 ,
.Xr echo 1 ,
.Xr test 1 ,
@@ -1213,7 +1217,9 @@
Do not execute the command but
search for the command and print the resolution of the
-This is the same as the type built-in.
+This is the same as the
.It Fl v
Do not execute the command but
search for the command and print the absolute pathname
@@ -1822,25 +1828,37 @@
enables emacs-mode editing.
.Ql set -o vi
-enables vi-mode editing and places sh into vi insert mode.
+enables vi-mode editing and places the current shell process into
.Sx Argument List Processing
-The vi mode uses commands similar to a subset of those described in the
+mode uses commands similar to a subset of those described in the
.Xr vi 1
-enabled, sh can be switched between insert mode and command mode.
-It's similar to vi: typing
+can be switched between insert mode and command mode.
+It's similar to
+.Xr vi 1 :
-will throw you into command VI command mode.
+key will throw you into command VI command mode.
-while in command mode will pass the line to the shell.
+key while in command mode will pass the line to the shell.
-The emacs mode uses commands similar to a subset available in
-the emacs editor.
+mode uses commands similar to a subset available in
+.Xr emacs 1
With emacs-mode enabled, special keys can be used to modify the text
in the buffer using the control key.
@@ -1865,13 +1883,16 @@
from the user's login directory in the password file
.Pq Xr passwd 5 .
This environment variable also functions as the default argument for the
.It Ev PATH
The default search path for executables.
See the above section
.Sx Path Search .
.It Ev CDPATH
-The search path used with the cd built-in.
+The search path used with the
.It Ev LANG
The string used to specify localization information that allows users
to work with different culture-specific and language conventions.