From 3cba14dc9d90ff9d71e3174f1781e9c557d906c3 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 31 Dec 2004 18:22:54 +0000 Subject: [PATCH] - document IFS behavior changes - grammar, punctuation, xref, mdoc tweaks - sort keywords - indent example displays - minimize against diffing between sh.1tbl - document set -o sh - tweak the displays of some editing and builtin commands - rework some operator descriptions From: Jared J. Yanovich These man pages are not derived from UCB and are actually public domain. Verified with aaron@ who did the conversion from man -> mdoc. From: Todd C. Miller - cleanup - ", and" and ", or" lose the comma where superfluous --- ksh.1tbl | 432 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 226 insertions(+), 206 deletions(-) diff --git a/ksh.1tbl b/ksh.1tbl index a78cb16..e7ccfd2 100644 --- a/ksh.1tbl +++ b/ksh.1tbl @@ -1,37 +1,8 @@ -.\" $MirBSD: src/bin/ksh/ksh.1tbl,v 2.7 2004/12/18 19:02:29 tg Exp $ -.\" $OpenBSD: ksh.1tbl,v 1.79 2004/12/04 07:05:13 jaredy Exp $ +.\" $MirBSD: src/bin/ksh/ksh.1tbl,v 2.8 2004/12/31 18:22:54 tg Exp $ +.\" $OpenBSD: ksh.1tbl,v 1.84 2004/12/22 18:58:44 millert Exp $ .\" $OpenBSD: sh.1tbl,v 1.53 2004/12/10 01:56:56 jaredy Exp $ .\" -.\" Copyright (c) 1980, 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2003, 2004 -.\" The MirOS Project (http://mirbsd.de/). All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)ksh.1tbl 8.2 (Berkeley) 8/19/96 +.\" Public Domain. .\" .Dd November 10, 2004 .Dt KSH 1 @@ -140,7 +111,7 @@ An interactive shell has job control enabled (if available), ignores the .Dv SIGQUIT and .Dv SIGTERM -signals, and prints prompts before reading input (see +signals and prints prompts before reading input (see .Ev PS1 and .Ev PS2 @@ -250,7 +221,7 @@ If the .Ev ENV parameter is set when the shell starts (or, in the case of login shells, after any profiles are processed), its value is subjected to parameter, -command, arithmetic, and tilde +command, arithmetic and tilde .Pq Sq \&~ substitution and the resulting file (if any) is read and executed. @@ -269,13 +240,13 @@ The exit status of the shell is 127 if the command file specified on the command line could not be opened, or non-zero if a fatal syntax error occurred during the execution of a script. In the absence of fatal errors, -the exit status is that of the last command executed, or zero, if no +the exit status is that of the last command executed, or zero if no command is executed. .Ss Command syntax -The shells begins parsing its input by breaking it into +The shell begins parsing its input by breaking it into .Em words . Words, which are sequences of characters, are delimited by unquoted whitespace -characters (space, tab, and newline) or meta-characters +characters (space, tab and newline) or meta-characters .Po .Ql < , .Ql > , @@ -352,7 +323,7 @@ the .Ql # up to the nearest newline is ignored; .Ql $ -is used to introduce parameter, command, and arithmetic substitutions (see +is used to introduce parameter, command and arithmetic substitutions (see .Sx Substitution below); .Ql ` @@ -389,7 +360,7 @@ such as .Ic for and .Ic if -statements, grouping constructs, and function definitions. +statements, grouping constructs and function definitions. .Pp A simple-command consists of some combination of parameter assignments (see @@ -515,21 +486,12 @@ These words are only recognized if they are unquoted and if they are used as the first word of a command (i.e., they can't be preceded by parameter assignments or redirections): -.Pp -.\" .TS -.\" center; -.\" lfB lfB lfB lfB lfB . -.\" case else function then ! -.\" do esac if time [[ -.\" done fi in until { -.\" elif for select while } -.\" .TE -.\" -.Ic case , do , done , elif , -.Ic else , esac , fi , for , -.Ic function , if , in , select , -.Ic then , time , until , while , -.Ic \&! , \&[\&[ , \&{ , \&} +.Bd -literal -offset center +case else function then ! +do esac if time [[ +done fi in until { +elif for select while } +.Ed .Pp .Sy Note: Some shells (but not this one) execute control structure commands in a @@ -542,7 +504,7 @@ control structure. .Pp In the following compound command descriptions, command lists (denoted as .Em list ) -that are followed by reserved words must end with a semicolon, a newline, or +that are followed by reserved words must end with a semicolon, a newline or a (syntactically correct) reserved word. For example, .Bd -unfilled -offset indent @@ -600,7 +562,7 @@ are dropped. Note that any unquoted space before and after a pattern is stripped; any space within a pattern must be quoted. Both the word and the -patterns are subject to parameter, command, and arithmetic substitution, as +patterns are subject to parameter, command and arithmetic substitution, as well as tilde substitution. For historical reasons, open and close braces may be used instead of .Ic in @@ -700,7 +662,7 @@ standard input, .Ar name is set to the selected word (or unset if the selection is not valid), .Ev REPLY -is set to what was read (leading/trailing space is stripped), and +is set to what was read (leading/trailing space is stripped) and .Ar list is executed. If a blank line (i.e., zero or more @@ -715,7 +677,7 @@ is .Dv NULL , the prompt is printed and so on. This process continues until an end-of-file -is read, an interrupt is received, or a +is read, an interrupt is received or a .Ic break statement is executed inside the loop. If @@ -842,7 +804,7 @@ operators must always be used (e.g., instead of use .Ic \&[[ Fl n Ar str Ic \&]] ) . .It -Parameter, command, and arithmetic substitutions are performed as expressions +Parameter, command and arithmetic substitutions are performed as expressions are evaluated and lazy expression evaluation is used for the .Ql && and @@ -850,10 +812,10 @@ and operators. This means that in the statement .Pp -.Ic \&[[ -r foo && $(< foo) = b*r ]] +.Dl Ic "[[ -r foo && $(\&&p redirection. @@ -2250,11 +2211,10 @@ However, unlike .Li .-scripts , shell arguments (i.e., positional parameters .Ic $1 , $2 , -etc.) are never visible -inside them. +etc.) are never visible inside them. When the shell is determining the location of a command, functions are searched after special built-in commands, before regular and -non-regular built-ins, and before the +non-regular built-ins and before the .Ev PATH is searched. .Pp @@ -2427,11 +2387,9 @@ In mode, signal names are listed one per line; in .Pf non- Tn POSIX mode, -signal numbers, names, and descriptions are printed in columns. +signal numbers, names and descriptions are printed in columns. In the future, a new option -.Po Fl v -\ perhaps -.Pc +.Pq Fl v No perhaps will be added to distinguish the two behaviours. .It .Ic fg @@ -2531,7 +2489,7 @@ In mode, normal argument expansion is done; in .Pf non- Tn POSIX mode, -field splitting, file globbing, brace expansion, and (normal) tilde expansion +field splitting, file globbing, brace expansion and (normal) tilde expansion are turned off, while assignment tilde expansion is turned on. .It Signal specification. @@ -2541,7 +2499,7 @@ mode, signals can be specified as digits, only if signal numbers match .Tn POSIX values (i.e., HUP=1, INT=2, QUIT=3, ABRT=6, -KILL=9, ALRM=14, and TERM=15); in +KILL=9, ALRM=14 and TERM=15); in .Pf non- Tn POSIX mode, signals can always be digits. .It @@ -2594,10 +2552,45 @@ argument to the .Fl t test may be left out and defaults to 1). .El +.Ss Strict Bourne shell mode +When the +.Ic sh +option is enabled (see the +.Ic set +command), +.Nm +will behave like +.Xr sh 1 +in the following ways: +.Bl -bullet +.It +The parameter +.Ic $_ +is not set to +.Bl -dash +.It +the expanded alias' full program path after entering commands +that are tracked aliases +.It +the last argument on the command line after entering external +commands +.El +.It +File descriptors are left untouched when executing +.Ic exec +with no arguments. +.It +Backslash-escaped special characters are not substituted in +.Ev PS1 . +.It +Sequences of +.Sq Li (( Ns Ar ... Ns Li )) +are not interpreted as arithmetic expressions. +.El .Ss Command execution -After evaluation of command-line arguments, redirections, and parameter +After evaluation of command-line arguments, redirections and parameter assignments, the type of command is determined: a special built-in, a -function, a regular built-in, or the name of a file to execute found using the +function, a regular built-in or the name of a file to execute found using the .Ev PATH parameter. The checks are made in the above order. @@ -2725,7 +2718,7 @@ option sets .Po Ic \&+x \ clears .Pc -the export attribute of an alias, or, if no names are given, lists the aliases +the export attribute of an alias or, if no names are given, lists the aliases with the export attribute (exporting an alias has no effect). .Pp The @@ -2750,15 +2743,60 @@ is assumed. This command is only available on systems which support job control (see .Sx Job control below for more information). -.It Xo -.Ic bind Op Fl m -.Oo Ar key -.Op Ns = Ns Ar editing-command -.Ar ... Oc -.Xc -Set or view the current emacs command editing key bindings/macros (see +.It Ic bind Op Fl l +The current bindings or, if the +.Fl l +flag is given, +the names of the functions to which keys may be bound, are listed. +See .Sx Emacs editing mode -below for a complete description). +for more information. +.It Xo Ic bind Op Fl m +.Ar string Ns = Ns Op Ar substitute +.Ar ... +.Xc +.It Xo Ic bind +.Ar string Ns = Ns Op Ar editing-command +.Ar ... +.Xc +The specified editing command is bound to the given +.Ar string , +which should consist of a control character (which may be written using caret +notation, i.e., ^X), optionally preceded by one of the two prefix characters. +If the +.Fl m +flag is given, the specified input +.Ar string +will afterwards be immediately replaced by the given +.Ar substitute +string, which may contain editing commands. +.Pp +Future input of the +.Ar string +will cause the editing command to be immediately invoked. +Note that although only two prefix characters (usually +.Tn ESC +and ^X) are supported, some +multi-character sequences can be supported. +The following binds the arrow keys on an +.Tn ANSI +terminal or +.Xr xterm 1 +(these are in the default bindings). +Of course some escape sequences won't work out quite this nicely. +.Pp +.Bl -item -compact +.It +.Ic bind '^[['=prefix-2 +.It +.Ic bind '^XA'=up-history +.It +.Ic bind '^XB'=down-history +.It +.Ic bind '^XC'=forward-char +.It +.Ic bind '^XD'=backward-char +.El .It Ic break Op Ar level Exit the .Ar level Ns th @@ -2801,7 +2839,7 @@ is used. If .Ar dir is -.Dq - , +.Ql - , the previous working directory is used (see .Ev OLDPWD parameter). @@ -2845,7 +2883,7 @@ If neither the .Fl v nor .Fl V -options are given, +option is given, .Ar cmd is executed exactly as if .Ic command @@ -2861,8 +2899,7 @@ option is given, a default search path is used instead of the current value of .Ev PATH (the actual value of the default path is system dependent: on .Tn POSIX Ns ish -systems, -it is the value returned by +systems, it is the value returned by .Ic getconf CS_PATH ) . .Pp If the @@ -2959,7 +2996,7 @@ commands defining all exported parameters, including their values, are printed. .It Ic false A command that exits with a non-zero status. .It Xo Ic fc -.Oo Fl e Ar editor No \&| +.Oo Fl e Ar editor \*(Ba .Fl l Op Fl n Oc .Op Fl r .Op Ar first Op Ar last @@ -3079,7 +3116,7 @@ invoked). .Pp Warning: Changing the value of the shell parameter .Ev OPTIND -to a value other than 1, or parsing different sets of arguments without +to a value other than 1 or parsing different sets of arguments without resetting .Ev OPTIND may lead to unexpected results. @@ -3121,7 +3158,7 @@ and the displayed job. .Ar pid | .Ar pgrp No } Ar ... .Xc -Send the specified signal to the specified jobs, process IDs, or process +Send the specified signal to the specified jobs, process IDs or process groups. If no signal is specified, the .Dv TERM @@ -3237,7 +3274,7 @@ using the .Ev IFS parameter (see .Sx Substitution -above), and assigns each field to the specified parameters. +above) and assigns each field to the specified parameters. If there are more parameters than fields, the extra parameters are set to .Dv NULL , or alternatively, if there are more fields than parameters, the last parameter @@ -3323,7 +3360,7 @@ command can be used to set .Pq Ic \&- or clear .Pq Ic \&+ -shell options, set the positional parameters, or set an array parameter. +shell options, set the positional parameters or set an array parameter. Options can be changed using the .Ic \&+ Ns Fl o Ar option syntax, where @@ -3510,8 +3547,13 @@ mode. See .Sx POSIX mode above. +.It Ic sh +Enable strict Bourne shell mode (see +.Sx Strict Bourne shell mode ) . .It Ic vi -Enable vi-like command-line editing (interactive shells only). +Enable +.Xr vi 1 Ns -like +command-line editing (interactive shells only). .It Ic viraw No effect. In the original Korn shell, unless @@ -3815,10 +3857,10 @@ If a .Ar pipeline is given, the times used to execute the pipeline are reported. If no pipeline -is given, then the user and system time used by the shell itself, and all the -commands it has run since it was started, are reported. +is given, then the user and system time used by the shell itself and all the +commands it has run since it was started is reported. The times reported are the real time (elapsed time from start to finish), -the user CPU time (time spent running in user mode), and the system CPU time +the user CPU time (time spent running in user mode) and the system CPU time (time spent running in kernel mode). Times are reported to standard error; the format of the output is: .Pp @@ -3836,7 +3878,8 @@ is a simple command), in which case the output is slightly longer: .Pp (the number of digits after the decimal may vary from system to system). Note -that simple redirections of standard error do not effect the output of the time +that simple redirections of standard error do not effect the output of the +.Ic time command: .Pp .Dl time sleep 1 2> afile @@ -3858,9 +3901,9 @@ string, indicating the signals are to be ignored, a minus sign .Pq Sq \&- , indicating that the default action is to be taken for the signals (see .Xr signal 3 ) -or a string containing shell commands to be evaluated and executed at the first -opportunity (i.e., when the current command completes, or before printing the -next +or a string containing shell commands to be evaluated and executed at the +first opportunity (i.e., when the current command completes or before +printing the next .Ev PS1 prompt) after receipt of one of the signals. .Ar signal @@ -4141,7 +4184,7 @@ is concerned, a block is 512 bytes. .It Xo Ic umask Op Fl S .Op Ar mask .Xc -Display or set the file permission creation mask, or umask (see +Display or set the file permission creation mask or umask (see .Xr umask 2 ) . If the .Fl S @@ -4155,7 +4198,7 @@ octal masks in which a set bit means the corresponding bit is to be cleared). For example, .Dq ug=rwx,o= sets the mask so files will not be readable, writable or executable by -.Dq others , +.Dq others and is equivalent (on most systems) to the octal mask .Dq 007 . .It Xo Ic unalias Op Fl adt @@ -4190,7 +4233,7 @@ The exit status of is that of the last specified job; if the last job is killed by a signal, the exit status is 128 + the number of the signal (see .Ic kill -l Ar exit-status -above); if the last specified job can't be found (because it never existed, or +above); if the last specified job can't be found (because it never existed or had already finished), the exit status of .Ic wait is 127. @@ -4199,7 +4242,7 @@ See below for the format of .Ar job . .Ic wait -will return if a signal for which a trap has been set is received, or if a +will return if a signal for which a trap has been set is received or if a .Dv SIGHUP , .Dv SIGINT or @@ -4218,7 +4261,7 @@ If job monitoring is enabled, the completion status of jobs is printed For each .Ar name , the type of command is listed (reserved word, built-in, alias, -function, tracked alias, or executable). +function, tracked alias or executable). If the .Fl p option is used, a path search is performed even if @@ -4272,7 +4315,7 @@ commands, and the state of the terminal is saved or restored when a foreground job is stopped or restarted, respectively. .Pp Note that only commands that create processes (e.g., asynchronous commands, -subshell commands, and non-built-in, non-function commands) can be stopped; +subshell commands and non-built-in, non-function commands) can be stopped; commands like .Ic read cannot be. @@ -4297,7 +4340,7 @@ parameter) or by prefixing the job number with a percent sign Other percent sequences can also be used to refer to jobs: .Bl -tag -width 10n .It Ic %\&+ -The most recently stopped job, or, if there are no stopped jobs, the oldest +The most recently stopped job or, if there are no stopped jobs, the oldest running job. .It Ic %% , % Same as @@ -4440,60 +4483,15 @@ In the emacs mode, various editing commands (typically bound to one or more control characters) cause immediate actions without waiting for a newline. Several editing commands are bound to particular -control characters when the shell is invoked; these binding can be changed -using the following commands: -.Bl -tag -width Ds -.It Ic bind -The current bindings are listed. -.It Xo Ic bind -.Ar string Ns = Ns Op Ar editing-command -.Xc -The specified editing command is bound to the given -.Ar string , -which should consist of a control character (which may be written using caret -notation, i.e., ^X), optionally preceded by one of the two prefix characters. -Future input of the -.Ar string -will cause the editing command to be immediately invoked. -Note that although only two prefix characters (usually -.Tn ESC -and ^X) are supported, some -multi-character sequences can be supported. -The following binds the arrow keys on an -.Tn ANSI -terminal, or xterm (these are in the default bindings). -Of course some escape sequences won't work out quite this nicely. -.Pp -.Bl -item -compact -.It -.Ic bind '^[['=prefix-2 -.It -.Ic bind '^XA'=up-history -.It -.Ic bind '^XB'=down-history -.It -.Ic bind '^XC'=forward-char -.It -.Ic bind '^XD'=backward-char -.El -.It Ic bind Fl l -Lists the names of the functions to which keys may be bound. -.It Xo Ic bind Fl m -.Sm off -.Ar string No = Op Ar substitute -.Sm on -.Xc -The specified input -.Ar string -will afterwards be immediately replaced by the given -.Ar substitute -string, which may contain editing commands. -.El +control characters when the shell is invoked; these bindings can be changed +using the +.Ic bind +command. .Pp The following is a list of available editing commands. Each description starts with the name of the command, an .Ar n -(if the command can be prefixed with a count), and any keys the command is +(if the command can be prefixed with a count) and any keys the command is bound to by default (written using caret notation, i.e., .Tn "ASCII ESC" character is @@ -4545,7 +4543,7 @@ Uppercase the first character in the next .Ar n words, leaving the cursor past the end of the last word. .Pp -If the current line does not being with a comment character, one is added at +If the current line does not begin with a comment character, one is added at the beginning of the line and the line is entered (as if return had been pressed); otherwise, the existing comment characters are removed and the cursor is placed at the beginning of the line. @@ -4729,7 +4727,7 @@ Acts like .Ic stuff , then aborts input the same as an interrupt. .It Ic transpose-chars ^T -If at the end of line, or if the +If at the end of line or if the .Ic gmacs option is set, this exchanges the two previous characters; otherwise, it exchanges the previous and current characters and moves the cursor one @@ -4743,7 +4741,8 @@ Uppercase the next .Ar n words. .It Ic version ^V -Display the version of ksh. +Display the version of +.Nm mksh . The current edit buffer is restored as soon as any key is pressed (the key is then processed, unless it is a space). .It Ic yank ^Y @@ -4754,8 +4753,9 @@ Immediately after a replaces the inserted text string with the next previously killed text string. .El .Ss Vi editing mode -The vi command-line editor in ksh has basically the same commands as the vi -editor (see +The vi command-line editor in +.Nm +has basically the same commands as the vi editor (see .Xr vi 1 ) , with the following exceptions: .Bl -bullet @@ -4772,7 +4772,9 @@ and, optionally, .It The .Ic _ -command is different (in ksh it is the last argument command, in vi it goes to +command is different (in +.Nm +it is the last argument command, in vi it goes to the start of the current line). .It The @@ -4792,7 +4794,7 @@ commands, etc.). .El .Pp Note that the ^X stands for control-X; also , and are used -for escape, space, and tab, respectively (no kidding). +for escape, space and tab, respectively (no kidding). .Pp Like vi, there are two modes \(em .Dq insert @@ -4807,7 +4809,7 @@ In particular, the following characters are taken from current settings (see .Xr tty 1 ) and have their usual meaning (normal values are in parentheses): kill (^U), -erase (^?), werase (^W), eof (^D), intr (^C), and quit (^\e). +erase (^?), werase (^W), eof (^D), intr (^C) and quit (^\e). In addition to the above, the following characters are also treated specially in insert mode: .Bl -tag -width 10n @@ -4819,7 +4821,7 @@ The next character typed is not treated specially (can be used to insert the characters being described here). .It Ic ^J ^M End of line. -The current line is read, parsed, and executed by the shell. +The current line is read, parsed and executed by the shell. .It Ic Puts the editor in command mode (see below). .It Ic ^E @@ -4840,7 +4842,7 @@ above), enabled with .Pp In command mode, each character is interpreted as a command. Characters that -don't correspond to commands, are illegal combinations of commands, or are +don't correspond to commands, are illegal combinations of commands or are commands that can't be carried out all cause beeps. In the following command descriptions, an .Ar n @@ -4855,14 +4857,16 @@ refers to the position between the cursor and the character preceding the cursor. A .Dq word -is a sequence of letters, digits, and underscore characters or a sequence of +is a sequence of letters, digits and underscore characters or a sequence of non-letter, non-digit, non-underscore, non-whitespace characters (e.g., .Dq ab2\&*\&&^ contains two words) and a .Dq big-word is a sequence of non-whitespace characters. .Pp -Special ksh vi commands +Special +.Nm +vi commands .Pp The following commands are not in, or are different from, the normal vi file editor: @@ -4898,7 +4902,7 @@ The actual command executed is Command or file name expansion is applied to the current big-word (with an appended .Ql * , -if the word contains no file globbing characters) -- the big-word is replaced +if the word contains no file globbing characters) \(em the big-word is replaced with the resulting words. If the current big-word is the first on the line (or follows one of the characters @@ -4920,7 +4924,13 @@ File name expansion matches the big-word against the files in the current directory. After expansion, the cursor is placed just past the last word and the editor is in insert mode. -.It n\e,\ n^F,\ n,\ and\ n +.It Xo +.Ar n Ns Ic \e Ns , +.Ar n Ns Ic ^F , +.Ar n Ns Ic , +.No and +.Ar n Ns Ic +.Xc Command/file name completion. Replace the current big-word with the longest unique match obtained after performing command and file name expansion. @@ -5039,11 +5049,21 @@ command, but moves in the opposite direction. .Pp Inter-line movement commands: .Bl -tag -width Ds -.It \fIn\fBj\fR,\ \fIn\fB+\fR\ and\ \fIn\fB^N\fR +.It Xo +.Ar n Ns Ic j , +.Ar n Ns Ic + +.No and +.Ar n Ns Ic ^N +.Xc Move to the .Ar n Ns th next line in the history. -.It \fIn\fBk\fR,\ \fIn\fB-\fR\ and\ \fIn\fB^P\fR +.It Xo +.Ar n Ns Ic k , +.Ar n Ns Ic - +.No and +.Ar n Ns Ic ^P +.Xc Move to the .Ar n Ns th previous line in the history. @@ -5183,7 +5203,7 @@ except the buffer is pasted at the current position. Miscellaneous vi commands .Bl -tag -width Ds .It Ic ^J No and Ic ^M -The current line is read, parsed, and executed by the shell. +The current line is read, parsed and executed by the shell. .It Ic ^L No and Ic ^R Redraw the current line. .It Ar n Ns Ic \&. @@ -5301,7 +5321,7 @@ Please include the version of .Ic print $KSH_VERSION shows it .Pc , -the machine, operating system, and compiler you are using and how you built +the machine, operating system and compiler you are using and how you built .Nm (it is recommended to use the provided .Pa Build.sh