Deleted Added
full compact
sh.1 (51090) sh.1 (51275)
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Kenneth Almquist.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Kenneth Almquist.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
36.\" $FreeBSD: head/bin/sh/sh.1 51090 1999-09-08 15:40:46Z sheldonh $
36.\" $FreeBSD: head/bin/sh/sh.1 51275 1999-09-14 11:46:04Z sheldonh $
37.\"
38.Dd May 5, 1995
39.Dt SH 1
40.Os BSD 4
41.Sh NAME
42.Nm sh
43.Nd command interpreter (shell)
44.Sh SYNOPSIS

--- 16 unchanged lines hidden (view full) ---

61shell clone (run GNU's bash if you want that). Only features
62designated by POSIX, plus a few Berkeley extensions, are being
63incorporated into this shell.
64This man page is not intended to be a tutorial or a complete
65specification of the shell.
66.Ss Overview
67The shell is a command that reads lines from
68either a file or the terminal, interprets them, and
37.\"
38.Dd May 5, 1995
39.Dt SH 1
40.Os BSD 4
41.Sh NAME
42.Nm sh
43.Nd command interpreter (shell)
44.Sh SYNOPSIS

--- 16 unchanged lines hidden (view full) ---

61shell clone (run GNU's bash if you want that). Only features
62designated by POSIX, plus a few Berkeley extensions, are being
63incorporated into this shell.
64This man page is not intended to be a tutorial or a complete
65specification of the shell.
66.Ss Overview
67The shell is a command that reads lines from
68either a file or the terminal, interprets them, and
69generally executes other commands. It is the program that is running
70when a user logs into the system (although a user can select
71a different shell with the
69generally executes other commands.
70It is the program that is running when a user logs into the system
71(although a user can select a different shell with the
72.Xr chsh 1
73command).
74The shell
75implements a language that has flow control constructs,
76a macro facility that provides a variety of features in
77addition to data storage, along with builtin history and line
78editing capabilities. It incorporates many features to
79aid interactive use and has the advantage that the interpretative

--- 21 unchanged lines hidden (view full) ---

101.Pa .profile
102of a login shell, the shell next reads commands from the file named in
103.Ev ENV .
104Therefore, a user should place commands that are to be executed only
105at login time in the
106.Pa .profile
107file, and commands that are executed for every shell inside the
108.Ev ENV
72.Xr chsh 1
73command).
74The shell
75implements a language that has flow control constructs,
76a macro facility that provides a variety of features in
77addition to data storage, along with builtin history and line
78editing capabilities. It incorporates many features to
79aid interactive use and has the advantage that the interpretative

--- 21 unchanged lines hidden (view full) ---

101.Pa .profile
102of a login shell, the shell next reads commands from the file named in
103.Ev ENV .
104Therefore, a user should place commands that are to be executed only
105at login time in the
106.Pa .profile
107file, and commands that are executed for every shell inside the
108.Ev ENV
109file. To set the
109file.
110To set the
110.Ev ENV
111variable to some file, place the following line in your
112.Pa .profile
113of your home directory
114.sp
115.Dl ENV=$HOME/.shinit; export ENV
116.sp
117substituting for

--- 88 unchanged lines hidden (view full) ---

206.It Fl s Li stdin
207Read commands from standard input (set automatically
208if no file arguments are present). This option has
209no effect when set after the shell has already started
210running (i.e. when set with the
211.Ic set
212command).
213.It Fl T Li asynctraps
111.Ev ENV
112variable to some file, place the following line in your
113.Pa .profile
114of your home directory
115.sp
116.Dl ENV=$HOME/.shinit; export ENV
117.sp
118substituting for

--- 88 unchanged lines hidden (view full) ---

207.It Fl s Li stdin
208Read commands from standard input (set automatically
209if no file arguments are present). This option has
210no effect when set after the shell has already started
211running (i.e. when set with the
212.Ic set
213command).
214.It Fl T Li asynctraps
214When waiting for a child, execute traps immediately. If this option is
215not set, traps are executed after the child exits, as specified in
215When waiting for a child, execute traps immediately.
216If this option is not set,
217traps are executed after the child exits,
218as specified in
216.St -p1003.2
217This nonstandard option is useful for putting guarding shells around
218children that block signals. The surrounding shell may kill the child
219or it may just return control to the tty and leave the child alone,
220like this:
221.Bd -literal -offset indent
222sh -T -c "trap 'exit 1' 2 ; some-blocking-program"
223.Ed

--- 73 unchanged lines hidden (view full) ---

297done elif else esac fi
298for if then until while
299.Ed
300.Ss Aliases
301An alias is a name and corresponding value set using the
302.Ic alias
303builtin command. Whenever a reserved word may occur (see above),
304and after checking for reserved words, the shell
219.St -p1003.2
220This nonstandard option is useful for putting guarding shells around
221children that block signals. The surrounding shell may kill the child
222or it may just return control to the tty and leave the child alone,
223like this:
224.Bd -literal -offset indent
225sh -T -c "trap 'exit 1' 2 ; some-blocking-program"
226.Ed

--- 73 unchanged lines hidden (view full) ---

300done elif else esac fi
301for if then until while
302.Ed
303.Ss Aliases
304An alias is a name and corresponding value set using the
305.Ic alias
306builtin command. Whenever a reserved word may occur (see above),
307and after checking for reserved words, the shell
305checks the word to see if it matches an alias. If it does,
306it replaces it in the input stream with its value. For example,
307if there is an alias called
308checks the word to see if it matches an alias.
309If it does, it replaces it in the input stream with its value.
310For example, if there is an alias called
308.Dq lf
309with the value
310.Dq ls -F ,
311then the input
312.Bd -literal -offset indent
313lf foobar <return>
314.Ed
315.Pp

--- 103 unchanged lines hidden (view full) ---

419each are executed in a different way.
420.Pp
421When a shell function is executed, all of the shell positional
422parameters (except $0, which remains unchanged) are
423set to the arguments of the shell function.
424The variables which are explicitly placed in the environment of
425the command (by placing assignments to them before the
426function name) are made local to the function and are set
311.Dq lf
312with the value
313.Dq ls -F ,
314then the input
315.Bd -literal -offset indent
316lf foobar <return>
317.Ed
318.Pp

--- 103 unchanged lines hidden (view full) ---

422each are executed in a different way.
423.Pp
424When a shell function is executed, all of the shell positional
425parameters (except $0, which remains unchanged) are
426set to the arguments of the shell function.
427The variables which are explicitly placed in the environment of
428the command (by placing assignments to them before the
429function name) are made local to the function and are set
427to the values given. Then the command given in the function
428definition is executed. The positional parameters are
429restored to their original values when the command completes.
430to the values given.
431Then the command given in the function definition is executed.
432The positional parameters are restored to their original values
433when the command completes.
430This all occurs within the current shell.
431.Pp
432Shell builtin commands are executed internally to the shell, without
433spawning a new process.
434.Pp
435Otherwise, if the command name does not match a function
436or builtin command, the command is searched for as a normal
437program in the filesystem (as described in the next section).
438When a normal program is executed, the shell runs the program,
434This all occurs within the current shell.
435.Pp
436Shell builtin commands are executed internally to the shell, without
437spawning a new process.
438.Pp
439Otherwise, if the command name does not match a function
440or builtin command, the command is searched for as a normal
441program in the filesystem (as described in the next section).
442When a normal program is executed, the shell runs the program,
439passing the arguments and the environment to the
440program. If the program is not a normal executable file
443passing the arguments and the environment to the program.
444If the program is not a normal executable file
441(i.e. if it does not begin with the
442.Qq magic number
443whose
444.Tn ASCII
445representation is
446.Qq #! ,
447resulting in an ENOEXEC return value from
448.Fn execve )
445(i.e. if it does not begin with the
446.Qq magic number
447whose
448.Tn ASCII
449representation is
450.Qq #! ,
451resulting in an ENOEXEC return value from
452.Fn execve )
449the shell
450will interpret the program in a subshell. The child shell
451will reinitialize itself in this case, so that the effect will
452be as if a new shell had been invoked to handle the ad-hoc shell
453script, except that the location of hashed commands located in
453the shell will interpret the program in a subshell.
454The child shell will reinitialize itself in this case,
455so that the effect will be
456as if a new shell had been invoked to handle the ad-hoc shell script,
457except that the location of hashed commands located in
454the parent shell will be remembered by the child.
455.Pp
456Note that previous versions of this document
457and the source code itself misleadingly and sporadically
458refer to a shell script without a magic number
459as a
460.Qq shell procedure .
461.Ss Path Search

--- 335 unchanged lines hidden (view full) ---

797This clause describes the various expansions that are
798performed on words. Not all expansions are performed on
799every word, as explained later.
800.Pp
801Tilde expansions, parameter expansions, command substitutions,
802arithmetic expansions, and quote removals that occur within
803a single word expand to a single field. It is only field
804splitting or pathname expansion that can create multiple
458the parent shell will be remembered by the child.
459.Pp
460Note that previous versions of this document
461and the source code itself misleadingly and sporadically
462refer to a shell script without a magic number
463as a
464.Qq shell procedure .
465.Ss Path Search

--- 335 unchanged lines hidden (view full) ---

801This clause describes the various expansions that are
802performed on words. Not all expansions are performed on
803every word, as explained later.
804.Pp
805Tilde expansions, parameter expansions, command substitutions,
806arithmetic expansions, and quote removals that occur within
807a single word expand to a single field. It is only field
808splitting or pathname expansion that can create multiple
805fields from a single word. The single exception to this
806rule is the expansion of the special parameter @ within
807double-quotes, as was described above.
809fields from a single word.
810The single exception to this rule is
811the expansion of the special parameter @ within double-quotes,
812as was described above.
808.Pp
809The order of word expansion is:
810.Bl -enum
811.It
812Tilde Expansion, Parameter Expansion, Command Substitution,
813Arithmetic Expansion (these all occur at the same time).
814.It
815Field Splitting is performed on fields

--- 63 unchanged lines hidden (view full) ---

879parameters or special parameters, can be
880assigned in this way.
881.It Li ${parameter:?[word]}
882Indicate Error if Null or Unset. If
883parameter is unset or null, the expansion of
884word (or a message indicating it is unset if
885word is omitted) is written to standard
886error and the shell exits with a nonzero
813.Pp
814The order of word expansion is:
815.Bl -enum
816.It
817Tilde Expansion, Parameter Expansion, Command Substitution,
818Arithmetic Expansion (these all occur at the same time).
819.It
820Field Splitting is performed on fields

--- 63 unchanged lines hidden (view full) ---

884parameters or special parameters, can be
885assigned in this way.
886.It Li ${parameter:?[word]}
887Indicate Error if Null or Unset. If
888parameter is unset or null, the expansion of
889word (or a message indicating it is unset if
890word is omitted) is written to standard
891error and the shell exits with a nonzero
887exit status. Otherwise, the value of
892exit status.
893Otherwise, the value of
888parameter is substituted. An
889interactive shell need not exit.
890.It Li ${parameter:+word}
891Use Alternate Value. If parameter is unset
892or null, null is substituted;
893otherwise, the expansion of word is
894substituted.
895.Pp

--- 57 unchanged lines hidden (view full) ---

953with the
954standard output of the command, removing sequences of one or more
955<newline>s at the end of the substitution. (Embedded <newline>s before
956the end of the output are not removed; however, during field
957splitting, they may be translated into <space>s, depending on the value
958of IFS and quoting that is in effect.)
959.Ss Arithmetic Expansion
960Arithmetic expansion provides a mechanism for evaluating an arithmetic
894parameter is substituted. An
895interactive shell need not exit.
896.It Li ${parameter:+word}
897Use Alternate Value. If parameter is unset
898or null, null is substituted;
899otherwise, the expansion of word is
900substituted.
901.Pp

--- 57 unchanged lines hidden (view full) ---

959with the
960standard output of the command, removing sequences of one or more
961<newline>s at the end of the substitution. (Embedded <newline>s before
962the end of the output are not removed; however, during field
963splitting, they may be translated into <space>s, depending on the value
964of IFS and quoting that is in effect.)
965.Ss Arithmetic Expansion
966Arithmetic expansion provides a mechanism for evaluating an arithmetic
961expression and substituting its value. The format for arithmetic
962expansion is as follows:
967expression and substituting its value.
968The format for arithmetic expansion is as follows:
963.Bd -literal -offset indent
964$((expression))
965.Ed
966.Pp
967The expression is treated as if it were in double-quotes, except
968that a double-quote inside the expression is not treated specially. The
969shell expands all tokens in the expression for parameter expansion,
970command substitution, and quote removal.

--- 36 unchanged lines hidden (view full) ---

1007When command or variable substitution is performed and the dollar sign
1008or back quotes are not double-quoted, the value of the
1009variable or the output of the command is scanned for these
1010characters and they are turned into meta-characters.
1011.Pp
1012An asterisk
1013.Dq *
1014matches any string of characters. A
969.Bd -literal -offset indent
970$((expression))
971.Ed
972.Pp
973The expression is treated as if it were in double-quotes, except
974that a double-quote inside the expression is not treated specially. The
975shell expands all tokens in the expression for parameter expansion,
976command substitution, and quote removal.

--- 36 unchanged lines hidden (view full) ---

1013When command or variable substitution is performed and the dollar sign
1014or back quotes are not double-quoted, the value of the
1015variable or the output of the command is scanned for these
1016characters and they are turned into meta-characters.
1017.Pp
1018An asterisk
1019.Dq *
1020matches any string of characters. A
1015question mark matches any single character. A left
1016bracket
1021question mark matches any single character.
1022A left bracket
1017.Dq [
1023.Dq [
1018introduces a character class. The end of
1019the character class is indicated by a
1024introduces a character class.
1025The end of the character class is indicated by a
1020.Dq ] ;
1021if the
1022.Dq ]
1023is missing then the
1024.Dq [
1025matches a
1026.Dq [
1026.Dq ] ;
1027if the
1028.Dq ]
1029is missing then the
1030.Dq [
1031matches a
1032.Dq [
1027rather than
1028introducing a character class. A character class matches
1029any of the characters between the square brackets. A
1030range of characters may be specified using a minus sign.
1031The character class may be complemented by making an
1032exclamation point the first character of the character
1033class.
1033rather than introducing a character class.
1034A character class matches any of the characters between the square brackets.
1035A range of characters may be specified using a minus sign.
1036The character class may be complemented
1037by making an exclamation point the first character of the character class.
1034.Pp
1035To include a
1036.Dq ]
1038.Pp
1039To include a
1040.Dq ]
1037in a character class, make it the first
1038character listed (after the
1041in a character class, make it the first character listed
1042(after the
1039.Dq ! ,
1043.Dq ! ,
1040if any). To include a
1041minus sign, make it the first or last character listed.
1044if any).
1045To include a minus sign, make it the first or last character listed.
1042.Ss Builtin Commands
1043This section lists the commands which
1044are builtin because they need to perform some operation
1045that can not be performed by a separate process. In addition to
1046these, builtin versions of the
1047.Xr printf 1
1048and
1049.Xr echo 1

--- 35 unchanged lines hidden (view full) ---

1085.It cd [ directory ]
1086Switch to the specified directory (default $HOME).
1087If an entry for CDPATH appears in the environment
1088of the cd command or the shell variable CDPATH is set
1089and the directory name does not begin with a slash (/),
1090dot (.) or dot-dot (..),
1091then the directories listed in CDPATH will be
1092searched for the specified directory. The format of
1046.Ss Builtin Commands
1047This section lists the commands which
1048are builtin because they need to perform some operation
1049that can not be performed by a separate process. In addition to
1050these, builtin versions of the
1051.Xr printf 1
1052and
1053.Xr echo 1

--- 35 unchanged lines hidden (view full) ---

1089.It cd [ directory ]
1090Switch to the specified directory (default $HOME).
1091If an entry for CDPATH appears in the environment
1092of the cd command or the shell variable CDPATH is set
1093and the directory name does not begin with a slash (/),
1094dot (.) or dot-dot (..),
1095then the directories listed in CDPATH will be
1096searched for the specified directory. The format of
1093CDPATH is the same as that of PATH. In an interactive shell,
1094the cd command will print out the name of
1095the directory that it actually switched to if this is
1096different from the name that the user gave. These
1097may be different either because the CDPATH mechanism
1097CDPATH is the same as that of PATH.
1098In an interactive shell,
1099the cd command will print out the name of the directory
1100that it actually switched to
1101if this is different from the name that the user gave.
1102These may be different either because the CDPATH mechanism
1098was used or because a symbolic link was crossed.
1099.It eval string ...
1103was used or because a symbolic link was crossed.
1104.It eval string ...
1100Concatenate all the arguments with spaces. Then
1101re-parse and execute the
1102command.
1105Concatenate all the arguments with spaces.
1106Then re-parse and execute the command.
1103.It exec [ command arg ... ]
1104Unless command is omitted, the shell process is
1105replaced with the specified program (which must be a
1106real program, not a shell builtin command or function). Any
1107redirections on the exec command are marked as permanent,
1108so that they are not undone when the exec command finishes.
1109.It exit [ exitstatus ]
1110Terminate the shell process. If exitstatus is given

--- 173 unchanged lines hidden (view full) ---

1284as the first argument
1285to set. If no args are present, the set command
1286will clear all the positional parameters (equivalent
1287to executing
1288.Dq shift $# .
1289.El
1290.Pp
1291.It setvar variable value
1107.It exec [ command arg ... ]
1108Unless command is omitted, the shell process is
1109replaced with the specified program (which must be a
1110real program, not a shell builtin command or function). Any
1111redirections on the exec command are marked as permanent,
1112so that they are not undone when the exec command finishes.
1113.It exit [ exitstatus ]
1114Terminate the shell process. If exitstatus is given

--- 173 unchanged lines hidden (view full) ---

1288as the first argument
1289to set. If no args are present, the set command
1290will clear all the positional parameters (equivalent
1291to executing
1292.Dq shift $# .
1293.El
1294.Pp
1295.It setvar variable value
1292Assigns value to variable. (In general it is better
1293to write variable=value rather than using setvar.
1296Assigns value to variable.
1297In general it is better to write variable=value rather than using setvar.
1294Setvar is intended to be used in functions that
1298Setvar is intended to be used in functions that
1295assign values to variables whose names are passed as
1296parameters.)
1299assign values to variables whose names are passed as parameters.
1297.It shift [ n ]
1298Shift the positional parameters n times. A shift
1299sets the value of $1 to the value of $2, the value of
1300$2 to the value of $3, and so on, decreasing the
1301value of $# by one. If there are zero positional
1302parameters, shifting does not do anything.
1303.It trap [ action ] signal ...
1304Cause the shell to parse and execute action when any
1305of the specified signals are received. The signals
1306are specified by signal number. Action may be null
1307or omitted; the former causes the specified signal to
1308be ignored and the latter causes the default action
1309to be taken. When the shell forks off a subshell, it
1310resets trapped (but not ignored) signals to the
1311default action. The trap command has no effect on
1312signals that were ignored on entry to the shell.
1313.It type [name] ...
1314Interpret each name as a command and print the
1300.It shift [ n ]
1301Shift the positional parameters n times. A shift
1302sets the value of $1 to the value of $2, the value of
1303$2 to the value of $3, and so on, decreasing the
1304value of $# by one. If there are zero positional
1305parameters, shifting does not do anything.
1306.It trap [ action ] signal ...
1307Cause the shell to parse and execute action when any
1308of the specified signals are received. The signals
1309are specified by signal number. Action may be null
1310or omitted; the former causes the specified signal to
1311be ignored and the latter causes the default action
1312to be taken. When the shell forks off a subshell, it
1313resets trapped (but not ignored) signals to the
1314default action. The trap command has no effect on
1315signals that were ignored on entry to the shell.
1316.It type [name] ...
1317Interpret each name as a command and print the
1315resolution of the command search. Possible resolutions are:
1318resolution of the command search.
1319Possible resolutions are:
1316shell keyword, alias, shell builtin command, command, tracked alias
1317and not found. For aliases the alias expansion is printed;
1318for commands and tracked aliases the complete pathname of
1319the command is printed.
1320.It ulimit [ -HSacdflmnust ] [ limit ]
1321Set or display resource limits (see
1322.Xr getrlimit 2 ).
1323If

--- 45 unchanged lines hidden (view full) ---

1369The maximal amount of CPU time to be used by each process, in seconds.
1370.It -u userproc
1371The maximal number of simultaneous processes for this user ID.
1372.El
1373.It umask [ mask ]
1374Set the value of umask (see
1375.Xr umask 2 )
1376to the specified
1320shell keyword, alias, shell builtin command, command, tracked alias
1321and not found. For aliases the alias expansion is printed;
1322for commands and tracked aliases the complete pathname of
1323the command is printed.
1324.It ulimit [ -HSacdflmnust ] [ limit ]
1325Set or display resource limits (see
1326.Xr getrlimit 2 ).
1327If

--- 45 unchanged lines hidden (view full) ---

1373The maximal amount of CPU time to be used by each process, in seconds.
1374.It -u userproc
1375The maximal number of simultaneous processes for this user ID.
1376.El
1377.It umask [ mask ]
1378Set the value of umask (see
1379.Xr umask 2 )
1380to the specified
1377octal value. If the argument is omitted, the
1378umask value is printed.
1381octal value.
1382If the argument is omitted, the umask value is printed.
1379.It unalias [-a] [name]
1380If
1381.Dq name
1382is specified, the shell removes that alias.
1383If
1384.Dq -a
1385is specified, all aliases are removed.
1386.It unset name ...
1387The specified variables and functions are unset and
1383.It unalias [-a] [name]
1384If
1385.Dq name
1386is specified, the shell removes that alias.
1387If
1388.Dq -a
1389is specified, all aliases are removed.
1390.It unset name ...
1391The specified variables and functions are unset and
1388unexported. If a given name corresponds to both a
1389variable and a function, both the variable and the
1390function are unset.
1392unexported.
1393If a given name corresponds to both a variable and a function,
1394both the variable and the function are unset.
1391.It wait [ job ]
1392Wait for the specified job to complete and return the
1395.It wait [ job ]
1396Wait for the specified job to complete and return the
1393exit status of the last process in the job. If the
1394argument is omitted, wait for all jobs to complete
1395and the return an exit status of zero.
1397exit status of the last process in the job.
1398If the argument is omitted, wait for all jobs to complete
1399and return an exit status of zero.
1396.El
1397.Ss Commandline Editing
1398When
1399.Nm
1400is being used interactively from a terminal, the current command
1401and the command history (see fc in
1402.Sx Builtin Commands )
1403can be edited using vi-mode

--- 23 unchanged lines hidden ---
1400.El
1401.Ss Commandline Editing
1402When
1403.Nm
1404is being used interactively from a terminal, the current command
1405and the command history (see fc in
1406.Sx Builtin Commands )
1407can be edited using vi-mode

--- 23 unchanged lines hidden ---