home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-02-19 | 54.8 KB | 1,639 lines |
- Newsgroups: comp.sources.misc
- From: zsh-list@cs.uow.edu.au (The Zsh Mailing List)
- Subject: v35i054: zsh - The Z Shell, version 2.3.1, Part04/22
- Message-ID: <1993Feb20.212102.28243@sparky.imd.sterling.com>
- X-Md4-Signature: 0b48b3400b39b0422b305ef45a82156d
- Date: Sat, 20 Feb 1993 21:21:02 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: zsh-list@cs.uow.edu.au (The Zsh Mailing List)
- Posting-number: Volume 35, Issue 54
- Archive-name: zsh/part04
- Environment: UNIX
- Supersedes: zsh2.2: Volume 29, Issue 97-113
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: FEATURES doc/zsh.texi.02
- # Wrapped by mattson@odin on Sat Feb 6 14:41:51 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 4 (of 22)."'
- if test -f 'FEATURES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'FEATURES'\"
- else
- echo shar: Extracting \"'FEATURES'\" \(2684 characters\)
- sed "s/^X//" >'FEATURES' <<'END_OF_FILE'
- Xvery close to ksh/sh grammar, with csh additions
- Xmost features of ksh, bash, and tcsh
- X75 builtins, 80 options, 149 key bindings
- Xshort for loops, ex: for i (*.c) echo $i
- Xselect
- Xshell functions
- Xconditional expressions (test builtin, [ ... ], and ksh-style [[ ... ]])
- Xglobal aliases (may be expanded anywhere on the line)
- Xdirectory stack access with =num
- Xprocess substitution (vi =(cmd) edits the output of cmd)
- Xgeneralized pipes (ls foo >>(cmd1) 2>>(cmd2) pipes stdout to cmd1
- X and stderr to cmd2)
- Xarithmetic expressions
- Xadvanced globbing:
- X ls **/file searches recursively for "file" in subdirectories
- X ls file<20-> matches file20, file30, file100, etc.
- X ls *.(c|pro) matches *.c and *.pro
- X ls *(R) matches only world-readable files
- X ls *.c~lex.c matches all .c files except lex.c
- Xnull command shorthands:
- X "< file" is same as "more <file"
- X "> file" is same as "cat >file"
- X ">> file" is same as "cat >>file"
- Xksh-style coprocesses
- Xautomatic file stream teeing (ls >foo >bar puts output in two places)
- Xchpwd() function run every time you change directory (useful for
- X updating the status line)
- Xjob control
- Xcsh-style history
- Xfull vi line editing, including "c2w" and "y$" and such things
- Xfull emacs line editing
- Xincremental history search
- Xmagic-space history
- Xspelling correction
- Xarray parameters
- X$HOSTTYPE, $LINENO, $RANDOM, $SECONDS, $cdpath, $COLUMNS, $fignore,
- X $HISTCHARS, $mailpath
- Xwith autocd option, typing a directory name by itself is the same as
- X typing "cd dirname"
- Xmenu completion: pressing TAB repeatedly cycles through the possible matches
- Xincremental path hashing
- Xautomatic process time reporting for commands that run over a certain limit
- Xfull tcsh-style prompt substitution
- Xutmp login/logout reporting
- Xwith histverify option, performing csh-style history expansions causes the
- X input line to be brought up for editing instead of being executed
- Xwith sunkeyboardhack option, accidently typed trailing ` characters
- X are removed from the input line (for those of you with Sun keyboards :-) )
- Xautoloaded functions (loaded from a file when they are first referenced)
- X"cd old new" replaces "old" with "new" in directory string
- Xgeneralized argument completion, including:
- X - command name completion
- X - filename and path completion
- X - hostname completion
- X - key binding completion
- X - option completion
- X - variable name completion
- X - user-specified keyword completion
- Xprompt on right side of screen
- Xdirectory stacks
- Xhistory datestamps and execution time records
- Xcommand scheduling (like at(1), but in the shell's context)
- Xtty mode freezing
- Xup to 9 startup files (but you only need 1 or 2)
- X8-bit clean
- Xwhich -a cmd lists all occurences of "cmd" in the path
- END_OF_FILE
- if test 2684 -ne `wc -c <'FEATURES'`; then
- echo shar: \"'FEATURES'\" unpacked with wrong size!
- fi
- # end of 'FEATURES'
- fi
- if test -f 'doc/zsh.texi.02' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/zsh.texi.02'\"
- else
- echo shar: Extracting \"'doc/zsh.texi.02'\" \(49503 characters\)
- sed "s/^X//" >'doc/zsh.texi.02' <<'END_OF_FILE'
- Xassociativity of expressions in C. The following operators are
- Xsupported (listed in decreasing order of precedence):
- X
- X@table @code
- X@item + - ! ~ ++ --
- Xunary plus/minus, logical NOT, complement, @{pre,post@}@{in,de@}crement
- X@item &
- Xlogical AND
- X@item ^
- Xlogical XOR
- X@item |
- Xlogical OR
- X@item * / %
- Xmultiplication, division, remainder
- X@item + -
- Xaddition, subtraction
- X@item << >>
- Xlogical shift left, shift right
- X@item < > <= >=
- Xcomparison
- X@item == !=
- Xequality and inequality
- X@item &&
- Xboolean AND
- X@item || ^^
- Xboolean OR, XOR
- X@item ? :
- Xternary operator
- X@item = += -= *= /= %= &= ^= |= <<= >>= &&= ||= ^^=
- Xassignment
- X@item ,
- Xcomma operator
- X@end table
- X
- X@noindent
- XThe operators @code{&&}, @code{||}, @code{&&=}, and @code{||=} are
- Xshort-circuiting, and only one of the latter two expressions in a
- Xternary operator is evaluated. Note the precedence of the logical AND,
- XOR, and XOR operators.@refill
- X
- X@noindent
- XNamed parameters can be referenced by name within an arithmetic
- Xexpression without using the parameter substitution syntax.
- X
- X@cindex parameters, integer
- X@cindex integer parameters
- X@findex integer, use of
- X@noindent
- XAn internal integer representation of a named parameter can be specified
- Xwith the @code{integer} builtin. Arithmetic evaluation is performed on
- Xthe value of each assignment to a named parameter declared integer in
- Xthis manner.@refill
- X
- X@findex let, use of
- X@noindent
- XSince many of the arithmetic operators require quoting, an alternative
- Xform of the @code{let} command is provided. For any command which
- Xbegins with a @code{((}, all the characters until a matching @code{))}
- Xare treated as a quoted expression. More precisely, @code{(( @dots{} ))} is
- Xequivalent to @code{let "@dots{}"}.@refill
- X
- X@node Conditional Expressions, Zsh Line Editor, Arithmetic Evaluation, Top
- X@chapter Conditional Expressions
- X@cindex conditional expressions
- X@cindex expressions, conditional
- X
- X@noindent
- XA @dfn{conditional expression} is used with the @code{[[} compound
- Xcommand to test attributes of files and to compare strings. Each
- Xexpression can be constructed from one or more of the following unary or
- Xbinary expressions:@refill
- X
- X@table @code
- X@item -a @var{file}
- Xtrue if @var{file} exists.
- X@item -b @var{file}
- Xtrue if @var{file} exists and is a block special file.
- X@item -c @var{file}
- Xtrue if @var{file} exists and is a character special file.
- X@item -d @var{file}
- Xtrue if @var{file} exists and is a directory.
- X@item -e @var{file}
- Xtrue if @var{file} exists.
- X@item -f @var{file}
- Xtrue if @var{file} exists and is an ordinary file.
- X@item -g @var{file}
- Xtrue if @var{file} exists and has its setgid bit set.
- X@item -h @var{file}
- Xtrue if @var{file} exists and is a symbolic link.
- X@item -k @var{file}
- Xtrue if @var{file} exists and has its sticky bit set.
- X@item -n @var{string}
- Xtrue if length of @var{string} is non-zero.
- X@item -o @var{option}
- Xtrue if option named @var{option} is on.
- X@item -p @var{file}
- Xtrue if @var{file} exists and is a fifo special file or a pipe.
- X@item -r @var{file}
- Xtrue if @var{file} exists and is readable by current process.
- X@item -s @var{file}
- Xtrue if @var{file} exists and has size greater than zero.
- X@item -t @var{fd}
- Xtrue if file descriptor number @var{fd} is open and associated with a
- Xterminal device (note: @var{fd} is not optional).@refill
- X@item -u @var{file}
- Xtrue if @var{file} exists and has its setuid bit set.
- X@item -w @var{file}
- Xtrue if @var{file} exists and is writable by current process.
- X@item -x @var{file}
- Xtrue if @var{file} exists and is executable by current process. If
- X@var{file} exists and is a directory, then the current process has
- Xpermission to search in the directory.@refill
- X@item -z @var{string}
- Xtrue if length of @var{string} is zero.
- X@item -L @var{file}
- Xtrue if @var{file} exists and is a symbolic link.
- X@item -O @var{file}
- Xtrue if @var{file} exists and is owned by the effective user id of this
- Xprocess.
- X@item -G @var{file}
- Xtrue if @var{file} exists and its group matches the effective group id
- Xof this process.
- X@item -S @var{file}
- Xtrue if @var{file} exists and is a socket.
- X@item @var{file1} -nt @var{file2}
- Xtrue if @var{file1} exists and is newer than @var{file2}.
- X@item @var{file1} -ot @var{file2}
- Xtrue if @var{file1} exists and is older than @var{file2}.
- X@item @var{file1} -ef @var{file2}
- Xtrue if @var{file1} and @var{file2} exist and refer to the same file.
- X@item @var{string} = @var{pattern}
- Xtrue if @var{string} matches @var{pattern}.
- X@item @var{string} != @var{pattern}
- Xtrue if @var{string} does not match @var{pattern}.
- X@item @var{string1} < @var{string2}
- Xtrue if @var{string1} comes before @var{string2} based on ASCII value of
- Xtheir characters.@refill
- X@item @var{string1} > @var{string2}
- Xtrue if @var{string1} comes after @var{string2} based on ASCII value of
- Xtheir characters.@refill
- X@item @var{exp1} -eq @var{exp2}
- Xtrue if @var{exp1} is equal to @var{exp2}.
- X@item @var{exp1} -ne @var{exp2}
- Xtrue if @var{exp1} is not equal to @var{exp2}.
- X@item @var{exp1} -lt @var{exp2}
- Xtrue if @var{exp1} is less than @var{exp2}.
- X@item @var{exp1} -gt @var{exp2}
- Xtrue if @var{exp1} is greater than @var{exp2}.
- X@item @var{exp1} -le @var{exp2}
- Xtrue if @var{exp1} is less than or equal to @var{exp2}.
- X@item @var{exp1} -ge @var{exp2}
- Xtrue if @var{exp1} is greater than or equal to @var{exp2}.
- X@item ( @var{exp} )
- Xtrue if @var{exp} is true.
- X@item ! @var{exp}
- Xtrue if @var{exp} is false.
- X@item @var{exp1} && @var{exp2}
- Xtrue if @var{exp1} and @var{exp2} are both true.
- X@item @var{exp1} || @var{exp2}
- Xtrue if either @var{exp1} or @var{exp2} is true.
- X@end table
- X
- X@noindent
- XIn each of the above expressions, if @var{file} is of the form
- X@samp{/dev/fd/@var{n}}, where @var{n} is an integer, then the test
- Xapplied to the open file whose descriptor number is @var{n} , even if
- Xthe underlying system does not support the @file{/dev/fd}
- Xdirectory.@refill
- X
- X@node Zsh Line Editor, Parameters, Conditional Expressions, Top
- X@chapter Zsh Line Editor
- X@cindex line editor
- X@cindex editor, line
- X
- X@pindex ZLE, use of
- X@noindent
- XIf the @code{ZLE} option is set (it is by default) and the shell input is
- Xattached to the terminal, the user is allowed to edit command lines.@refill
- X
- X@vindex TERM
- X@pindex SINGLE_LINE_ZLE, use of
- X@cindex ksh, editor mode
- X@cindex editor, modes
- X@noindent
- XThere are two display modes. The first, multiline mode, is the default.
- XIt only works if the @code{TERM} parameter is set to a valid terminal
- Xtype that can move the cursor up. The second, single line mode, is used
- Xif @code{TERM} is invalid or incapable of moving the cursor up, or if the
- X@code{SINGLE_LINE_ZLE} option is set. This mode is similar to ksh, and
- Xuses no termcap sequences.@refill
- X
- X@cindex bindings, key
- X@cindex key bindings
- X@findex bindkey, use of
- X@vindex VISUAL
- X@vindex EDITOR
- X@noindent
- XCommand bindings may be set using the @code{bindkey} builtin. There are
- Xtwo keymaps---the main keymap and the alternate keymap. The alternate
- Xkeymap is bound to @code{vi} command mode. The main keymap is bound to
- X@code{emacs} mode by default. To bind the main keymap to @code{vi}
- Xinsert mode, use @code{bindkey -v}, or set one of the @code{VISUAL} or
- X@code{EDITOR} environment variables to a string containing
- X@code{vi}.@refill
- X
- X@noindent
- XThe following is a list of all the key commands and their default
- Xbindings in emacs and vi command mode.
- X
- X@menu
- X* Movement::
- X* History Control::
- X* Modifying Text::
- X* Arguments::
- X* Completion::
- X* Miscellaneous::
- X@end menu
- X
- X@node Movement, History Control, , Zsh Line Editor
- X@section Movement
- X
- X@table @code
- X@tindex vi-backward-blank-word
- X@kindex B
- X@item vi-backward-blank-word (unbound) (B)
- XMove backward one word, where a word is defined as a series of non-blank
- Xcharacters.
- X@tindex backward-char
- X@kindex CTRL-B
- X@kindex ESC-[D
- X@item backward-char (@ctrl{B} @key{ESC}-[D) (unbound)
- XMove backward one character.
- X@tindex vi-backward-char
- X@kindex ESC-B
- X@kindex ESC-b
- X@item vi-backward-char (unbound) (h)
- XMove backward one character, without changing lines.
- X@tindex backward-word
- X@item backward-word (@key{ESC}-B @key{ESC}-b) (unbound)
- XMove to the beginning of the previous word.
- X@tindex emacs-backward-word
- X@item emacs-backward-word
- XMove to the beginning of the previous word.
- X@tindex vi-backward-word
- X@kindex b
- X@item vi-backward-word (unbound) (b)
- XMove to the beginning of the previous word, vi-style.
- X@tindex beginning-of-line
- X@kindex CTRL-A
- X@kindex 0
- X@item beginning-of-line (@ctrl{A}) (0)
- XMove to the beginning of the line. If already at the beginning of the
- Xline, move to the beginning of the previous line, if any.
- X@tindex vi-beginning-of-line
- X@item vi-beginning-of-line
- XMove to the beginning of the line, without changing lines.
- X@tindex end-of-line
- X@kindex CTRL-E
- X@item end-of-line (@ctrl{E})
- XMove to the end of the line. If already at the end of the line, move to
- Xthe end of the next line, if any.
- X@tindex vi-end-of-line
- X@kindex $
- X@item vi-end-of-line (unbound) ($)
- XMove to the end of the line.
- X@tindex vi-forward-blank-word
- X@kindex W
- X@item vi-forward-blank-word (unbound) (W)
- XMove forward one word, where a word is defined as a series of non-blank
- Xcharacters.
- X@tindex vi-forward-blank-word-end
- X@kindex E
- X@item vi-forward-blank-word-end (unbound) (E)
- XMove to the end of the current word, or, if at the end of the current
- Xword, to the end of the next word, where a word is defined as a series
- Xof non-blank characters.
- X@tindex forward-char
- X@kindex CTRL-F
- X@kindex ESC-[C
- X@item forward-char (@ctrl{F} @key{ESC}-[C)
- XMove forward one character.
- X@tindex vi-forward-char
- X@kindex l
- X@kindex SPACE
- X@item vi-forward-char (unbound) (space l)
- XMove forward one character.
- X@tindex vi-find-next-char
- X@kindex CTRL-X CTRL-F
- X@kindex f
- X@item vi-find-next-char (@ctrl{X}@ctrl{F}) (f)
- XRead a character from the keyboard, and move to the next occurrence of
- Xit in the line.
- X@tindex vi-find-next-char-skip
- X@kindex t
- X@item vi-find-next-char-skip (unbound) (t)
- XRead a character from the keyboard, and move to the position just before
- Xthe next occurrence of it in the line.
- X@tindex vi-find-prev-char
- X@kindex F
- X@item vi-find-prev-char (unbound) (F)
- XRead a character from the keyboard, and move to the previous occurrence
- Xof it in the line.
- X@tindex vi-find-prev-char-skip
- X@kindex T
- X@item vi-find-prev-char-skip (unbound) (T)
- XRead a character from the keyboard, and move to the position just after
- Xthe previous occurrence of it in the line.
- X@tindex vi-first-non-blank
- X@kindex ^
- X@item vi-first-non-blank (unbound) (^)
- XMove to the first non-blank character in the line.
- X@tindex vi-forward-word
- X@kindex w
- X@item vi-forward-word (unbound) (w)
- XMove forward one word, vi-style.
- X@tindex forward-word
- X@kindex ESC-F
- X@kindex ESC-f
- X@item forward-word (@key{ESC}-F @key{ESC}-f) (unbound)
- XMove to the beginning of the next word. The editor's idea of a word is
- Xspecified with the @code{WORDCHARS} parameter.
- X@tindex emacs-forward-word
- X@item emacs-forward-word
- XMove to the end of the next word.
- X@tindex vi-forward-word-end
- X@kindex e
- X@item vi-forward-word-end (unbound) (e)
- XMove to the end of the next word.
- X@tindex vi-goto-column
- X@kindex ESC-|
- X@kindex |
- X@item vi-goto-column (@key{ESC}-|) (|)
- XMove to the column specified by the numeric argument.
- X@tindex vi-goto-mark
- X@kindex `
- X@item vi-goto-mark (unbound) (`)
- XMove to the specified mark.
- X@tindex vi-goto-mark-line
- X@kindex '
- X@item vi-goto-mark-line (unbound) (')
- XMove to beginning of the line containing the specified mark.
- X@tindex vi-repeat-find
- X@kindex ;
- X@item vi-repeat-find (unbound) (;)
- XRepeat the last @code{vi-find} command.
- X@tindex vi-rev-repeat-find
- X@kindex ,
- X@item vi-rev-repeat-find (unbound) (,)
- XRepeat the last @code{vi-find} command in the opposite direction.
- X@end table
- X
- X@node History Control, Modifying Text, Movement, Zsh Line Editor
- X@section History Control
- X
- X@table @code
- X@kindex ESC-<
- X@tindex beginning-of-buffer-or-history
- X@item beginning-of-buffer-or-history (@key{ESC}-<)
- XMove to the beginning of the buffer, or if already there, move to the
- Xfirst event in the history list.
- X@tindex beginning-of-line-hist
- X@item beginning-of-line-hist
- XMove to the beginning of the line. If already at the beginning of the
- Xbuffer, move to the previous history line.
- X@tindex beginning-of-history
- X@item beginning-of-history
- XMove to the first event in the history list.
- X@tindex down-line-or-history
- X@kindex CTRL-N
- X@kindex ESC-[B
- X@kindex +
- X@kindex j
- X@item down-line-or-history (@ctrl{N} @key{ESC}-[B) (+ j)
- XMove down a line in the buffer, or if already at the bottom line, move
- Xto the next event in the history list.
- X@tindex down-line-or-search
- X@item down-line-or-search
- XMove down a line in the buffer, or if already at the bottom line,
- Xsearch forward in the history for a line beginning with the first
- Xword in the buffer.
- X@tindex down-history
- X@kindex CTRL-N
- X@item down-history (unbound) (@ctrl{N})
- XMove to the next event in the history list.
- X@tindex end-of-buffer-or-history
- X@kindex ESC->
- X@item end-of-buffer-or-history (@key{ESC}->)
- XMove to the end of the buffer, or if already there, move to the last
- Xevent in the history list.
- X@tindex end-of-line-hist
- X@item end-of-line-hist
- XMove to the end of the line. If already at the end of the buffer, move
- Xto the next history line.
- X@tindex end-of-history
- X@item end-of-history
- XMove to the last event in the history list.
- X@tindex vi-fetch-history
- X@kindex G
- X@item vi-fetch-history (unbound) (G)
- XFetch the history line specified by the numeric argument.
- X@tindex history-incremental-search-backward
- X@kindex CTRL-R
- X@kindex CTRL-X r
- X@item history-incremental-search-backward (@ctrl{R} @ctrl{X}r)
- XSearch backward incrementally for a specified string. The string may
- Xbegin with @code{^} to anchor the search to the beginning of the line.
- X@tindex history-incremental-search-forward
- X@kindex CTRL-S
- X@kindex CTRL-X s
- X@item history-incremental-search-forward (@ctrl{S} @ctrl{X}s)
- XSearch forward incrementally for a specified string. The string may
- Xbegin with @code{^} to anchor the search to the beginning of the line.
- X@tindex history-search-backward
- X@kindex ESC-P
- X@kindex ESC-p
- X@kindex K
- X@item history-search-backward (@key{ESC}-P @key{ESC}-p) (K)
- XSearch backward in the history for a line beginning with the first word
- Xin the buffer.
- X@tindex vi-history-search-backward
- X@kindex /
- X@item vi-history-search-backward (unbound) (/)
- XSearch backward in the history for a specified string. The string may
- Xbegin with @code{^} to anchor the search to the beginning of the line.
- X@tindex history-search-forward
- X@kindex ESC-N
- X@kindex ESC-n
- X@kindex J
- X@item history-search-forward (@key{ESC}-N @key{ESC}-n) (J)
- XSearch forward in the history for a line beginning with the first word
- Xin the buffer.
- X@tindex vi-history-search-forward
- X@kindex ?
- X@item vi-history-search-forward (unbound) (?)
- XSearch forward in the history for a specified string. The string may
- Xbegin with @code{^} to anchor the search to the beginning of the line.
- X@tindex infer-next-history
- X@kindex CTRL-X CTRL-N
- X@item infer-next-history (@ctrl{X}@ctrl{N})
- XSearch in the history list for a line matching the current one and fetch
- Xthe event following it.
- X@tindex insert-last-word
- X@kindex ESC-_
- X@kindex ESC-.
- X@item insert-last-word (@key{ESC}-_ @key{ESC}-.)
- XInsert the last word from the previous history event at the cursor
- Xposition.
- X@tindex vi-repeat-search
- X@kindex n
- X@item vi-repeat-search (unbound) (n)
- XRepeat the last vi history search.
- X@tindex vi-rev-repeat-search
- X@kindex N
- X@item vi-rev-repeat-search (unbound) (N)
- XRepeat the last vi history
- Xsearch, but in reverse.
- X@tindex toggle-literal-history
- X@pindex HIST_LIT, use of
- X@kindex ESC-R
- X@kindex ESC-r
- X@item toggle-literal-history (@key{ESC}-R @key{ESC}-r)
- XToggle between literal and lexical history. The default is lexical
- Xhistory unless the @code{HIST_LIT} option is set.
- X@kindex CTRL-P
- X@kindex ESC-[A
- X@kindex -
- X@kindex k
- X@tindex up-line-or-history
- X@item up-line-or-history (@ctrl{P} @key{ESC}-[A) (- k)
- XMove up a line in the buffer, or if already at the top line, move to the
- Xprevious event in the history list.
- X@tindex up-line-or-search
- X@item up-line-or-search
- XMove up a line in the buffer, or if already at the top line, search
- Xbackward in the history for a line beginning with the first word in the
- Xbuffer.
- X@tindex up-history
- X@kindex CTRL-P
- X@item up-history (unbound) (@ctrl{P})
- XMove to the previous event in the history list.
- X@end table
- X
- X@node Modifying Text, Arguments, History Control, Zsh Line Editor
- X@section Modifying Text
- X
- X@table @code
- X@tindex vi-add-eol
- X@kindex A
- X@item vi-add-eol (unbound) (A)
- XMove to the end of the line and enter insert mode.
- X@tindex vi-add-next
- X@kindex a
- X@item vi-add-next (unbound) (a)
- XMove forward one character and enter insert mode.
- X@tindex backward-delete-char
- X@kindex CTRL-H
- X@kindex CTRL-?
- X@item backward-delete-char (@ctrl{H} @ctrl{?}) (@ctrl{?})
- XDelete the character behind the cursor.
- X@tindex vi-backward-delete-char
- X@kindex X
- X@item vi-backward-delete-char (unbound) (X)
- XDelete the character behind the cursor, without changing lines.
- X@tindex backward-delete-word
- X@item backward-delete-word
- XDelete the word behind the cursor.
- X@tindex backward-kill-line
- X@item backward-kill-line
- XKill from the beginning of the line to the cursor position.
- X@tindex backward-kill-word
- X@kindex CTRL-W
- X@kindex ESC-CTRL-H
- X@kindex ESC-CTRL-?
- X@item backward-kill-word (@ctrl{W} @key{ESC}-@ctrl{H} @key{ESC}-@ctrl{?})
- XKill the word behind the cursor.
- X@tindex vi-backward-kill-word
- X@kindex CTRL-W
- X@item vi-backward-kill-word (unbound) (@ctrl{W})
- XKill the word behind the cursor.
- X@tindex capitalize-word
- X@kindex ESC-C
- X@kindex ESC-c
- X@item capitalize-word (@key{ESC}-C @key{ESC}-c)
- XCapitalize the current word and move past it.
- X@tindex vi-change
- X@kindex c
- X@item vi-change (unbound) (c)
- XRead a movement command from the keyboard, and kill from the cursor
- Xposition to the endpoint of the movement. Then enter insert mode. If
- Xthe command is @code{vi-change}, kill the current line.
- X@tindex vi-change-eol
- X@kindex C
- X@item vi-change-eol (unbound) (C)
- XKill to the end of the line and enter insert mode.
- X@tindex vi-change-whole-line
- X@kindex S
- X@kindex s
- X@item vi-change-whole-line (unbound) (S s)
- XKill the current line and enter insert mode.
- X@tindex copy-region-as-kill
- X@kindex ESC-W
- X@kindex ESC-w
- X@item copy-region-as-kill (@key{ESC}-W @key{ESC}-w)
- XCopy the area from the cursor to the mark to the kill buffer.
- X@tindex copy-prev-word
- X@kindex ESC-CTRL-_
- X@item copy-prev-word (@key{ESC}-@ctrl{_})
- XDuplicate the word behind the cursor.
- X@tindex vi-delete
- X@kindex d
- X@item vi-delete (unbound) (d)
- XRead a movement command from the keyboard, and kill from the cursor
- Xposition to the endpoint of the movement. If the command is
- X@code{vi-delete}, kill the current line.@refill
- X@tindex delete-char
- X@kindex x
- X@item delete-char (unbound) (x)
- XDelete the character under the cursor.
- X@tindex vi-delete-char
- X@item vi-delete-char (unbound) (x)
- XDelete the character under the cursor.
- X@tindex delete-word
- X@kindex ESC-D
- X@kindex ESC-d
- X@item delete-word (@key{ESC}-D @key{ESC}-d)
- XDelete the current word.
- X@tindex down-case-word
- X@kindex ESC-L
- X@kindex ESC-l
- X@item down-case-word (@key{ESC}-L @key{ESC}-l)
- XConvert the current word to all lowercase and move past it.
- X@tindex kill-word
- X@item kill-word
- XKill the current word.
- X@tindex gosmacs-transpose-chars
- X@item gosmacs-transpose-chars
- XExchange the two characters behind the cursor.
- X@kindex >
- X@tindex vi-indent
- X@item vi-indent (unbound) (>)
- XIndent a number of lines.
- X@kindex i
- X@tindex vi-insert
- X@item vi-insert (unbound) (i)
- XEnter insert mode.
- X@kindex I
- X@tindex vi-insert-bol
- X@item vi-insert-bol (unbound) (I)
- XMove to the beginning of the line and enter insert mode.
- X@tindex vi-join
- X@kindex CTRL-X CTRL-J
- X@item vi-join (@ctrl{X}@ctrl{J})
- XJoin the current line with the next one.
- X@tindex kill-line
- X@kindex CTRL-K
- X@kindex D
- X@item kill-line (@ctrl{K}) (D)
- XKill from the cursor to the end of the line.
- X@tindex kill-region
- X@item kill-region
- XKill from the cursor to the mark.
- X@tindex kill-buffer
- X@kindex CTRL-X CTRL-K
- X@kindex CTRL-U
- X@item kill-buffer (@ctrl{X}@ctrl{K}) (@ctrl{U})
- XKill the entire buffer.
- X@tindex kill-whole-line
- X@kindex CTRL-U
- X@item kill-whole-line (@ctrl{U}) (unbound)
- XKill the current line.
- X@tindex vi-match-bracket
- X@kindex CTRL-X CTRL-B
- X@kindex %
- X@item vi-match-bracket (@ctrl{X}@ctrl{B}) (%)
- XMove to the bracket character (one of @code{@{@}}, @code{()}, or
- X@code{[]}) that matches the one under the cursor.@refill
- X@tindex vi-open-line-above
- X@kindex O
- X@item vi-open-line-above (unbound) (O)
- XOpen a line above the cursor and enter insert mode.
- X@tindex vi-open-line-below
- X@kindex o
- X@item vi-open-line-below (unbound) (o)
- XOpen a line below the cursor and enter insert mode.
- X@tindex vi-oper-swap-case
- X@item vi-oper-swap-case
- XRead a movement command from the keyboard, and swap the case of all
- Xcharacters from the cursor position to the endpoint of the movement. If
- Xthe movement command is @code{vi-oper-swap-case}, swap the case of all
- Xcharacters on the current line.@refill
- X@tindex overwrite-mode
- X@kindex CTRL-X CTRL-O
- X@item overwrite-mode (@ctrl{X}@ctrl{O})
- XToggle between overwrite mode and insert mode.
- X@tindex vi-put-after
- X@kindex p
- X@item vi-put-after (unbound) (p)
- XInsert the contents of the kill buffer after the cursor.
- X@tindex quoted-insert
- X@kindex CTRL-V
- X@item quoted-insert (@ctrl{V})
- XInsert the next character typed into the buffer literally.
- X@tindex quote-line
- X@kindex ESC-'
- X@item quote-line (@key{ESC}-')
- XQuote the current line; that is, put a @code{'} character at the
- Xbeginning and the end, and convert all @code{'} characters to @code{\'} @refill .
- X@tindex quote-region
- X@kindex ESC-"
- X@item quote-region (@key{ESC}-")
- XQuote the region from the cursor to the mark.
- X@tindex vi-replace
- X@kindex R
- X@item vi-replace (unbound) (R)
- XEnter overwrite mode.
- X@tindex vi-repeat-change
- X@kindex .
- X@item vi-repeat-change (unbound) (.)
- XRepeat the last vi mode text modification.
- X@tindex vi-replace-chars
- X@kindex r
- X@item vi-replace-chars (unbound) (r)
- XReplace the character under the cursor with a character read from the
- Xkeyboard.
- X@tindex self-insert
- X@item self-insert (printable characters)
- XPut a character in the buffer at the cursor position.
- X@tindex self-insert-unmeta
- X@kindex ESC-CTRL-I
- X@kindex ESC-CTRL-J
- X@kindex ESC-CTRL-M
- X@item self-insert-unmeta (@key{ESC}-@ctrl{I} @key{ESC}-@ctrl{J} @key{ESC}-@ctrl{M})
- XPut a character in the buffer after stripping the meta bit and
- Xconverting @ctrl{M} to @ctrl{J}.
- X@tindex vi-substitute
- X@kindex s
- X@item vi-substitute (unbound) (s)
- XSubstitute the next character(s).
- X@tindex vi-swap-case
- X@kindex ~
- X@item vi-swap-case (unbound) (~)
- XSwap the case of the character under the cursor and move past it.
- X@tindex transpose-chars
- X@kindex CTRL-T
- X@item transpose-chars (@ctrl{T})
- XExchange the two characters to the left of the cursor if at end of line,
- Xelse exchange the character under the cursor with the character to the
- Xleft.
- X@tindex transpose-words
- X@kindex ESC-T
- X@kindex ESC-t
- X@item transpose-words (@key{ESC}-T @key{ESC}-t)
- XExchange the current word with the one before it.
- X@tindex vi-unindent
- X@kindex <
- X@item vi-unindent (unbound) (<)
- XUnindent a number of lines.
- X@tindex up-case-word
- X@kindex ESC-U
- X@kindex ESC-u
- X@item up-case-word (@key{ESC}-U @key{ESC}-u)
- XConvert the current word to all caps and move past it.
- X@tindex yank
- X@kindex CTRL-Y
- X@kindex P
- X@item yank (@ctrl{Y}) (P)
- XInsert the contents of the kill buffer at the cursor position.
- X@tindex yank-pop
- X@kindex ESC-y
- X@item yank-pop (@key{ESC}-y) (unbound)
- XRemove the text just yanked, rotate the kill-ring, and yank the new top.
- XOnly works following @code{yank} or @code{yank-pop}.
- X@tindex vi-yank
- X@kindex y
- X@item vi-yank (unbound) (y)
- XRead a movement command from the keyboard, and copy the region from the
- Xcursor position to the endpoint of the movement into the kill buffer.
- XIf the command is @code{vi-yank}, copy the current line.
- X@kindex Y
- X@tindex vi-yank-eol
- X@item vi-yank-eol (unbound) (Y)
- XCopy the region from the cursor position to the end of the line into the
- Xkill buffer.
- X@end table
- X
- X@node Arguments, Completion, Modifying Text, Zsh Line Editor
- X@section Arguments
- X
- X@table @code
- X@tindex digit-argument
- X@kindex ESC-0
- X@kindex ESC-9
- X@kindex 0
- X@kindex 9
- X@item digit-argument (@key{ESC}-0@dots{}@key{ESC}-9) (0-9)
- XStart a new numeric argument, or add to the current one.
- X@tindex universal-argument
- X@item universal-argument
- XMultiply the argument of the next command by 4.
- X@end table
- X
- X@node Completion, Miscellaneous, Arguments, Zsh Line Editor
- X@section Completion
- X
- X@table @code
- X@tindex accept-and-menu-complete
- X@item accept-and-menu-complete
- XIn a menu completion, insert the current completion into the buffer, and
- Xadvance to the next possible completion.
- X@tindex complete-word
- X@kindex \
- X@item complete-word (unbound) (\)
- XAttempt completion on the current word.
- X@tindex delete-char-or-list
- X@kindex CTRL-D
- X@item delete-char-or-list (@ctrl{D})
- XDelete the character under the cursor. If the cursor is at the end of
- Xthe line, list possible completions for the current word.
- X@tindex execute-named-cmd
- X@kindex ESC-x
- X@item execute-named-cmd (@key{ESC}-x)
- XRead the name of a editor command and execute it.
- X@tindex execute-last-named-cmd
- X@kindex ESC-z
- X@item execute-last-named-cmd (@key{ESC}-z)
- XRedo the last function executed
- Xwith @code{execute-named-cmd}.
- X@tindex expand-cmd-path
- X@item expand-cmd-path
- XExpand the current command to its full pathname.
- X@tindex expand-or-complete
- X@kindex TAB
- X@kindex CTRL-X
- X@item expand-or-complete (@key{TAB}) (@key{TAB} @ctrl{X})
- XAttempt shell expansion on the current word. If that fails, attempt
- Xcompletion.
- X@tindex expand-history
- X@kindex ESC-SPACE
- X@kindex ESC-!
- X@item expand-history (@key{ESC}-@key{SPACE} @key{ESC}-!)
- XPerform history expansion on the edit buffer.
- X@tindex expand-word
- X@kindex CTRL-X *
- X@item expand-word (@ctrl{X}*)
- XAttempt shell expansion on the current word.
- X@tindex list-choices
- X@kindex ESC-CTRL-D
- X@kindex CTRL-D
- X@kindex =
- X@item list-choices (@key{ESC}-@ctrl{D}) (@ctrl{D} =)
- XList possible completions for the current word.
- X@tindex list-expand
- X@kindex CTRL-X g
- X@kindex CTRL-X G
- X@kindex CTRL-G
- X@item list-expand (@ctrl{X}g @ctrl{X}G) (@ctrl{G})
- XList the expansion of the current word.
- X@tindex magic-space
- X@item magic-space
- XPerform history expansion and insert a space into the buffer. This is
- Xintended to be bound to space.
- X@tindex menu-complete
- X@pindex MENU_COMPLETE, use of
- X@item menu-complete
- XLike @code{complete-word}, except that menu completion is used.
- X@xref{Options}, for the @code{MENU_COMPLETE} option.@refill
- X@tindex menu-expand-or-complete
- X@item menu-expand-or-complete
- XLike @code{expand-or-complete}, except that menu completion is used.
- X@tindex reverse-menu-complete
- X@item reverse-menu-complete
- X@xref{Options}, for the @code{MENU_COMPLETE} option.
- X@end table
- X
- X@node Miscellaneous, , Completion, Zsh Line Editor
- X@section Miscellaneous
- X
- X@table @code
- X@tindex accept-and-hold
- X@kindex ESC-A
- X@kindex ESC-a
- X@item accept-and-hold (@key{ESC}-A @key{ESC}-a)
- XPush the contents of the buffer on the buffer stack and execute it.
- X@tindex accept-and-infer-next-history
- X@item accept-and-infer-next-history
- XExecute the contents of the buffer. Then search the history list for a
- Xline matching the current one and push the event following onto the
- Xbuffer stack.
- X@tindex accept-line
- X@kindex CTRL-J
- X@kindex CTRL-M
- X@item accept-line (@ctrl{J} @ctrl{M})
- XExecute the contents of the buffer.
- X@tindex accept-line-and-down-history
- X@kindex CTRL-O
- X@item accept-line-and-down-history (@ctrl{O})
- XExecute the current line, and push the next history event on the the
- Xbuffer stack.
- X@tindex vi-cmd-mode
- X@kindex CTRL-X CTRL-V
- X@kindex CTRL-[
- X@item vi-cmd-mode (@ctrl{X}@ctrl{V}) (@ctrl{[})
- XEnter command mode; that is, use the alternate keymap. Yes, this is
- Xbound by default in emacs mode.
- X@tindex vi-caps-lock-panic
- X@kindex H
- X@kindex K
- X@item vi-caps-lock-panic (unbound) (H K)
- XHang until any lowercase key is pressed. This is for @code{vi} users
- Xwithout the mental capacity to keep track of their caps lock key (like
- Xthe author).@refill
- X@tindex clear-screen
- X@kindex CTRL-L
- X@kindex ESC-CTRL-L
- X@item clear-screen (@ctrl{L} @key{ESC}-@ctrl{L})
- XClear the screen and redraw the prompt.
- X@tindex exchange-point-and-mark
- X@kindex CTRL-X CTRL-X
- X@item exchange-point-and-mark (@ctrl{X}@ctrl{X})
- XExchange the cursor position with the position of the mark.
- X@tindex get-line
- X@kindex ESC-G
- X@kindex ESC-g
- X@item get-line (@key{ESC}-G @key{ESC}-g)
- XPop the top line off the buffer stack and insert it at the cursor
- Xposition.
- X@tindex pound-insert
- X@kindex #
- X@pindex INTERACTIVE_COMMENTS, use of
- X@item pound-insert (unbound) (#)
- XIf there is no @code{#} character at the beginning of the current line,
- Xadd one. If there is one, remove it. In either case, accept the
- Xcurrent line. The @code{INTERACTIVE_COMMENTS} option must be set for
- Xthis to have any usefulness.@refill
- X@tindex push-line
- X@kindex CTRL-Q
- X@kindex ESC-Q
- X@kindex ESC-q
- X@item push-line (@ctrl{Q} @key{ESC}-Q @key{ESC}-q)
- XPush the current buffer onto the buffer stack and clear the buffer.
- XNext time the editor starts up, the buffer will be popped off the top of
- Xthe buffer stack and loaded into the editing buffer.
- X@tindex redisplay
- X@kindex CTRL-R
- X@item redisplay (unbound) (@ctrl{R})
- XRedisplays the edit buffer.
- X@tindex run-help
- X@kindex ESC-H
- X@kindex ESC-h
- X@item run-help (@key{ESC}-H @key{ESC}-h)
- XPush the buffer onto the buffer stack, and execute the command
- X@code{run-help @var{cmd}}, where @var{cmd} is the current command.
- X@code{run-help} is normally aliased to @code{man}.@refill
- X@tindex send-break
- X@kindex CTRL-C
- X@item send-break (@ctrl{C})
- XAbort the parsing of the current line.
- X@tindex vi-set-buffer
- X@kindex "
- X@item vi-set-buffer (unbound) (")
- XSpecify a buffer to be used in the following command.
- X@tindex vi-set-mark
- X@kindex m
- X@item vi-set-mark (unbound) (m)
- XSet the specified mark at the cursor position.
- X@tindex set-mark-command
- X@kindex CTRL-@@
- X@item set-mark-command (@ctrl{@@})
- XSet the mark at the cursor position.
- X@tindex spell-word
- X@kindex ESC-$
- X@kindex ESC-S
- X@kindex ESC-s
- X@item spell-word (@key{ESC}-$ @key{ESC}-S @key{ESC}-s)
- XAttempt spelling correction on the current word.
- X@tindex undefined-key
- X@item undefined-key
- XBeep.
- X@tindex undo
- X@kindex CTRL-_
- X@kindex CTRL-X CTRL-U
- X@kindex CTRL-X u
- X@kindex u
- X@item undo (@ctrl{_} @ctrl{X}@ctrl{U} @ctrl{X}u) (u)
- XIncrementally undo the last text modification.
- X@tindex which-command
- X@kindex ESC-?
- X@item which-command (@key{ESC}-?)
- XPush the buffer onto the buffer stack, and execute the command
- X@code{which-command @var{cmd}}, where @var{cmd} is the current command.
- X@code{which-command} is normally aliased to @code{whence}.
- X@end table
- X
- X@node Parameters, Options, Zsh Line Editor, Top
- X@chapter Parameters
- X@cindex parameters
- X
- X@findex typeset, use of
- X@findex set, use of
- X@noindent
- XA parameter has a name, a value, and a number of attributes. A name may
- Xbe any sequence of alphanumeric characters and @code{_}'s, or the single
- Xcharacters @code{*}, @code{@@}, @code{#}, @code{?}, @code{-}, @code{$},
- Xor @code{!}. The value may be either a @var{scalar} (a string), an
- Xinteger, or an array. To assign a scalar or integer value to a
- Xparameter, use the @code{typeset} builtin. To assign an array value,
- Xuse @samp{set -A @var{name} @var{value} @dots{}}. The value of a parameter
- Xmay also be assigned by writing:@refill
- X
- X@code{@var{name}=@var{value} @dots{}}
- X
- X@noindent
- XIf the integer attribute, @code{-i}, is set for @var{name}, the
- X@var{value} is subject to arithmetic evaluation.@refill
- X
- X@menu
- X* Array Parameters::
- X* Positional Parameters::
- X* Parameters Set By The Shell::
- X* Parameters Used By The Shell::
- X@end menu
- X
- X@node Array Parameters, Positional Parameters, , Parameters
- X@section Array Parameters
- X
- X@noindent
- XThe value of an array parameter may be assigned by writing:
- X
- X@var{name}=(@var{value} @dots{}) @dots{}
- X
- X@cindex array elements
- X@noindent
- XIndividual elements of an array may be selected using a subscript. A
- Xsubscript of the form @code{[@var{exp}]} selects the single element
- X@var{exp}, where @var{exp} is an arithmetic expression. The elements
- Xare numbered beginning with 1. A subscript of the form @code{[*]} or
- X@code{[@@]} evaluates to all elements of an array; there is no
- Xdifference between the two except when they appear within double quotes.
- X@samp{$foo[*]} evaluates to @samp{$foo[1] $foo[2] @dots{}}, while
- X@samp{$foo[@@]} evaluates to @samp{$foo[1]} @samp{$foo[2]}, etc. A
- Xsubscript of the form @code{[@var{exp1},@var{exp2}]} selects all
- Xelements in the range @var{exp1} to @var{exp2}, inclusive. If one of
- Xthe subscripts evaluates to a negative number, say @code{-@var{n}}, then
- Xthe @var{n}th element from the end of the array is used. Thus
- X@samp{$foo[-3]} is the third element from the end of the array
- X@code{foo}, and @samp{$foo[1,-1]} is the same as @samp{$foo[*]}.@refill
- X
- X@cindex substrings
- X@noindent
- XSubscripting may also be performed on non-array values, in which case
- Xthe subscripts specify a substring to be extracted. For example, if
- X@code{FOO} is set to @code{foobar}, then @code{echo $FOO[2,5]} prints
- X@code{ooba}.@refill
- X
- X@node Positional Parameters, Parameters Set By The Shell, Array Parameters, Parameters
- X@section Positional Parameters
- X
- X@noindent
- XPositional parameters are set by the shell on invocation, by the
- X@code{set} builtin, or by direct assignment. The parameter @var{n},
- Xwhere @var{n} is a number, is the @var{n}th positional parameter. The
- Xparameters @code{*}, @code{@@}, and @code{argv} are arrays containing all
- Xthe positional parameters; thus @code{argv[@var{n}]}, etc., is equivalent
- Xto simply @var{n}.@refill
- X
- X@node Parameters Set By The Shell, Parameters Used By The Shell, Positional Parameters, Parameters
- X@section Parameters Set By The Shell
- X
- X@noindent
- XThe following parameters are automatically set by the shell:
- X
- X@table @code
- X@vindex !
- X@item !
- XThe process id of the last background command invoked.
- X@vindex #
- X@item #
- XThe number of positional parameters in decimal.
- X@vindex ARGC
- X@item ARGC
- XSame as @code{#}.
- X@vindex $
- X@item $
- XThe process id of this shell.
- X@vindex -
- X@item -
- XFlags supplied to the shell on invocation or by the @code{set} or
- X@code{setopt} commands.
- X@vindex *
- X@item *
- XAn array containing the positional parameters.
- X@vindex argv
- X@item argv
- XSame as @code{*}.
- X@vindex @@
- X@item @@
- XSame as @code{argv[@@]}.
- X@vindex ?
- X@item ?
- XThe exit value returned by the last command.
- X@vindex status
- X@item status
- XSame as @code{?}.
- X@vindex _
- X@item _
- XThe last argument of the previous command. Also, this parameter is set
- Xin the environment of every command executed to the full pathname of the
- Xcommand.
- X@vindex ERRNO
- X@item ERRNO
- XThe value of errno as set by the most recently failed system call. This
- Xvalue is system dependent and is intended for debugging purposes.
- X@vindex GID
- X@item GID
- XThe group id of the shell process.
- X@vindex HOST
- X@item HOST
- XThe current hostname.
- X@vindex HOSTTYPE
- X@item HOSTTYPE
- XA string corresponding to the type of the host the shell is running on.
- X@vindex LINENO
- X@item LINENO
- XThe line number of the current line within the current script being
- Xexecuted.
- X@vindex OLDPWD
- X@item OLDPWD
- XThe previous working directory.
- X@vindex OPTARG
- X@item OPTARG
- XThe value of the last option argument processed by the @code{getopts}
- Xcommand.
- X@vindex OPTIND
- X@item OPTIND
- XThe index of the last option argument processed by the @code{getopts}
- Xcommand.
- X@vindex PPID
- X@item PPID
- XThe process id of the parent of the shell.
- X@vindex PWD
- X@item PWD
- XThe present working directory.
- X@vindex RANDOM
- X@item RANDOM
- XA random integer from 0 to 32767, newly generated each time this
- Xparameter is referenced. The random number generator can be seeded by
- Xassigning a numeric value to @code{RANDOM}.
- X@vindex SECONDS
- X@item SECONDS
- XThe number of seconds since shell invocation. If this parameter is
- Xassigned a value, then the value returned upon reference will be the
- Xvalue that was assigned plus the number of seconds since the assignment.
- X@vindex SHLVL
- X@item SHLVL
- XIncremented by one each time a new shell is started.
- X@vindex signals
- X@item signals
- XAn array containing the names of the signals.
- X@vindex TTY
- X@item TTY
- XThe name of the tty associated with the shell, if any.
- X@vindex UID
- X@item UID
- XThe user id of the shell process.
- X@vindex USERNAME
- X@item USERNAME
- X@vindex LOGNAME
- X@itemx LOGNAME
- XThe username corresponding to the user id of the shell process.
- X@vindex VERSION
- X@item VERSION
- XThe version number of this @code{zsh}.
- X@end table
- X
- X@node Parameters Used By The Shell, , Parameters Set By The Shell, Parameters
- X@section Parameters Used By The Shell
- X
- X@noindent
- XThe following parameters are used by the shell:
- X
- X@table @code
- X@vindex BAUD
- X@item BAUD
- XThe baud rate of the current connection. Used by the line editor update
- Xmechanism to compensate for a slow terminal by delaying updates until
- Xnecessary. This may be profitably set to a lower value in some
- Xcircumstances, e.g. for slow modems dialing into a communications server
- Xwhich is connected to a host via a fast link; in this case, this
- Xvariable would be set by default to the speed of the fast link, and not
- Xthe modem. This parameter should be set to the baud rate of the slowest
- Xpart of the link for best performance.
- X@vindex bindcmds
- X@item bindcmds
- XAn write-only array of command names which take line editor function
- Xnames as arguments, and which therefore should allow binding completion.
- X@vindex cdpath
- X@vindex CDPATH
- X@item cdpath (CDPATH)
- XAn array (colon-separated list) of directories specifying the search
- Xpath for the @code{cd} command.
- X@vindex COLUMNS
- X@item COLUMNS
- XThe number of columns for this terminal session. Used for printing
- Xselect lists and for the line editor.
- X@vindex DIRSTACKSIZE
- X@pindex AUTO_PUSHD, use of
- X@item DIRSTACKSIZE
- XThe maximum size of the directory stack. If the stack gets larger than
- Xthis, it will be truncated automatically. This is useful with the
- X@code{AUTO_PUSHD} option.
- X@vindex FCEDIT
- X@item FCEDIT
- XThe default editor for the @code{fc} builtin.
- X@vindex fignore
- X@vindex FIGNORE
- X@item fignore (FIGNORE)
- XAn array (colon-separated list) containing the suffixes of files to be
- Xignored during filename completion.
- X@vindex fpath
- X@vindex FPATH
- X@item fpath (FPATH)
- XAn array (colon-separated list) of directories specifying the search
- Xpath for function definitions. This path is searched when a function
- Xwith the @code{-u} attribute is referenced. If an executable file is
- Xfound, then it is read and executed in the current environment.
- X@vindex HISTCHARS
- X@item HISTCHARS
- XThree characters used by the shell's history and lexical analysis
- Xmechanism. The first character signals the start of a history
- Xsubstitution (default @code{!}). The second character signals the start
- Xof a quick history substitution (default @code{^}). The third character
- Xis the comment character (default @code{#}).@refill
- X@vindex HISTFILE
- X@item HISTFILE
- XThe file to save the history in when an interactive shell exits. If
- Xunset, the history is not saved.
- X@vindex HISTSIZE
- X@item HISTSIZE
- XThe maximum size of the history list.
- X@vindex HOME
- X@item HOME
- XThe default argument for the @code{cd} command.
- X@vindex hostcmds
- X@item hostcmds
- XAn write-only array of command names which take hostnames as arguments,
- Xand which should therefore allow hostname completion. This sort of
- Xcompletion is also used in words containing a @code{@@} character.
- X@vindex hosts
- X@vindex HOSTS
- X@item hosts (HOSTS)
- XAn array (colon-separated list) of hostnames to use for hostname
- Xcompletion.
- X@vindex IFS
- X@item IFS
- XInternal field separators, normally space, tab, and newline, that are
- Xused to separate words which result from command or parameter
- Xsubstitution and words read by the @code{read} builtin.
- X@vindex LINES
- X@item LINES
- XThe number of lines for this terminal session. Used for printing select
- Xlists and for the line editor.
- X@vindex LISTMAX
- X@item LISTMAX
- XIn the line editor, the number of filenames to list without asking
- Xfirst.
- X@vindex LITHISTSIZE
- X@item LITHISTSIZE
- XThe maximum size of the literal history list (before history expansion).
- X@vindex LOGCHECK
- X@item LOGCHECK
- XThe interval in seconds between checks for login/logout activity using
- Xthe @code{watch} parameter.
- X@vindex MAIL
- X@item MAIL
- XIf this parameter is set and @code{mailpath} is not set, the shell looks
- Xfor mail in the specified file.
- X@vindex MAILCHECK
- X@item MAILCHECK
- XThe interval in seconds between checks for new mail.
- X@vindex mailpath
- X@vindex MAILPATH
- X@item mailpath (MAILPATH)
- XAn array (colon-separated list) of filenames to check for new mail.
- XEach filename can be followed by a @code{?} and a message that will be
- Xprinted. The sequence @code{$_} in the message will be replaced by the
- Xname of the mail file. The default message is @samp{You have new
- Xmail}.@refill
- X@vindex manpath
- X@vindex MANPATH
- X@item manpath (MANPATH)
- XAn array (colon-separated list) whose value is not used by the shell.
- XThe @code{manpath} array can be useful, however, since setting it also
- Xsets @code{MANPATH}, and vice versa.
- X@vindex NULLCMD
- X@item NULLCMD
- XThe command name to assume if a redirection is specified with no
- Xcommand. Defaults to @code{cat}. For sh/ksh-like behavior, change this
- Xto @code{:}. For csh-like behavior, unset this parameter; the shell will
- Xprint an error message if null commands are entered.
- X@vindex optcmds
- X@item optcmds
- XAn write-only array of commands which take options as arguments, and
- Xwhich therefore should allow option completion.
- X@vindex path
- X@vindex PATH
- X@item path (PATH)
- XAn array (colon-separated list) of directories to search for commands.
- XWhen this parameter is set, each directory is scanned and all files
- Xfound are put in a hash table.
- X@vindex POSTEDIT
- X@item POSTEDIT
- XThis string is output whenever the line editor exits. It usually
- Xcontains termcap strings to reset the terminal.
- X@vindex PROMPT
- X@item PROMPT
- XThe primary prompt string, printed before a command is read; the default
- Xis @samp{%m%# }. If the escape sequence takes an optional
- Xinteger, it should appear between the @samp{%} and the next character of the
- Xsequence. The following escape sequences are recognized:
- X
- X@table @code
- X@item %d, %/
- XPresent working directory (@code{$PWD}).
- X@item %~
- X@code{$PWD}. If it has a named directory as its prefix, that part is
- Xreplaced by a @code{~} followed by the name of the directory. If it
- Xstarts with @code{$HOME}, that part is replaced by a @code{~}.@refill
- X@item %c, %, %C
- XTrailing component of @code{$PWD}. An integer may follow the @samp{%} to get
- Xmore than one component. Unless @code{%C} is used, tilde expansion is
- Xperformed first.@refill
- X@item !, %h, %!
- XCurrent history event number
- X@item %M
- XThe full machine hostname.
- X@item %m
- XThe hostname up to the first @samp{.}. An integer may follow the @samp{%} to
- Xspecify how many components of the hostname are desired.@refill
- X@item %S (%s)
- XStart (stop) standout mode.
- X@item %U (%u)
- XStart (stop) underline mode.
- X@item %B (%b)
- XStart (stop) boldface mode.
- X@item %t
- X@itemx %@@
- XCurrent time of day, in 12-hour, am/pm format.
- X@item %T
- XCurrent time of day, in 24-hour format.
- X@item %*
- XCurrent time of day in 24-hour format, with seconds.
- X@item %n
- X@code{$USERNAME}.
- X@item %w
- XThe date in day-dd format.
- X@item %W
- XThe date in mm/dd/yy format.
- X@item %D
- XThe date in yy-mm-dd format.
- X@item %D @{@var{string}@}
- X@var{string} is formatted using the @code{strftime} function. See
- X@code{strftime(3)} for more details, if your system has it.@refill
- X@item %l
- XThe line (tty) the user is logged in on.
- X@item %?
- XThe return code of the last command executed just before the prompt.
- X@item %#
- XA @code{#} if the shell is running as root, a @code{%} if not.
- X@item %v
- XThe value of the first element of the @code{psvar} array
- Xparameter. Following the @samp{%} with an integer gives that element
- Xof the array.@refill
- X@item %@{@dots{}%@}
- XInclude a string as a literal escape sequence. The string within the
- Xbraces should not change the cursor position.
- X@end table
- X
- X@vindex PROMPT2
- X@item PROMPT2
- XThe secondary prompt, printed when the shell needs more information to
- Xcomplete a command. Recognizes the same escape sequences as
- X@code{PROMPT}. The default is @samp{> }.@refill
- X@vindex PROMPT3
- X@item PROMPT3
- XSelection prompt used within a @code{select} loop. Recognizes the same
- Xescape sequences as @code{PROMPT}. The default is @samp{?# }.@refill
- X@vindex PROMPT4
- X@item PROMPT4
- XThe execution trace prompt. Default is @samp{+ }.
- X@vindex PS1
- X@vindex PS2
- X@vindex PS3
- X@vindex PS4
- X@item PS1, PS2, PS3, PS4
- XSame as @code{PROMPT}, @code{PROMPT2}, @code{PROMPT3}, and @code{PROMPT4},
- Xrespectively.@refill
- X@vindex psvar
- X@vindex PSVAR
- X@item psvar (PSVAR)
- XAn array (colon-separated list) whose first nine values can be used in
- X@code{PROMPT} strings. Setting @code{psvar} also sets @code{PSVAR}, and vice
- Xversa.
- X@vindex prompt
- X@item prompt
- XSame as @code{PROMPT}.
- X@vindex READNULLCMD
- X@item READNULLCMD
- XThe command name to assume if a single input redirection is specified
- Xwith no command. Defaults to @code{more}.
- X@vindex REPORTTIME
- X@item REPORTTIME
- XIf nonzero, commands whose combined user and system execution times
- X(measured in seconds) are greater than this value have timing statistics
- Xprinted for them.
- X@vindex RPROMPT
- X@vindex RPS1
- X@item RPROMPT, RPS1
- XThis prompt is displayed on the right-hand side of the screen when the
- Xprimary prompt is being displayed on the left. This does not work if
- Xthe @code{SINGLE_LINE_ZLE} option is set. Recognizes the same escape
- Xsequences as @code{PROMPT}, except that termcap sequences like
- X@code{%s}, etc., will not work.@refill
- X@vindex SAVEHIST
- X@item SAVEHIST
- XThe maximum number of history events to save in the history file.
- X@vindex SPROMPT
- X@item SPROMPT
- XThe prompt used for spelling correction. The sequence @code{%R} expands
- Xto the string which presumably needs spelling correction, and @code{%r}
- Xexpands to the proposed correction. All other @code{PROMPT} escapes are
- Xalso allowed.@refill
- X@vindex STTY
- X@item STTY
- XIf this parameter is set in a command's environment, the shell runs the
- X@code{stty} command with the value of this parameter as arguments in
- Xorder to set up the terminal before executing the command.@refill
- X@vindex TIMEFMT
- X@item TIMEFMT
- XThe format of process time reports with the @code{time} keyword. The
- Xdefault is @samp{%E real %U user %S system %P}. Recognizes the
- Xfollowing escape sequences:@refill
- X
- X@table @code
- X@item %U
- XCPU seconds spent in user mode.
- X@item %S
- XCPU seconds spent in kernel mode.
- X@item %E
- XElapsed time in seconds.
- X@item %P
- XThe CPU percentage, computed as (%U+%S)/%E.
- X@item %W
- XNumber of times the process was swapped.
- X@item %X
- XThe average amount in (shared) text space used in Kbytes.
- X@item %D
- XThe average amount in (unshared) data/stack space used in Kbytes.
- X@item %K
- XThe total space used (%X+%D) in Kbytes.
- X@item %M
- XThe maximum memory the process had in use at any time in Kbytes.
- X@item %F
- XThe number of major page faults (page needed to be brought from
- Xdisk).@refill
- X@item %R
- XThe number of minor page faults.
- X@item %I
- XThe number of input operations.
- X@item %O
- XThe number of output operations.
- X@item %r
- XThe number of socket messages received.
- X@item %s
- XThe number of socket messages sent.
- X@item %k
- XThe number of signals received.
- X@item %w
- XNumber of voluntary context switches (waits).
- X@item %c
- XNumber of involuntary context switches.
- X@item %J
- XThe name of this job.
- X@end table
- X
- X@vindex TMOUT
- X@item TMOUT
- XIf this parameter is nonzero, the shell will terminate if a command is
- Xnot entered within the specified number of seconds after issuing a
- Xprompt.
- X@vindex TMPPREFIX
- X@item TMPPREFIX
- XA pathname prefix which the shell will use for all temporary files.
- X@vindex varcmds
- X@item varcmds
- XAn write-only array of command names which take parameter names as
- Xarguments, and which therefore should allow parameter completion.
- X@vindex watch
- X@vindex WATCH
- X@item watch (WATCH)
- XAn array (colon-separated list) of login/logout events to report. If it
- Xcontains the single word @samp{all}, then all login/logout events are
- Xreported. If it contains the single word @samp{notme}, then all
- Xlogin/logout events are reported except for those originating from
- X@code{$USERNAME}. An entry in this list may consist of a username, an
- X@code{@@} followed by a remote hostname, and a @code{%} followed by a
- Xline (tty). Any or all of these components may be present in an entry;
- Xif a login/logout event matches all of them, it is reported.@refill
- X@vindex WATCHFMT
- X@item WATCHFMT
- XThe format of login/logout reports if the @code{watch} parameter is set.
- XDefault is @samp{%n has %a %l from %m}. Recognizes the following escape
- Xsequences:@refill
- X
- X@table @code
- X@item %n
- XThe name of the user that logged in/out.
- X@item %a
- XThe observed action, i.e. @samp{logged on} or @samp{logged off}.
- X@item %l
- XThe line (tty) the user is logged in on.
- X@item %M
- XThe full hostname of the remote host.
- X@item %m
- XThe hostname up to the first @samp{.}. If only the ip address is
- Xavailable or the utmp field contains the name of an X-windows display,
- Xthe whole name is printed.@refill
- X@item %S (%s)
- XStart (stop) standout mode.
- X@item %U (%u)
- XStart (stop) underline mode.
- X@item %B (%b)
- XStart (stop) boldface mode.
- X@item %t
- X@itemx %@@
- XThe time, in 12-hour, am/pm format.
- X@item %T
- XThe time, in 24-hour format.
- X@item %w
- XThe date in day-dd format.
- X@item %W
- XThe date in mm/dd/yy format.
- X@item %D
- XThe date in yy-mm-dd format.
- X@end table
- X
- X@vindex WORDCHARS
- X@item WORDCHARS
- XA list of nonalphanumeric characters considered part of a word by the
- Xline editor.
- X@vindex ZDOTDIR
- X@item ZDOTDIR
- XThe directory to search for shell startup files (@file{.zshrc}, etc), if
- Xnot @code{$HOME}.@refill
- X@end table
- X
- X@node Options, Shell Builtin Commands, Parameters, Top
- X@chapter Options
- X@cindex options
- X
- X@noindent
- XThe following options may be set upon invocation of the shell, or with
- Xthe @code{set} or @code{setopt} builtins:@refill
- X
- X@table @code
- X@cindex export, automatic
- X@pindex ALLEXPORT
- X@item ALLEXPORT (-a)
- END_OF_FILE
- if test 49503 -ne `wc -c <'doc/zsh.texi.02'`; then
- echo shar: \"'doc/zsh.texi.02'\" unpacked with wrong size!
- fi
- # end of 'doc/zsh.texi.02'
- fi
- echo shar: End of archive 4 \(of 22\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 22 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-
- exit 0 # Just in case...
-