diff options
Diffstat (limited to 'bin/pdksh/ksh.1')
-rw-r--r-- | bin/pdksh/ksh.1 | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/bin/pdksh/ksh.1 b/bin/pdksh/ksh.1 index 6b0721aecdb..7f6e1987bdd 100644 --- a/bin/pdksh/ksh.1 +++ b/bin/pdksh/ksh.1 @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: ksh.1,v 1.2 1996/08/19 20:08:53 downsj Exp $ +.\" $OpenBSD: ksh.1,v 1.3 1996/10/01 02:05:37 downsj Exp $ .\"{{{}}} .\"{{{ Notes about man page .\" - use the pseudo-macros .sh( and .sh) to begin and end sh-specific @@ -18,7 +18,7 @@ .\" function) for more clear description. .\"}}} .\"{{{ Title -.TH KSH 1 "May 19, 1995" "" "User commands" +.TH KSH 1 "August 19, 1995" "" "User commands" .\"}}} .\"{{{ Name .SH NAME @@ -138,9 +138,9 @@ used to specify redirections (see Input/Output Redirection below); \fB&\fP is used to create asynchronous pipelines; \fB&&\fP and \fB||\fP are used to specify conditional execution; \fB;;\fP is used in \fBcase\fP statements; -\fB(\fP .. \fB)\fP are used to create subshells; -and lastly, \fB((\fP .. \fB))\fP are used in arithmetic expressions; +and lastly, +\fB(\fP .. \fB)\fP are used to create subshells. .PP White-space and meta-characters can be quoted individually using backslash (\fB\e\fP), or in groups using double (\fB"\fP) or single (\fB'\fP) @@ -180,7 +180,9 @@ The command may be a shell built-in command, a function or an \fIexternal command\fP, \fIi.e.\fP, a separate executable file that is located using the \fBPATH\fP parameter (see Command Execution below). Note that all command constructs have an \fIexit status\fP: for external -commands, this is related to the status returned by \fIwait\fP(2); +commands, this is related to the status returned by \fIwait\fP(2) (if the +command could not be found, the exit status is 127, if it could not be +executed, the exit status is 126); the exit status of other command constructs (built-in commands, functions, compound-commands, pipelines, lists, \fIetc.\fP) are all well defined and are described where the construct is described. @@ -888,6 +890,15 @@ The process ID of the shell's parent (readonly). Parameter, command and arithmetic substitutions are performed, and \fB!\fP is replaced with the current command number (see \fBfc\fP command below). A literal ! can be put in the prompt by placing !! in PS1. +Note that since the command line editors try to figure out how long the +prompt is (so they know how far it is to edge of the screen), +escape codes in the prompt tend to mess things up. +You can tell the shell not to count certain sequences (such as escape codes) +by prefixing your prompt with a non-printing character (such as control-A) +followed by a carriage return and then delimiting the escape codes with +this non-printing character. +If you don't have any non-printing characters, you're out of luck... +BTW, don't blame me for this hack; it's in the original ksh. Default is `\fB$\ \fP' for non-root users, `\fB#\ \fP' for root.. .\"}}} .\"{{{ PS2 @@ -1195,6 +1206,17 @@ negation. logical not; the result is 1 if argument is zero, 0 if not. .IP "\fB~\fP" arithmetic (bit-wise) not. +.IP "\fB++\fP" +increment; must be applied to a parameter (not a literal or other +expression) - the parameter is incremented by 1. +When used as a prefix operator, the result is the incremented value of +the parameter, when used as a postfix operator, the result is the +original value of the parameter. +.IP "\fB++\fP" +similar to \fB++\fP, except the paramter is decremented by 1. +.IP "\fB,\fP" +seperates two arithmetic expressions; the left hand side is evaluated first, +then the right. The result is value of the expression on the right hand side. .IP "\fB=\fP" assignment; variable on the left is set to the value on the right. .IP "\fB*= /= %= += \-= <<= >>= &= ^= |=\fP" @@ -1978,6 +2000,10 @@ No effect \- in the original Korn shell, unless viraw was set, the vi command line mode would let the tty driver do the work until ESC (^[) was entered. pdksh is always in viraw mode. T} + vi-esccomplete T{ +In vi command line editing, do command / file name completion when +escape (^[) is entered in command mode. +T} vi-show8 T{ Prefix characters with the eighth bit set with `M-'. If this option is not set, characters in the range @@ -3029,11 +3055,12 @@ 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. -.IP "\fIn\fP\fB\e\fP, \fIn\fP\fB^F\fP and \fIn\fP\fB<tab>\fP" +.IP "\fIn\fP\fB\e\fP, \fIn\fP\fB^F\fP, \fIn\fP\fB<tab>\fP and \fIn\fP\fB<esc>\fP" command/file name completion: replace the current big-word with the longest unique match obtained after performing command/file name expansion. -\fB<tab>\fP is only recognized if the \fBvi-tabcomplete\fP option +\fB<tab>\fP is only recognized if the \fBvi-tabcomplete\fP option is set, +while \fB<esc>\fP is only recognized if the \fBvi-esccomplete\fP option is set (see \fBset \-o\fP). If \fIn\fP is specified, the \fIn\fPth possible completion is selected (as reported by the command/file name enumeration |