home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume35
/
zsh
/
part09
< prev
next >
Wrap
Text File
|
1993-02-20
|
56KB
|
1,567 lines
Newsgroups: comp.sources.misc
From: zsh-list@cs.uow.edu.au (The Zsh Mailing List)
Subject: v35i059: zsh - The Z Shell, version 2.3.1, Part09/22
Message-ID: <1993Feb20.212327.28656@sparky.imd.sterling.com>
X-Md4-Signature: 50d3799c4daf3fbce7f4a0e35ae074ae
Date: Sat, 20 Feb 1993 21:23:27 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: zsh-list@cs.uow.edu.au (The Zsh Mailing List)
Posting-number: Volume 35, Issue 59
Archive-name: zsh/part09
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: doc/zsh.texi.03 scripts/c2z
# Wrapped by mattson@odin on Sat Feb 6 14:41:53 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 9 (of 22)."'
if test -f 'doc/zsh.texi.03' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/zsh.texi.03'\"
else
echo shar: Extracting \"'doc/zsh.texi.03'\" \(48882 characters\)
sed "s/^X//" >'doc/zsh.texi.03' <<'END_OF_FILE'
XAll parameters subsequently defined are automatically exported.
X@cindex history, appending to file
X@pindex APPEND_HISTORY
X@item APPEND_HISTORY
XIf this is set, zsh sessions will append their history list to the
Xhistory file, rather than overwrite it. Thus, multiple parallel zsh
Xsessions will all have their history lists added to the history file, in
Xthe order they are killed. @xref{Shell Builtin Commands}, for the
X@code{fc} command.@refill
X@cindex cd, automatic
X@pindex AUTO_CD
X@item AUTO_CD (-J)
XIf a command is not in the hash table, and there exists an executable
Xdirectory by that name, perform the @code{cd} command to that directory.
X@cindex completion, listing choices
X@pindex AUTO_LIST
X@item AUTO_LIST (-9)
XAutomatically list choices on an ambiguous completion.
X@cindex completion, menu, on TAB
X@pindex AUTO_MENU
X@item AUTO_MENU
XAutomatically use menu completion if the @key{TAB} key is pressed
Xrepeatedly.@refill
X@cindex cd, behaving like pushd
X@cindex pushd, making cd behave like
X@pindex AUTO_PUSHD
X@item AUTO_PUSHD (-N)
XMake @code{cd} act like @code{pushd}.
X@cindex slash, removing trailing
X@pindex AUTO_REMOVE_SLASH
X@item AUTO_REMOVE_SLASH
XWhen the last character resulting from a completion is a slash and the next
Xcharacter typed is a word delimiter, remove the slash.
X@cindex jobs, resuming automatically
X@cindex resuming jobs automatically
X@pindex AUTO_RESUME
X@item AUTO_RESUME (-W)
XTreat single word simple commands without redirection as candidates for
Xresumption of an existing job.
X@cindex jobs, background priority
X@cindex background jobs, priority of
X@pindex BGNICE
X@item BGNICE (-6)
XRun all background jobs at a lower priority. This option is set by
Xdefault.
X@cindex brace expansion, extending
X@cindex expansion, brace, extended
X@pindex BRACECCL
X@item BRACECCL
XAllow brace expansions of the form @code{@{a-zA-Z@}}, etc.
X@cindex cd, to parameter
X@pindex CDABLEVARS
X@item CDABLEVARS (-T)
XIf the argument to a @code{cd} command is not a directory, but a
Xparameter exists by the same name whose value begins with a @code{/},
Xtry to change to the directory specified by the parameter's
Xvalue.@refill
X@cindex links, symbolic
X@cindex symbolic links
X@pindex CHASELINKS
X@item CHASELINKS (-w)
XResolve symbolic links to their true values.
X@cindex correction, spelling
X@cindex spelling correction
X@pindex CORRECT
X@item CORRECT (-0)
XTry to correct the spelling of commands.
X@pindex CORRECT_ALL
X@item CORRECT_ALL (-O)
XTry to correct the spelling of all arguments in a line.
X@cindex csh, loop style
X@cindex loop style, csh
X@pindex CSH_JUNKIE_LOOPS
X@item CSH_JUNKIE_LOOPS
XAllow loop bodies to take the form @samp{@var{list}; end} instead of
X@samp{do @var{list}; done}.
X@cindex csh, quoting style
X@cindex quoting style, csh
X@pindex CSH_JUNKIE_QUOTES
X@item CSH_JUNKIE_QUOTES
XComplain if a quoted expression runs off the end of a line; prevent
Xquoted expressions from containing unescaped newlines.
X@cindex csh, null globbing style
X@cindex null globbing, csh style
X@cindex globbing, null, csh style
X@pindex CSH_NULL_GLOB
X@item CSH_NULL_GLOB
XIf a pattern for filename generation has no matches, delete the pattern
Xfrom the argument list; do not report an error unless all the patterns
Xin a command have no matches. Overrides @code{NULL_GLOB}.
X@cindex exit status, trapping
X@pindex ERREXIT
X@item ERREXIT (-e)
XIf a command has a non-zero exit status, execute the @code{ERR} trap, if
Xset, and exit.
X@cindex globbing, extended
X@pindex EXTENDED_GLOB
X@item EXTENDED_GLOB
XTreat the @code{#} and @code{^} characters as part of patterns for
Xfilename generation, etc.@refill
X@cindex history, timestamping
X@pindex EXTENDED_HISTORY
X@item EXTENDED_HISTORY
XSave beginning and ending timestamps to the history file. The format of
Xthese timestamps is @code{:@var{beginning time}:@var{ending
Xtime}:@var{command}}.@refill
X@pindex GLOB_COMPLETE
X@item GLOB_COMPLETE
XLike @code{MENU_COMPLETE}, except that the current word is expanded
Xusing normal shell expansion instead of completion. If no matches are
Xfound, a @code{*} is added to the end of the word, and expansion is
Xattempted again.@refill
X@cindex globbing, of . files
X@pindex GLOB_DOTS
X@item GLOB_DOTS (-4)
XDo not require a leading @code{.} in a filename to be matched
Xexplicitly.@refill
X@cindex hashing, of commands
X@cindex command hashing
X@pindex HASH_CMDS
X@item HASH_CMDS
XPlace the location of each command in the hash table the first time it
Xis executed. If this option is unset, no path hashing will be done at
Xall.
X@cindex hashing, of directories
X@cindex directories, hashing
X@pindex HASH_DIRS
X@item HASH_DIRS
XWhenever a command is executed, hash the directory containing it, as
Xwell as all directories that occur earlier in the path. Has no effect
Xif @code{HASH_CMDS} is unset.
X@pindex HASH_LIST_ALL
X@item HASH_LIST_ALL
XWhenever a command completion is attempted, make sure the entire command
Xpath is hashed first. This makes the first completion slower.
X@cindex history, ignoring duplicates
X@pindex HIST_IGNORE_DUPS
X@item HIST_IGNORE_DUPS (-h)
XDo not enter command lines into the history list if they are duplicates
Xof the previous event.
X@cindex history, ignoring spaces
X@pindex HIST_IGNORE_SPACE
X@item HIST_IGNORE_SPACE (-g)
XDo not enter command lines into the history list if they begin with a
Xblank.
X@cindex history, storing as literal
X@pindex HIST_LIT
X@item HIST_LIT (-j)
XUse literal (unparsed) versions of the history lines in the editor.
X@pindex HIST_NO_STORE
X@item HIST_NO_STORE
XRemove the @code{history} (@code{fc} @code{-l}) command from the history
Xwhen invoked.
X@cindex history, verifying substitution
X@pindex HIST_VERIFY
X@item HIST_VERIFY
XWhenever the user enters a line with history substitution, don't execute
Xthe line directly; instead, perform history substitution and reload the
Xline into the editing buffer.
X@cindex brace expansion, disabling
X@cindex expansion, brace, disabling
X@cindex disabling brace expansion
X@pindex IGNORE_BRACES
X@item IGNORE_BRACES (-I)
XDo not perform brace expansion.
X@cindex EOF, ignoring
X@pindex IGNOR_EEOF
X@item IGNORE_EOF (-7)
XDo not exit on end-of-file. Require the use of @code{exit} or
X@code{logout} instead.@refill
X@pindex INTERACTIVE
X@item INTERACTIVE (-i)
XThis is an interactive shell.
X@cindex comments, in interactive shells
X@pindex INTERACTIVE_COMMENTS
X@item INTERACTIVE_COMMENTS (-k)
XAllow comments even in interactive shells.
X@cindex ksh, option printing style
X@cindex option printing, ksh style
X@pindex KSH_OPTION_PRINT
X@item KSH_OPTION_PRINT
XAlters the way options settings are printed.
X@cindex files, marking type of
X@cindex marking file types
X@pindex LIST_TYPES
X@item LIST_TYPES (-X)
XWhen listing files that are possible completions, show the type of each
Xfile with a trailing identifying mark.
X@pindex LOGIN
X@item LOGIN (-l)
XThis is a login shell.
X@cindex jobs, list format
X@cindex list format, of jobs
X@pindex LONG_LIST_JOBS
X@item LONG_LIST_JOBS (-R)
XList jobs in the long format by default.
X@cindex mail, warning of arrival
X@pindex MAIL_WARNING
X@item MAIL_WARNING (-U)
XPrint a warning message if a mail file has been accessed since the shell
Xlast checked.
X@cindex directories, marking
X@cindex marking directories
X@pindex MARK_DIRS
X@item MARK_DIRS (-8)
XAppend a trailing @code{/} to all directory names resulting from filename
Xgeneration (globbing).@refill
X@cindex completion, menu
X@pindex MENU_COMPLETE
X@item MENU_COMPLETE (-Y)
XOn an ambiguous completion, instead of listing possibilities, insert the
Xfirst match. Then when completion is requested again, remove the first
Xmatch and insert the second match, etc. When there are no more matches,
Xgo back to the first one again. @code{reverse-menu-complete} may be
Xused to loop through the list in the other direction.@refill
X@cindex beep, menu completion
X@pindex MENU_COMPLETE_BEEP
X@item MENU_COMPLETE_BEEP
XBeep on an ambiguous menu completion.
X@cindex job control, allowing
X@pindex MONITOR
X@item MONITOR (-m)
XAllow job control. Set by default in interactive shells.
X@cindex globbing, malformed pattern
X@pindex NO_BAD_PATTERN
X@item NO_BAD_PATTERN (-2)
XIf a pattern for filename generation is badly formed, leave it unchanged
Xin the argument list instead of printing an error.
X@cindex history, disabling substitution
X@cindex disabling history substitution
X@pindex NO_BANG_HIST
X@item NO_BANG_HIST (-K)
XDo not perform textual history substitution. Do not treat the @code{!}
Xcharacter specially.
X@cindex beep, disabling
X@cindex disabling the beep
X@pindex NO_BEEP
X@item NO_BEEP (-B)
XDo not beep.
X@cindex file clobbering, preventing
X@cindex clobbering, of files
X@pindex NO_CLOBBER
X@item NO_CLOBBER (-1)
XPrevents @code{>} redirection from truncating existing files. @code{>!}
Xmay be used to truncate a file instead. Also prevents @code{>>} from
Xcreating files. @code{>>!} may be used instead.@refill
X@cindex filename substitution, =
X@pindex NO_EQUALS
X@item NO_EQUALS
XDon't perform @code{=} filename substitution.
X@cindex command execution, preventing
X@pindex NO_EXEC
X@item NO_EXEC (-n)
XRead commands and check them for syntax errors, but do not execute them.
X@cindex globbing, disabling
X@cindex disabling globbing
X@pindex NO_GLOB
X@item NO_GLOB (-F)
XDisable filename generation.
X@cindex history, beeping
X@cindex beep, history
X@pindex NO_HIST_BEEP
X@item NO_HIST_BEEP
XDon't beep when an attempt is made to access a history entry which isn't
Xthere.
X@cindex jobs, nohup
X@pindex NO_HUP
X@item NO_HUP
XDon't send the @code{HUP} signal to running jobs when the shell exits.
X@cindex completion, beep on ambiguous
X@cindex beep, ambiguous completion
X@pindex NO_LIST_BEEP
X@item NO_LIST_BEEP
XDon't beep on an ambiguous completion.
X@cindex globbing, no matches
X@pindex NO_NOMATCH
X@item NO_NOMATCH (-3)
XIf a pattern for filename generation has no matches, leave it unchanged
Xin the argument list instead of printing an error.
X@cindex prompt, without CR
X@pindex NO_PROMPT_CR
X@item NO_PROMPT_CR (-V)
XDon't print a carriage return just before printing a prompt in the line
Xeditor.
X@cindex startup files, sourcing
X@pindex NO_RCS
X@item NO_RCS (-f)
XSource only the @file{/etc/zshenv} file.
XDo not source the @file{.zshenv}, @file{/etc/zprofile}, @file{.zprofile},
X@file{/etc/zshrc}, @file{.zshrc}, @file{/etc/zlogin}, @file{.zlogin}, or
X@file{.zlogout} files.@refill
X@pindex NO_SHORT_LOOPS
X@item NO_SHORT_LOOPS
XDisallow the short forms of @code{for}, @code{select}, @code{if}, and
X@code{function} constructs.@refill
X@cindex background jobs, notification
X@cindex notification of background jobs
X@pindex NOTIFY
X@item NOTIFY (-5)
XReport the status of background jobs immediately, rather than waiting
Xuntil just before printing a prompt.
X@cindex parameters, error on substituting unset
X@cindex unset parameters, error on substituting
X@pindex NO_UNSET
X@item NO_UNSET (-u)
XTreat unset parameters as an error when substituting.
X@cindex globbing, no matches
X@pindex NULL_GLOB
X@item NULL_GLOB (-G)
XIf a pattern for filename generation has no matches, delete the pattern
Xfrom the argument list instead of reporting an error. Overrides
X@code{NO_NOMATCH}.@refill
X@cindex sorting, numerically
X@pindex NUMERIC_GLOBSORT
X@item NUMERIC_GLOBSORT
XIf numeric filenames are matched by a filename generation pattern, sort
Xthe filenames numerically rather than lexicographically.
X@cindex editor, overstrike mode
X@cindex overstrike mode, of editor
X@pindex OVERSTRIKE
X@item OVERSTRIKE
XStart up the line editor in overstrike mode.
X@cindex path search, extended
X@pindex PATH_DIRS
X@item PATH_DIRS (-Q)
XPerform a path search even on command names with slashes in them. Thus
Xif @*@samp{/usr/local/bin} is in the user's path, and he types
X@samp{X11/xinit}, the command @samp{/usr/local/bin/X11/xinit} will be
Xexecuted (assuming it exists).@refill
X@cindex exit status, printing
X@pindex PRINT_EXIT_VALUE
X@item PRINT_EXIT_VALUE (-C)
XPrint the exit value of programs with non-zero exit status.
X@cindex directory stack, ignoring dups
X@pindex PUSHD_IGNORE_DUPS
X@item PUSHD_IGNORE_DUPS
XDon't push multiple copies of the same directory onto the directory
Xstack.
X@cindex popd, controlling syntax
X@pindex PUSHD_MINUS
X@item PUSHD_MINUS
X@xref{Shell Builtin Commands}, for the @code{popd} command.
X@cindex directory stack, silencing
X@pindex PUSHD_SILENT
X@item PUSHD_SILENT (-E)
XDo not print the directory stack after @code{pushd} or @code{popd}.
X@cindex pushd, to home
X@pindex PUSHD_TO_HOME
X@item PUSHD_TO_HOME (-D)
XHave @code{pushd} with no arguments act like @code{pushd $HOME}.
X@pindex RC_EXPAND_PARAM
X@item RC_EXPAND_PARAM (-P)
X@xref{Parameter Expansion}.
X@cindex rc, quoting style
X@cindex quoting style, rc
X@pindex RC_QUOTES
X@item RC_QUOTES
XAllow the character sequence @code{''} to signify a single quote within
Xsingly quoted strings.
X@cindex completion, exact matches
X@pindex RECEXACT
X@item RECEXACT (-S)
XIn completion, recognize exact matches even if they are ambiguous.
X@cindex rm *, querying before
X@cindex querying before rm *
X@pindex RMSTARSILENT
X@item RMSTARSILENT (-H)
XDo not query the user before executing @code{rm *} or @code{rm path/*}.
X@pindex SHINSTDIN
X@item SHINSTDIN (-s)
XRead commands from the standard input.
X@cindex sh, word splitting style
X@cindex word splitting, sh style
X@pindex SH_WORD_SPLIT
X@item SH_WORD_SPLIT (-y)
X@xref{Parameter Expansion}.
X@cindex editor, single line mode
X@pindex SINGLE_LINE_ZLE
X@item SINGLE_LINE_ZLE (-M)
XUse single-line command line editing instead of multi-line.
X@cindex sun keyboard, annoying
X@cindex annoying keyboard, sun
X@pindex SUN_KEYBOARD_HACK
X@item SUN_KEYBOARD_HACK (-L)
XIf a line ends with a backquote, and there are an odd number of
Xbackquotes on the line, ignore the trailing backquote. This is useful
Xon some keyboards where the return key is too small, and the backquote
Xkey lies annoyingly close to it.
X@cindex tracing, of input lines
X@pindex VERBOSE
X@item VERBOSE (-v)
XPrint shell input lines as they are read.
X@cindex tracing, of commands
X@pindex XTRACE
X@item XTRACE (-x)
XPrint commands and their arguments as they are executed.
X@cindex editor, disabling
X@cindex disabling the editor
X@pindex ZLE
X@item ZLE (-Z)
XUse the zsh line editor.
X@end table
X
X@node Shell Builtin Commands, Invocation, Options, Top
X@chapter Shell Builtin Commands
X@cindex builtin commands
X
X@table @code
X@findex .
X@item . @var{file} [ @var{arg} @dots{} ]
XRead and execute commands from @var{file} in the current shell
Xenvironment. If @var{file} does not contain a slash, the shell looks in
Xthe components of @code{path} to find the directory containing
X@var{file}. If any arguments @var{arg} are given, they become the
Xpositional parameters; the old positional parameters are restored when
Xthe @var{file} is done executing. The exit status is the exit status of
Xthe last command executed.@refill
X
X@cindex parameters, expanding
X@cindex expanding parameters
X@item : [ @var{arg} @dots{} ]
XThis command only expands parameters. A zero exit code is returned.
X
X@cindex alias
X@findex alias
X@item alias [ @code{-g} ] [ @var{name}[=@var{value}]] @dots{}
XWith no arguments, print the list of aliases in the form
X@code{@var{name}=@var{value}} on the standard output. For each
X@var{name} with a corresponding @var{value}, define an alias with that
Xvalue. A trailing space in @var{value} causes the next word to be
Xchecked for alias substitution. If the @code{-g} flag is present,
Xdefine a global alias; global aliases are expanded even if they do not
Xoccur in command position. For each @var{name} with no @var{value},
Xprint the value of @var{name}, if any. The exit status is nonzero if a
X@var{name} (with no @var{value}) given for which no alias has been
Xdefined.@refill
X
X@cindex functions, autoloading
X@cindex autoloading functions
X@findex autoload
X@item autoload [ @var{name} @dots{} ]
XFor each of the @var{name}s (which are names of functions), create a
Xfunction marked undefined. The @code{fpath} variable will be searched
Xto find the actual function definition when the function is first
Xreferenced.@refill
X
X@findex bg
X@item bg [ @var{job} @dots{} ]
X@itemx @var{job} @dots{} @code{&}
XPut each specified @var{job} in the background, or the current job if
Xnone is specified.
X
X@cindex rebinding the keys
X@cindex keys, rebinding
X@findex bindkey
X@item bindkey -mevd
X@itemx bindkey @code{-r} @var{in-string} @dots{}
X@itemx bindkey [ @code{-a} ] @var{in-string} [ @var{command} ] @dots{}
X@itemx bindkey @code{-s} [ @code{-a} ] @var{in-string} @var{out-string} @dots{}
XIf one of the @code{-e}, @code{-v}, or @code{-d} options is given, reset
Xthe keymaps for emacs mode, vi mode, or the default mode, respectively;
Xif the @code{-m} option is also given, allow the use of a meta key. If
Xthe @code{-r} option is given, remove any binding for each
X@var{in-string}. If the @code{-s} option is not specified, bind each
X@var{in-string} to a specified @var{command}. If no @var{command} is
Xspecified, print the binding of @var{in-string} if it is bound, or
Xreturn a nonzero exit code if it is not bound. If the @code{-s} option
Xis specified, bind each @var{in-string} to each specified
X@var{out-string}. When @var{in-string} is typed, @var{out-string} will
Xbe pushed back and treated as input to the line editor. If the
X@code{-a} option is specified, bind the @var{in-string}s in the
Xalternative keymap instead of the standard one. The alternative keymap
Xis used in vi command mode.@refill
X
X@noindent
XFor either @var{in-string} or @var{out-string}, control characters may
Xbe specified in the form @code{^X}, and the backslash may be used to
Xintroduce one of the following escape sequences:@refill
X
X@table @code
X@item \a
Xbell character
X@item \n
Xlinefeed (newline)
X@item \b
Xbackspace
X@item \t
Xhorizontal tab
X@item \v
Xvertical tab
X@item \f
Xform feed
X@item \r
Xcarriage return
X@item \e
Xescape
X@item \nnn
Xcharacter code in octal
X@item \M-xxx
Xcharacter or escape sequence with meta bit set
X@end table
X
XIn all other cases, @code{\} escapes the following character. Delete is
Xwritten as @code{^?}.@refill
X
X@cindex loops, exitting
X@cindex exitting loops
X@findex break
X@item break [ @var{n} ]
XExit from an enclosing @code{for}, @code{while}, @code{until},
X@code{select}, or @code{repeat} loop. If @var{n} is specified, then
Xbreak @var{n} levels instead of just one.@refill
X
X@findex builtin
X@item builtin @var{name} [ @var{args} ] @dots{}
XExecutes the builtin @var{name}, with the given @var{args}.
X
X@findex bye
X@item bye
XSame as @code{exit}.
X
X@cindex directories, changing
X@findex cd
X@item cd [ @var{arg} ]
X@itemx cd @var{old} @var{new}
X@itemx cd +-n
XChange the current directory. In the first form, change the current
Xdirectory to @var{arg}, or to the value of @code{HOME} if @var{arg} is
Xnot specified. If @var{arg} is @code{-}, change to the value of
X@code{OLDPWD}, the previous directory. If a directory named @var{arg}
Xis not found in the current directory and @var{arg} does not begin with
Xa slash, search each component of the shell parameter @code{cdpath}. If
Xthe option @code{CDABLEVARS} is set, and a parameter named @var{arg}
Xexists whose value begins with a slash, treat its value as the
Xdirectory.@refill
X
X@noindent
XThe second form of @code{cd} substitutes the string @var{new} for the
Xstring @var{old} in the name of the current directory, and tries to
Xchange to this new directory.@refill
X
X@noindent
XThe third form of @code{cd} is equivalent to @code{popd}.
X
X@findex chdir
X@item chdir
XSame as @code{cd}.
X
X@cindex completion, controlling
X@findex compctl
X@item compctl [ -cfhovbCD ] [ -k @var{name} ] [ @var{arg} @dots{} ]
XControl the editor's completion behavior when one of @var{arg} is the
Xcurrent command. With the @code{-D} flag, control default completion
Xbehavior for commands not assigned any special behavior; with @code{-C},
Xcontrol completion when there is no current command. The remaining
Xoptions specify the type of command arguments to look for during
Xcompletion. For example, @samp{compctl -hf rlogin} is equivalent to
X@samp{hostcmds=(rlogin)}.@refill
X
X@table @code
X@item -c
XExpect command names.
X@item -f
XExpect filenames, named directories, and filesystem paths.
X@item -h
XExpect hostnames taken from the @code{$hosts} variable.
X@item -o
XExpect option names.
X@item -v
XExpect variable names.
X@item -b
XExpect key binding names.
X@item -k @var{name}
XExpect names taken from the elements of @code{$name}.
X@end table
X
X@cindex loops, continuing
X@cindex continuing loops
X@findex continue
X@item continue [ @var{num} ]
XResume the next iteration of the enclosing @code{for}, @code{while},
X@code{until}, @code{select}, or @code{repeat} loop. If @var{n} is
Xspecified, break out of @var{n}-1 loops and resume at the @var{n}th
Xenclosing loop.@refill
X
X@findex declare
X@item declare [ @var{arg} @dots{} ]
XSame as @code{typeset}.
X
X@cindex directory stack, printing
X@findex dirs
X@item dirs [ @code{-v} ] [ @var{arg} @dots{} ]
XWith no arguments, print the contents of the directory stack. If the
X@code{-v} option is given, number the directories in the stack when
Xprinting. Directories are added to this stack with the @code{pushd}
Xcommand, and removed with the @code{cd} or @code{popd} commands. If
Xarguments are specified, load them onto the directory stack, replacing
Xanything that was there, and push the current directory onto the
Xstack.@refill
X
X@cindex disabling commands
X@cindex commands, disabling
X@findex disable
X@item disable @var{arg} @dots{}
XDisable the builtin @var{arg} temporarily. This allows you to use an
Xexternal command with the same name as a shell builtin. Actually the
Xsame as @code{unhash}. Builtins can be enabled with the @code{enable}
Xcommand.@refill
X
X@findex disown
X@item disown @var{job} @dots{}
XRemove the specified jobs from the job table; the shell will no longer
Xreport their status, and will not complain if you try to exit an
Xinteractive shell with them running or stopped.
X
X@findex echo
X@item echo [ @code{-n} ] [ @var{arg} @dots{} ]
XWrite each @var{arg} on the standard output, with a space separating
Xeach one. If the @code{-n} flag is not present, print a newline at the
Xend. @code{echo} recognizes the following escape sequences:@refill
X
X@table @code
X@item \b
Xbackspace
X@item \c
Xdon't print an ending newline
X@item \e
Xescape
X@item \f
Xform feed
X@item \n
Xnewline
X@item \r
Xcarriage return
X@item \t
Xhorizontal tab
X@item \v
Xvertical tab
X@item \\
Xbackslash
X@item \xxx
Xcharacter code in octal
X@end table
X
X@cindex termcap string, printing
X@findex echotc
X@item echotc @var{cap} [ @var{arg} @dots{} ]
XOutput the termcap string corresponding to the capability @var{cap},
Xwith optional arguments.@refill
X
X@findex enable
X@item enable @var{arg} @dots{}
XEnable the specified builtin commands, presumably disabled earlier with
X@code{disable}.
X
X@cindex evaluating arguments as commands
X@findex eval
X@item eval [ @var{arg} @dots{} ]
XRead the arguments as input to the shell and execute the resulting
Xcommand(s) in the current shell process.
X
X@pindex IGNORE_EOF, use of
X@findex exit
X@item exit [ @var{n} ]
XExit the shell with the exit code specified by @var{n}; if none is
Xspecified, use the exit code from the last command executed. An
X@code{EOF} condition will also cause the shell to exit, unless the
X@code{IGNORE_EOF} option is set.@refill
X
X@findex export
X@item export [ @var{name}[=@var{value}] @dots{} ]
XThe specified @var{name}s are marked for automatic export to the
Xenvironment of subsequently executed commands.@refill
X
X@findex false
X@item false
XDo nothing and return an exit code of 1.
X
X@cindex history, editting
X@cindex editting the history
X@findex fc
X@item fc [ -e @var{ename} ] [ -nlrdDfE ] [ @var{old}=@var{new} @dots{} ] [ @var{first} [ @var{last} ]]
X@itemx fc -ARWI [ @var{filename} ]
XSelect a range of commands from @var{first} to @var{last} from the
Xhistory list. The arguments @var{first} and @var{last} may be specified
Xas a number or as a string. A negative number is used as an offset to
Xthe current history event number. A string specifies the most recent
Xevent beginning with the given string. All substitutions
X@var{old}=@var{new}, if any, are then performed on the commands. If the
X@code{-l} flag is given, the resulting commands are listed on standard
Xoutput. Otherwise the editor program @var{ename} is invoked on a file
Xcontaining these history events. If @var{ename} is not given, the value
Xof the parameter @code{FCEDIT} is used. If @var{ename} is @code{-}, no
Xeditor is invoked. When editing is complete, the edited command(s) is
Xexecuted. If @var{first} is not specified, it will be set to -1 (the
Xmost recent event), or to -16 if the @code{-l} flag is given. If
X@var{last} is not specified, it will be set to @var{first}, or to -1 if
Xthe @code{-l} flag is given. The flag @code{-r} reverses the order of
Xthe commands and the flag @code{-n} suppresses command numbers when
Xlisting. Also when listing, @code{-d} prints timestamps for each
Xcommand, @code{-f} prints full time and date stamps, and @code{-D}
Xprints elapsed times. Adding the @code{-E} flag causes the dates
Xto be printed in the European format (@var{dd.mm.yyyy}). With the
X@code{-D} flag, @code{fc} prints elapsed times.@refill
X
X@cindex history, file
X@cindex file, history
X@noindent
X@code{fc -R} reads the history from the given file, @code{fc -W} writes
Xthe history out to the given file, and @code{fc -A} appends the history
Xto the given file. @code{fc -AI} (@code{-WI}) appends (writes) only
Xthose events that are new since the last incremental append (write) to
Xthe history file.
X
X@findex fg
X@item fg [ @var{job} @dots{} ]
X@itemx @var{job} @dots{}
XBring the specified @var{job}s to the foreground. If no @var{job} is
Xspecified, use the current job.@refill
X
X@findex functions
X@item functions [ +-tu ] [ @var{name} @dots{} ]
XEquivalent to @code{typeset -f}.
X
X@cindex line, reading
X@cindex reading a line
X@findex getln
X@item getln @var{name} @dots{}
XRead the top value from the buffer stack and put it in the shell
Xparameter @var{name}. Equivalent to @code{read -zr}.
X
X@cindex options, processing
X@findex getopts
X@item getopts @var{optstring} @var{name} [ @var{arg} @dots{} ]
XChecks @code{arg} for legal options. If @var{arg} is omitted, use the
Xpositional parameters. A valid option argument begins with a @code{+}
Xor a @code{-}. An argument not beginning with a @code{+} or a @code{-},
Xor the argument @code{--}, ends the options. @var{optstring} contains
Xthe letters that @code{getopts} recognizes. If a letter is followed by
Xa @code{:}, that option is expected to have an argument. The options
Xcan be separated from the argument by blanks.@refill
X
X@vindex OPTIND, use of
X@vindex OPTARG, use of
X@noindent
XEach time it is invoked, @code{getopts} places the option letter it
Xfinds in the shell parameter @var{name}, prepended with a @code{+} when
X@var{arg} begins with a @code{+}. The index of the next @var{arg} is
Xstored in @code{OPTIND}. The option argument, if any, is stored in
X@code{OPTARG}.@refill
X
X@noindent
XA leading @code{:} in @var{optstring} causes @code{getopts} to store the
Xletter of the invalid option in @code{OPTARG}, and to set @var{name} to
X@code{?} for an unknown option and to @code{:} when a required option is
Xmissing. Otherwise, @code{getopts} prints an error message. The exit
Xstatus is nonzero when there are no more options.@refill
X
X@findex hash
X@item hash @var{name} @var{path}
XPuts @var{name} in the command hash table, associating it with the
Xpathname @var{path}. Whenever @var{name} is used as a command argument,
Xthe shell will try to execute the file given by @var{path}.@refill
X
X@findex history
X@item history [ -nr ] [ @var{first} [ @var{last} ]]
XSame as @code{fc -l}.
X
X@findex integer
X@item integer
XSame as @code{typeset -i}.
X
X@findex jobs
X@item jobs [ -lp ] [ @var{job} @dots{} ]
XLists information about each given job, or all jobs if @var{job} is
Xomitted. The @code{-l} flag lists process ids, and the @code{-p} flag
Xlists process groups.@refill
X
X@cindex jobs, killing
X@cindex killing jobs
X@findex kill
X@item kill [ -@var{sig} ] @var{job} @dots{}
X@itemx kill @code{-l}
XSends either @code{SIGTERM} or the specified signal to the given jobs or
Xprocesses. Signals are given by number or by names (with the prefix
X@code{SIG} removed). If the signal being sent is not @code{KILL} or
X@code{CONT}, then the job will be sent a @code{CONT} signal if it is
Xstopped. The argument @var{job} can be the process id of a job not in
Xthe job list. In the second form, @code{kill} @code{-l}, the signal
Xnames are listed.@refill
X
X@findex let
X@item let @var{arg} @dots{}
XEvaluate each @var{arg} as an arithmetic expression.
X@c
X@c Why does the next line cause Info-validate to say "invalid reference"?
X@c
X@xref{Arithmetic Evaluation}, for a description of arithmetic
Xexpressions. The exit status is 0 if the value of the last expression
Xis nonzero, and 1 otherwise.@refill
X
X@cindex resource limits
X@cindex limits, resource
X@findex limit
X@item limit [ -h ] [ @var{resource} [ @var{limit} ]] @dots{}
X@itemx limit @code{-s}
XLimit the resource consumption of children of the current shell. If
X@var{limit} is not specified, print the current limit placed on
X@var{resource}; otherwise set the limit to the specified value. If the
X@code{-h} flag is given, use hard limits instead of soft limits. If no
X@var{resource} is given, print all limits.@refill
X
X@var{resource} is one of:
X
X@table @code
X@item cputime
XMaximum CPU seconds per process.
X@item filesize
XLargest single file allowed.
X@item datasize
XMaximum data size (including stack) for each process.
X@item stacksize
XMaximum stack size for each process.
X@item coredumpsize
XMaximum size of a core dump.
X@item resident
XMaximum resident set size.
X@item descriptors
XMaximum value for a file descriptor.
X@end table
X
X@var{limit} is a number, with an optional scaling factor, as follows:
X
X@table @code
X@item @var{n}h
Xhours.
X@item @var{n}k
Xkilobytes. This is the default for all but cputime.
X@item @var{n}m
Xmegabytes or minutes.
X@item @var{mm}:@code{ss}
Xminutes and seconds.
X@end table
X
X@findex local
X@item local
XSame as @code{typeset}.
X
X@cindex users, watching
X@cindex watching users
X@vindex watch, use of
X@findex log
X@item log
XList all users currently logged in who are affected by the current
Xsetting of the @code{watch} parameter.
X
X@findex logout
X@item logout
XExit the shell, if this is a login shell.
X
X@pindex PUSHD_MINUS, use of
X@findex popd
X@item popd [ +-@var{n} ]
XRemoves entries from the directory stack. With no arguments, removes
Xthe top directory from the stack, and performs a @code{cd} to the new
Xtop directory. With an argument of the form @code{+@var{n}}, remove the
X@var{n}th entry counting from the left of the list shown by the
X@code{dirs} command, starting with zero, and change to that directory.
XWith an argument of the form @code{-@var{n}}, remove the @var{n}th entry
Xcounting from the right. If the @code{PUSHD_MINUS} option is set, the
Xmeanings of @code{+} and @code{-} in this context are swapped.@refill
X
X@findex print
X@item print [ -RnrslzpNDP ] [ -u@var{n} ] [ @var{arg} @dots{} ]
XWith no flags or with flag @code{-}, the arguments are printed on the
Xstandard output as described by @code{echo}.@refill
X
X@table @code
X@item -R, -r
Xignore the escape conventions of @code{echo}. The @code{-R} option
Xwill print all subsequent arguments and options.@refill
X@item -s
Xplace the results in the history list instead of on the standard
Xoutput.@refill
X@item -n
Xdo not add a newline to the output.
X@item -l
Xprint the arguments separated by newlines instead of spaces.
X@item -N
Xprint the arguments separated and terminated by nulls.
X@item -u@var{n}
Xprint the arguments to file descriptor @var{n}.
X@item -p
Xprint the arguments to the input of the coprocess.
X@item -z
Xpush the arguments onto the editing buffer stack, separated by spaces;
Xno escape sequences are recognized.@refill
X@item -D
Xtreat the arguments as directory names, replacing prefixes with @code{~}
Xexpressions, as appropriate.
X@item -P
Xrecognize the same escape sequences as in the @code{PROMPT} parameter.
X@end table
X
X@findex pushd
X@pindex PUSHD_TO_HOME, use of
X@pindex CDABLEVARS, use of
X@pindex PUSHD_SILENT, use of
X@item pushd [ @var{arg} ]
X@itemx pushd @var{old} @var{new}
X@itemx pushd +-@var{n}
XChange the current directory, and push the old current directory onto
Xthe directory stack. In the first form, change the current directory to
X@var{arg}. If @var{arg} is not specified, change to the second
Xdirectory on the stack (that is, exchange the top two entries), or
Xchange to the value of @code{HOME} if the @code{PUSHD_TO_HOME} option is
Xset or if there is only one entry on the stack. If @var{arg} is
X@code{-}, change to the value of @code{OLDPWD}, the previous directory.
XIf a directory named @var{arg} is not found in the current directory and
X@var{arg} does not contain a slash, search each component of the shell
Xparameter @code{cdpath}. If the option @code{CDABLEVARS} is set, and a
Xparameter named @var{arg} exists whose value begins with a slash, treat
Xits value as the directory. If the option @code{PUSHD_SILENT} is not
Xset, the directory stack will be printed after a @code{pushd} is
Xperformed.@refill
X
X@noindent
XThe second form of @code{pushd} substitutes the string @var{new} for the
Xstring @var{old} in the name of the current directory, and tries to
Xchange to this new directory.@refill
X
X@noindent
XThe third form of @code{pushd} is equivalent to @code{popd}.
X
X@findex pwd
X@item pwd
XEquivalent to @code{print -R $PWD}.
X
X@findex r
X@item r
XEquivalent to @code{fc -e -}.
X
X@vindex IFS
X@findex read
X@item read [ -rzp ] [ -u@var{n} ] [ @var{name}?@var{prompt} ] [ @var{name} @dots{} ]
XRead one line and break it into fields using the characters in
X@code{IFS} as separators. In raw mode, @code{-r}, a @code{\} at the end
Xof a line does not signify line continuation. If the @code{-z} flag is
Xset, read from the editor buffer stack. The first field is assigned to
Xthe first @var{name}, the second field to the second @var{name}, etc,
Xwith leftover fields assigned to the last @var{name}. If @var{name} is
Xomitted then @code{REPLY} is used. If @code{-u@var{n}} is specified,
Xthen input is read from file descriptor @var{n}; if @code{-p} is
Xspecified, then input is read from the coprocess. The exit status is 0
Xunless end-of-file is encountered. If the first argument contains a
X@code{?}, the remainder of this word is used as a @var{prompt} on
Xstandard error when the shell is interactive. The exit status is 0
Xunless an end-of-file is encountered.@refill
X
X@cindex parameters, marking readonly
X@findex readonly
X@item readonly [ @var{name}[=@var{value}]] @dots{}
XThe given @var{names} are marked readonly; these names cannot be changed
Xby subsequent assignment.@refill
X
X@findex rehash
X@item rehash [ @code{-f} ]
XThrow out the command hash table and start over. If the @code{-f}
Xoption is set, rescan the command path immediately, instead of
Xrebuilding the hash table incrementally.@refill
X
X@cindex functions, returning from
X@findex return
X@item return [ @var{n} ]
XCauses a shell function or @code{.} script to return to the invoking
Xscript with the return status specified by @var{n}. If @var{n} is
Xomitted then the return status is that of the last command
Xexecuted.@refill
X
X@cindex timed execution
X@cindex execution, timed
X@findex sched
X@item sched [+]@var{hh}:@var{mm} @var{command} @dots{}
X@itemx sched [ -@var{item} ]
XMake an entry in the scheduled list of commands to execute. The time
Xmay be specified in either absolute or relative time. With no
Xarguments, prints the list of scheduled commands. With the argument
X@code{-@var{item}}, removes the given item from the list.@refill
X
X@cindex parameters, positional
X@cindex parameters, array
X@cindex array parameter, declaring
X@findex set
X@item set [ +-@var{options} ] [ +-o @var{option name} ] @dots{} [ -A @var{name} ] [ @var{arg} ] @dots{}
XSet the options for the shell and/or set the positional parameters, or
Xdeclare an array. @xref{Options}, for the meaning of the flags. Flags
Xmay be specified by name using the @code{-o} option. If the @code{-A}
Xflag is specified, @var{name} is set to an array containing the given
X@var{arg}s. Otherwise the positional parameters are set. If no
Xarguments are given, then the names and values of all parameters are
Xprinted on the standard output. If the only argument is @code{+}, the
Xnames of all parameters are printed.@refill
X
X@cindex options, setting
X@findex setopt
X@item setopt [ +-@var{options} ] [ @var{name} @dots{} ]
XSet the options for the shell. All options specified either with flags
Xor by name are set. If no arguments are supplied, the names of all
Xoptions currently set are printed. In option names, case is
Xinsignificant, and all underscore characters are ignored.
X
X@cindex parameters, positional
X@findex shift
X@item shift [ @var{n} ]
XThe positional parameters from @code{$@var{n}+1} @dots{} are renamed
X@code{$1}, where @var{n} is an arithmetic expression that defaults to
X1.@refill
X
X@findex source
X@item source
XSame as @samp{.}.
X
X@cindex shell, suspending
X@findex suspend
X@item suspend [ -f ]
XSuspend the execution of the shell (send it a @code{SIGTSTP}) until it
Xreceives a @code{SIGCONT}. If the @code{-f} option is not given,
Xcomplain if this is a login shell.@refill
X
X@findex test
X@item test @var{arg} @dots{}
X@itemx [ @var{arg} @dots{} ]
XLike the system version of @code{test}. Added for compatibility; use
Xconditional expressions instead.@refill
X
X@cindex shell, timing
X@cindex timing the shell
X@findex times
X@item times
XPrint the accumulated user and system times for the shell and for
Xprocesses run from the shell.
X
X@cindex signals, trapping
X@cindex trapping signals
X@findex trap
X@item trap [ @var{arg} ] [ @var{sig} ] @dots{}
X@var{arg} is a command to be read and executed when the shell receives
X@var{sig}. Each @var{sig} can be given as a number or as the name of a
Xsignal. If @var{arg} is @code{-}, then all traps @var{sig} are reset to
Xtheir default values. If @var{arg} is the null string, then this signal
Xis ignored by the shell and by the commands it invokes. If @var{sig} is
X@code{ERR} then @var{arg} will be executed after each command. If
X@var{sig} is @code{0} or @code{EXIT} and the @code{trap} statement is
Xexecuted inside the body of a function, then the command @var{arg} is
Xexecuted after the function completes. If @var{sig} is @code{0} or
X@code{EXIT} and the @code{trap} statement is not executed inside the
Xbody of a function, then the command @var{arg} is executed when the
Xshell terminates. The @code{trap} command with no arguments prints a
Xlist of commands associated with each signal.@refill
X
X@findex true
X@item true
XDo nothing and return an exit code of 0.
X
X@cindex tty, freezing
X@findex ttyctl
X@item ttyctl -fu
XThe @code{-f} option freezes the tty, and @code{-u} unfreezes it. When
Xthe tty is frozen, no changes made to the tty settings by external
Xprograms will be honored by the shell; the shell will simply reset the
Xsettings to their previous values as soon as each command exits. Thus,
X@code{stty} and similar programs have no effect when the tty is
Xfrozen.@refill
X
X@findex type
X@item type
XSame as @code{whence} @code{-v}.
X
X@cindex parameters, setting
X@findex typeset
X@item typeset [ +-LRZfilrtux [@var{n}]] [ @var{name}[=@var{value}]] @dots{}
XSet attributes and values for shell parameters. When invoked inside a
Xfunction, if @var{name} is not already defined, a new parameter is
Xcreated which will be unset when the function completes. The following
Xattributes are valid:@refill
X
X@table @code
X@item -L
XLeft justify and remove leading blanks from @var{value}. If @var{n} is
Xnonzero, it defines the width of the field; otherwise it is determined
Xby the width of the value of the first assignment. When the parameter
Xis printed, it is filled on the right with blanks or truncated if
Xnecessary to fit the field. Leading zeros are removed if the @code{-Z}
Xflag is also set.@refill
X@item -R
XRight justify and fill with leading blanks. If @var{n} is nonzero if
Xdefines the width of the field; otherwise it is determined by the width
Xof the value of the first assignment. When the parameter is printed,
Xthe field is left filled with blanks or truncated from the end.@refill
X@item -Z
XRight justify and fill with leading zeros if the first non-blank
Xcharacter is a digit and the @code{-L} flag has not been set. If
X@var{n} is nonzero it defines the width of the field; otherwise it is
Xdetermined by the width of the value of the first assignment.@refill
X@item -f
XThe names refer to functions rather than parameters. No assignments can
Xbe made, and the only other valid flags are @code{-t} and @code{-u}.
XThe flag @code{-t} turns on execution tracing for this function. The
Xflag @code{-u} causes this function to be marked for autoloading. The
X@code{fpath} parameter will be searched to find the function definition
Xwhen the function is first referenced.@refill
X@item -i
XUse an internal integer representation. If @code{i} is nonzero it
Xdefines the output arithmetic base, otherwise it is determined by the
Xfirst assignment.@refill
X@item -l
XConvert to lower case.
X@item -r
XThe given @var{name}s are marked readonly.
X@item -t
XTags the named parameters. Tags have no special meaning to the
Xshell.@refill
X@item -u
XConvert to upper case.
X@item -x
XMark for automatic export to the environment of subsequently executed
Xcommands.@refill
X@end table
X
X@noindent
XUsing @code{+} rather than @code{-} causes these flags to be turned off.
XIf no arguments are given but flags are specified, a list of named
Xparameters which have these flags set is printed. Using @code{+}
Xinstead of @code{-} keeps their values from being printed. If no
Xarguments or options are given, the names and attributes of all
Xparameters are printed.@refill
X
X@cindex resource limits
X@cindex limits, resource
X@findex ulimit
X@item ulimit [ -HSacdfmnt ] [ @var{limit} ]
XSet or display a resource limit. The value of limit can be a number in
Xthe unit specified below or the value @code{unlimited}. The @code{H}
Xand @code{S} flags specify whether the hard limit or the soft limit for
Xthe given resource is set.@refill
X
X@table @code
X@item -a
XLists all of the current resource limits.
X@item -c
XThe number of 512-byte blocks on the size of core dumps.
X@item -d
XThe number of K-bytes on the size of the data segment.
X@item -f
XThe number of 512-byte blocks on the size of files written.
X@item -m
XThe number of K-bytes on the size of physical memory.
X@item -n
XThe number of file descriptors.
X@item -s
XThe number of K-bytes on the size of the stack.
X@item -t
XThe number of CPU seconds to be used.
X@end table
X
X@cindex umask
X@findex umask
X@item umask [ @var{mask} ]
XThe umask is set to @var{mask}. @var{mask} can be either an octal
Xnumber or a symbolic value as described in @code{chmod(1)}. If
X@var{mask} is omitted, the current value is printed.@refill
X
X@cindex aliases, removing
X@findex unalias
X@item unalias @var{name} @dots{}
XThe alias definition, if any, for each @var{name} is removed.
X
X@cindex functions, removing
X@findex unfunction
X@item unfunction @var{name} @dots{}
XThe function definition, if any, for each @var{name} is removed.
X
X@findex unhash
X@item unhash @var{name} @dots{}
XThe entry in the command hash table, if any, for each @var{name} is
Xremoved.@refill
X
X@cindex limits, resource
X@cindex resource limits
X@findex unlimit
X@item unlimit [ -h ] @var{resource} @dots{}
XThe resource limit for each @var{resource} is set to the hard limit. If
Xthe @code{-h} flag is given and the shell is running as root, the hard
Xresource limit for each @var{resource} is removed.@refill
X
X@cindex parameters, unsetting
X@findex unset
X@item unset @var{name} @dots{}
XEach named parameter is unset.
X
X@cindex options, unsetting
X@findex unsetopt
X@item unsetopt [ +-@var{options} ] [ @var{name} @dots{} ]
XUnset the options for the shell. All options specified either with
Xflags or by name are unset.@refill
X
X@cindex parameters, editting
X@cindex editting parameters
X@findex vared
X@item vared @var{name}
XThe value of the parameter @var{name} is loaded into the edit buffer,
Xand the line editor is invoked. When the editor exits, @var{name} is
Xset to the string value returned by the editor.@refill
X
X@cindex jobs, waiting for
X@cindex waiting for jobs
X@findex wait
X@item wait [ @var{job} @dots{} ]
XWait for the specified jobs or processes. If @var{job} is not given
Xthen all currently active child processes are waited for. Each
X@var{job} can be either a job specification or the process-id of a job
Xin the job table. The exit status from this command is that of the job
Xwaited for.@refill
X
X@findex whence
X@item whence [ -acpv ] @var{name} @dots{}
XFor each name, indicate how it would be interpreted if used as a command
Xname. The @code{-v} flag produces a more verbose report. The @code{-p}
Xflag does a path search for @var{name} even if it is a shell function,
Xalias, or reserved word. The @code{-c} flag prints the results in a
Xcsh-like format. The @code{-a} flag does a search for all occurences of
X@var{name} throughout the command path.@refill
X
X@findex which
X@item which
XSame as @code{whence -c}.
X@end table
X
X@node Invocation, Wrapping Up, Shell Builtin Commands, Top
X@chapter Invocation
X@cindex invocation
X
X@code{zsh [ +-@var{options} ] [ +-o @var{option} ] @dots{} [ -c @var{string} ] [ @var{arg} @dots{} ]}
X
X@pindex NO_RCS, use of
X@cindex files, startup
X@cindex startup files
X@noindent
XCommands are first read from @file{/etc/zshenv}. Then, if the
X@code{NO_RCS} option is unset, commands are read from
X@file{$ZDOTDIR/.zshenv} (if @code{ZDOTDIR} is unset, @code{HOME} is used
Xinstead). If the first character of argument zero passed to the shell is
X@code{-}, or if the @code{-l} flag is present, then
Xthe shell is assumed to be a login shell, and commands are read from
X@file{/etc/zprofile} and then @file{$ZDOTDIR/.zprofile}.
XThen, if the shell is interactive and the @code{NO_RCS} option is unset,
Xcommands are read from @file{/etc/zshrc} and then @file{$ZDOTDIR/.zshrc}.
XFinally, if the shell is a login shell, @file{/etc/zlogin} and
X@file{$ZDOTDIR/.zlogin} are read.@refill
X
XIf the @code{NO_RCS} option is set within @file{/etc/zshenv}, then only
X@file{/etc/zprofile}, @file{/etc/zshrc}, and @file{/etc/zlogin} are read,
Xand the @code{$ZDOTDIR} files are skipped. If the @code{-f} flag is present,
Xonly @file{/etc/zshenv} is read, and all other initialization files are
Xskipped.
X
XIf the @code{-s} flag is not present and an argument is given,
Xthe first argument is taken to be the pathname of a script to execute.
XThe remaining arguments are assigned to the positional parameters. The
Xfollowing flags are interpreted by the shell when invoked:@refill
X
X@cindex flags, shell
X@cindex shell flags
X@table @code
X@item -c @var{string}
XRead commands from @var{string}.
X@item -s
XRead command from the standard input.
X@item -i
XIf this flag is present or the shell input and output are attached to a
Xterminal, this shell is interactive.
X@end table
X
X@node Wrapping Up, Concept Index, Invocation, Top
X@chapter Wrapping Up
X
X@menu
X* See Also::
X* Files Used::
X* Availability::
X* Undocumented Features::
X@end menu
X
X@node See Also, Files Used, , Wrapping Up
X@section See Also
X
X@noindent
Xsh(1), csh(1), tcsh(1), itcsh(1), rc(1), bash(1), ash(1), ksh(1),
Xclam(1), strftime(3).
X
X@node Files Used, Availability, See Also, Wrapping Up
X@section Files Used
X@cindex files used
X
X@noindent
X$ZDOTDIR/.zshenv@*
X@noindent
X$ZDOTDIR/.zprofile@*
X@noindent
X$ZDOTDIR/.zshrc@*
X@noindent
X$ZDOTDIR/.zlogin@*
X@noindent
X$ZDOTDIR/.zlogout@*
X@noindent
X/tmp/zsh*@*
X@noindent
X/etc/zshenv@*
X@noindent
X/etc/zprofile@*
X@noindent
X/etc/zshrc@*
X@noindent
X/etc/zlogin
X
X@node Availability, Undocumented Features, Files Used, Wrapping Up
X@section Availability
X@cindex availability
X
X@noindent
XThe latest official release of zsh is available via anonymous ftp from
X@code{cs.ucsd.edu} (132.239.51.3), in the directory
X@code{pub/zsh}. The beta release of zsh 2.4 is available from
X@code{carlo.phys.uva.nl} (145.18.220.25), in the directory
X@code{pub/bas/zsh}. This man page is current to zsh 2.3.1.@refill
X
X@node Undocumented Features, , Availability, Wrapping Up
X@section Undocumented Features
X@cindex undocumented features
X
X@noindent
XKnown only to the recipients of the zsh mailing list,
X@code{zsh-list@@cs.uow.edu.au}. If you run into problems, please send
Xyour questions and patches to the mailing list. To join the list, send
Xemail to @code{zsh-request@@cs.uow.edu.au}.@refill
X
X
X@node Concept Index, Variables Index, Wrapping Up, Top
X@unnumbered Concept Index
X
X@printindex cp
X
X@node Variables Index, Options Index, Concept Index, Top
X@unnumbered Variables Index
X
X@printindex vr
X
X@node Options Index, Functions Index, Variables Index, Top
X@unnumbered Options Index
X
X@printindex pg
X
X@node Functions Index, Editor Functions Index, Options Index, Top
X@unnumbered Functions Index
X
X@printindex fn
X
X@node Editor Functions Index, Keystroke Index, Functions Index, Top
X@unnumbered Editor Functions Index
X
X@printindex tp
X
X@node Keystroke Index, , Editor Functions Index, Top
X@unnumbered Keystroke Index
X
X@printindex ky
X
X
X@contents
X@bye
END_OF_FILE
if test 48882 -ne `wc -c <'doc/zsh.texi.03'`; then
echo shar: \"'doc/zsh.texi.03'\" unpacked with wrong size!
fi
# end of 'doc/zsh.texi.03'
fi
if test -f 'scripts/c2z' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'scripts/c2z'\"
else
echo shar: Extracting \"'scripts/c2z'\" \(3299 characters\)
sed "s/^X//" >'scripts/c2z' <<'END_OF_FILE'
X#! /bin/sh
X#
X# c2z - environment conversion tool
X# Contributed by Bart Schaefer
X# (Tweaked a bit by Paul Falstad)
X#
X# This is a quick script to convert csh aliases to zsh aliases/functions.
X# It also converts the csh environment and local variables to zsh. c2z
X# uses the csh to parse its own dot-files, then processes csh output to
X# convert the csh settings to zsh.
X#
X# When run as a zsh fuction, c2z runs csh as if it were an interactive
X# shell whenever the parent zsh is interactive. When run as a shell
X# script, the -i switch can be used to force this behavior.
X#
X# The -l (login) switch causes csh to run as if it were a login shell.
X# This is done "properly" if c2z is used as a zsh function, otherwise
X# it's faked by explicitly sourcing .login. Use with caution if your
X# .login initializes an X server or does other one-time-only startup
X# procedures.
X#
X# usage:
X# c2z [-i] [-l]
X#
X# You can use this script in your .zshrc or .zlogin files to load your
X# regular csh environment into zsh; for example, in .zlogin:
X#
X# . =(c2z -l)
X#
X# This is not perfect, but it gets most common aliases and variables.
X# It's also rather time-consuming to do this every time you log in.
X# However, if you're moving from csh to zsh for the first time, this
X# can get you started with a familiar environment right away.
X#
X# In case your mailer eats tabs, $T is set to expand to a tab.
X#
XT="`echo x | tr x '\011'`"
X
X# If we're zsh, we can run "- csh" to get the complete environment.
X#
XMINUS=""
XLOGIN=""
XINTERACT=""
Xcase "$VERSION" in
Xzsh*)
X case $1 in
X -l*) MINUS="-" ;;
X -i*) INTERACT="-i" ;;
X esac
X if [[ -o INTERACTIVE ]]; then INTERACT="-i"; fi
X setopt nobanghist
X ;;
X*)
X case $1 in
X -l*) LOGIN="source ~/.login" ;;
X -i*) INTERACT="-i" ;;
X esac
X ;;
Xesac
X
X( eval $MINUS csh $INTERACT ) <<EOF 2>&1 >/dev/null
X$LOGIN
Xalias >! /tmp/cz$$.a
Xsetenv >! /tmp/cz$$.e
Xset >! /tmp/cz$$.v
XEOF
X
X# save stdin
Xexec 9<&0
X
X# First convert aliases
Xexec < /tmp/cz$$.a
X
X# Taken straight from ctoz except for $T and "alias --"
Xsed -e 's/'"$T"'(\(.*\))/'"$T"'\1/' >/tmp/cz$$.1
Xgrep ! /tmp/cz$$.1 >/tmp/cz$$.2
Xgrep -v ! /tmp/cz$$.1 >/tmp/cz$$.3
Xsed -e "s/'/'"\\\\"''"/g \
X -e 's/^\([^'"$T"']*\)'"$T"'\(.*\)$/alias -- \1='"'\2'/" \
X /tmp/cz$$.3
Xsed -e 's/![:#]*/$/g' \
X -e 's/^\([^'"$T"']*\)'"$T"'\(.*\)$/\1 () { \2 }/' \
X /tmp/cz$$.2
X
X# Next, convert environment variables
Xexec < /tmp/cz$$.e
X
X# Would be nice to deal with embedded newlines, e.g. in TERMCAP, but ...
Xsed -e '/^SHLVL/d' \
X -e "s/'/'"\\\\"''"/g \
X -e "s/^\([A-Za-z0-9_]*=\)/export \1'/" \
X -e "s/$/'/"
X
X# Finally, convert local variables
Xexec < /tmp/cz$$.v
X
Xsed -e 's/'"$T"'/=/' \
X -e "s/'/'"\\\\"''"/g \
X -e '/^[A-Za-z0-9_]*=[^(]/{
X s/=/='"'/"'
X s/$/'"'/"'
X }' |
Xsed -e '/^argv=/d' -e '/^cwd=/d' -e '/^filec=/d' -e '/^status=/d' \
X -e '/^histchars=/s//HISTCHARS=/' \
X -e '/^history=/s//HISTSIZE=/' \
X -e '/^home=/s//HOME=/' \
X -e '/^ignoreeof=/s/.*/setopt ignoreeof/' \
X -e '/^noclobber=/s/.*/setopt noclobber/' \
X -e '/^notify=/d' \
X -e '/^showdots=/s/.*/setopt globdots/' \
X -e '/^savehist=/s//HISTFILE=\~\/.zhistory SAVEHIST=/' \
X -e '/^autolist=/s/.*/setopt autolist/' \
X -e '/^correct=[cmd]*/s//setopt autocorrect/' \
X -e '/^who=/s//WATCHFMT=/'
X
X
Xexec 0<&9
X
Xrm /tmp/cz$$.?
Xexit
END_OF_FILE
if test 3299 -ne `wc -c <'scripts/c2z'`; then
echo shar: \"'scripts/c2z'\" unpacked with wrong size!
fi
chmod +x 'scripts/c2z'
# end of 'scripts/c2z'
fi
echo shar: End of archive 9 \(of 22\).
cp /dev/null ark9isdone
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...