about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2005-01-30 00:05:52 +0000
committerBart Schaefer <barts@users.sourceforge.net>2005-01-30 00:05:52 +0000
commit912826aeb6986cfb9d82291f749a7b226fccfee8 (patch)
tree7d6e3b465b8e48d9f46ccc8fdcf8781b54bd4742 /Doc
parentafe0e139c8fb5acdbd1d744b9be3d7830302c144 (diff)
downloadzsh-912826aeb6986cfb9d82291f749a7b226fccfee8.tar.gz
zsh-912826aeb6986cfb9d82291f749a7b226fccfee8.tar.xz
zsh-912826aeb6986cfb9d82291f749a7b226fccfee8.zip
Patches from zsh-4.2.3-dev-1 that affect compilation or C code, excluding
any of those that introduce UTF-8 support.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/builtins.yo888
1 files changed, 648 insertions, 240 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 167ea356d..d5a0f787f 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -17,6 +17,18 @@ item(tt(ARG1))(
 Same as tt(ARG2).
 )\
 )\
+def(module)(2)(\
+item(tt(ARG1))(
+See ifzman(the section `The ARG2 Module' in zmanref(zshmodules))\
+ifnzman(noderef(The ARG2 Module)).
+)\
+)\
+def(zlecmd)(1)(\
+item(tt(ARG1))(
+See ifzman(the section `Zle Builtins' in zmanref(zshzle))\
+ifnzman(noderef(Zle Builtins)).
+)\
+)\
 startitem()
 prefix(-)
 findex(.)
@@ -48,23 +60,40 @@ which may have effects on shell parameters.  A zero exit code is returned.
 findex(alias)
 cindex(aliases, defining)
 cindex(aliases, listing)
-item(tt(alias) [ {tt(PLUS()|tt(-))}tt(gmrL) ] [ var(name)[tt(=)var(value)] ... ])(
+item(tt(alias) [ {tt(PLUS()|tt(-))}tt(gmrsL) ] [ var(name)[tt(=)var(value)] ... ])(
 For each var(name) with a corresponding var(value), define an alias
 with that value.  A trailing space in var(value) causes the next word
 to be checked for alias expansion.  If the tt(-g) flag is present,
 define a global alias; global aliases are expanded even if they do not
 occur in command position.
 
+If the tt(-s) flags is present, define a suffix alias: if the command
+word on a command line is in the form `var(text)tt(.)var(name)', where
+var(text) is any non-empty string, it is replaced by the text
+`var(value) var(text)tt(.)var(name)'.  Note that var(name) is treated as
+a literal string, not a pattern.  A trailing space in var(value) is not
+special in this case.  For example,
+
+example(alias -s ps=gv)
+
+will cause the command `tt(*.ps)' to be expanded to `tt(gv *.ps)'.  As
+alias expansion is carried out earlier than globbing, the `tt(*.ps)' will
+then be expanded.  Suffix aliases constitute a different name space from
+other aliases (so in the above example it is still possible
+to create an alias for the command tt(ps)) and the two sets are never
+listed together.
+
 For each var(name) with no var(value),
 print the value of var(name), if any.  With no arguments, print all
-currently defined aliases.  If the tt(-m) flag is given the arguments
-are taken as patterns (they should be quoted to preserve them from being
-interpreted as glob patterns), and the aliases matching these patterns
-are printed.  When printing aliases and the tt(-g) or tt(-r) flags
-are present, then restrict the printing to global or regular
-aliases, respectively.  Using `tt(PLUS())' instead of `tt(-)', or ending
-the option list with a single `tt(PLUS())', prevents the values of the
-aliases from being printed.
+currently defined aliases other than suffix aliases.  If the tt(-m) flag
+is given the arguments are taken as patterns (they should be quoted to
+preserve them from being interpreted as glob patterns), and the aliases
+matching these patterns are printed.  When printing aliases and one of
+the tt(-g), tt(-r) or tt(-s) flags is present, restrict the printing to
+global, regular or suffix aliases, respectively; a regular alias is one
+which is neither a global nor a suffix alias.   Using `tt(PLUS())'
+instead of `tt(-)', or ending the option list with a single
+`tt(PLUS())', prevents the values of the aliases from being printed.
 
 If the tt(-L) flag is present, then print each
 alias in a manner suitable for putting in a startup script.  The exit
@@ -74,9 +103,9 @@ which no alias has been defined.
 findex(autoload)
 cindex(functions, autoloading)
 cindex(autoloading functions)
-item(tt(autoload) [ {tt(PLUS())|tt(-)}tt(UXmt) ] [ tt(-w) ] [ var(name) ... ])(
-Equivalent to tt(functions -u), with the exception of tt(-X)/tt(+X)
-and tt(-w).
+item(tt(autoload) [ {tt(PLUS())|tt(-)}tt(UXktz) ] [ tt(-w) ] [ var(name) ... ])(
+Equivalent to tt(functions -u), with the exception of tt(-X)/tt(+X) and
+tt(-w).
 
 The flag tt(-X) may be used only inside a shell function, and may not be
 followed by a var(name).  It causes the calling function to be marked for
@@ -91,10 +120,14 @@ function was not previously defined em(and) a definition for it was found.
 This does em(not) replace any existing definition of the function.  The
 exit status is nonzero (failure) if the function was already defined or
 when no definition was found.  In the latter case the function remains
-undefined and marked for autoloading.
+undefined and marked for autoloading.  If ksh-style autoloading is
+enabled, the function created will contain the contents of the file
+plus a call to the function itself appended to it, thus giving normal
+ksh autoloading behaviour on the first call to the function.
 
-With the tt(-w) flag, the var(name)s are taken as names of wordcode
-files and all functions defined in them are marked for autoloading.
+With the tt(-w) flag, the var(name)s are taken as names of files compiled
+with the tt(zcompile) builtin, and all functions defined in them are
+marked for autoloading.
 )
 findex(bg)
 cindex(jobs, backgrounding)
@@ -103,6 +136,7 @@ item(var(job) ... tt(&))(
 Put each specified var(job) in the background,
 or the current job if none is specified.
 )
+zlecmd(bindkey)
 findex(break)
 cindex(exiting loops)
 cindex(loops, exiting)
@@ -116,6 +150,7 @@ item(tt(builtin) var(name) [ var(args) ... ])(
 Executes the builtin var(name), with the given var(args).
 )
 alias(bye)(exit)
+module(cap)(zsh/cap)
 findex(cd)
 cindex(directories, changing)
 xitem(tt(cd) [ tt(-sLP) ] [ var(arg) ])
@@ -152,7 +187,29 @@ to their true values.  If the tt(-L) option is given symbolic links are
 followed regardless of the state of the tt(CHASE_LINKS) option.
 )
 alias(chdir)(cd)
-prefix(command)
+module(clone)(zsh/clone)
+findex(command)
+item(tt(command) [ tt(-pvV) ] var(simple command))(
+The simple command argument is taken as an external command instead of
+a function or builtin and is executed. If the tt(POSIX_BUILTINS) option
+is set, builtins will also be executed but certain special properties
+of them are suppressed. The tt(-p) flag causes a default path to be
+searched instead of that in tt($path). With the tt(-v) flag, tt(command)
+is similar to tt(whence) and with tt(-V), it is equivalent to tt(whence
+-v).
+
+See also noderef(Precommand Modifiers).
+)
+module(comparguments)(zsh/computil)
+module(compcall)(zsh/compctl)
+module(compctl)(zsh/compctl)
+module(compdescribe)(zsh/computil)
+module(compfiles)(zsh/computil)
+module(compgroups)(zsh/computil)
+module(compquote)(zsh/computil)
+module(comptags)(zsh/computil)
+module(comptry)(zsh/computil)
+module(compvalues)(zsh/computil)
 findex(continue)
 cindex(loops, continuing)
 cindex(continuing loops)
@@ -165,24 +222,40 @@ var(n)-1 loops and resume at the var(n)th enclosing loop.
 alias(declare)(typeset)
 findex(dirs)
 cindex(directory stack, printing)
-item(tt(dirs) [ tt(-v) ] [ var(arg) ... ])(
+xitem(tt(dirs) [ tt(-c) ] [ var(arg) ... ])
+item(tt(dirs) [ tt(-lpv) ])(
 With no arguments, print the contents of the directory stack.
-If the tt(-v) option is given, number the directories
-in the stack when printing.
 Directories are added to this stack with the tt(pushd) command,
 and removed with the tt(cd) or tt(popd) commands.
 If arguments are specified, load them onto the directory stack,
 replacing anything that was there, and push the current directory
 onto the stack.
+
+startitem()
+item(tt(-c))(
+clear the directory stack.
+)
+item(tt(-l))(
+print directory names in full instead of using of using tt(~) expressions.
+)
+item(tt(-p))(
+print directory entries one per line.
+)
+item(tt(-v))(
+number the directories in the stack when printing.
+)
+enditem()
+
 )
 findex(disable)
 cindex(disabling commands)
 cindex(commands, disabling)
-item(tt(disable) [ tt(-afmr) ] var(name) ...)(
+item(tt(disable) [ tt(-afmrs) ] var(name) ...)(
 Temporarily disable the var(name)d hash table elements.  The default
 is to disable builtin commands.  This allows you to use an external
 command with the same name as a builtin command.  The tt(-a) option
-causes tt(disable) to act on aliases.  The tt(-f) option causes
+causes tt(disable) to act on regular or global aliases.  The tt(-s)
+option causes tt(disable) to act on suffix aliases.  The tt(-f) option causes
 tt(disable) to act on shell functions.  The tt(-r) options causes
 tt(disable) to act on reserved words.  Without arguments all disabled
 hash table elements from the corresponding hash table are printed.
@@ -201,6 +274,12 @@ Remove the specified var(job)s from the job table; the shell will
 no longer report their status, and will not complain if you
 try to exit an interactive shell with them running or stopped.
 If no var(job) is specified, disown the current job.
+
+If the var(job)s are currently stopped and the tt(AUTO_CONTINUE) option
+is not set, a warning is printed containing information about how to
+make them running after they have been disowned.  If one of the latter
+two forms is used, the var(job)s will automatically be made running,
+independent of the setting of the tt(AUTO_CONTINUE) option.
 )
 findex(echo)
 item(tt(echo) [ tt(-neE) ] [ var(arg) ... ])(
@@ -222,6 +301,8 @@ sitem(tt(\v))(vertical tab)
 sitem(tt(\\))(backslash)
 sitem(tt(\0)var(NNN))(character code in octal)
 sitem(tt(\x)var(NN))(character code in hexadecimal)
+sitem(tt(\u)var(NNNN))(unicode character code in hexadecimal)
+sitem(tt(\U)var(NNNNNNNN))(unicode character code in hexadecimal)
 endsitem()
 
 pindex(BSD_ECHO, use of)
@@ -229,12 +310,8 @@ The tt(-E) flag, or the tt(BSD_ECHO) option, can be used to disable
 these escape sequences.  In the latter case, tt(-e) flag can be used to
 enable them.
 )
-findex(echotc)
-cindex(termcap string, printing)
-item(tt(echotc) var(cap) [ var(arg) ... ])(
-Output the termcap string corresponding to the capability
-var(cap), with optional arguments.
-)
+module(echotc)(zsh/termcap)
+module(echoti)(zsh/terminfo)
 findex(emulate)
 cindex(compatibility, sh)
 cindex(compatibility, ksh)
@@ -269,11 +346,12 @@ modes except tt(ksh).
 findex(enable)
 cindex(enabling commands)
 cindex(commands, enabling)
-item(tt(enable) [ tt(-afmr) ] var(name) ...)(
+item(tt(enable) [ tt(-afmrs) ] var(name) ...)(
 Enable the var(name)d hash table elements, presumably disabled
 earlier with tt(disable).  The default is to enable builtin commands.
-The tt(-a) option causes tt(enable) to act on aliases.  The tt(-f)
-option causes tt(enable) to act on shell functions.  The tt(-r)
+The tt(-a) option causes tt(enable) to act on regular or global aliases.
+The tt(-s) option causes tt(enable) to act on suffix aliases.
+The tt(-f) option causes tt(enable) to act on shell functions.  The tt(-r)
 option causes tt(enable) to act on reserved words.  Without arguments
 all enabled hash table elements from the corresponding hash table are
 printed.  With the tt(-m) flag the arguments are taken as patterns
@@ -313,6 +391,8 @@ findex(fc)
 cindex(history, editing)
 cindex(editing history)
 xitem(tt(fc) [ tt(-e) var(ename) ] [ tt(-nlrdDfEim) ] [ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ])
+xitem(tt(fc) tt(-p) [ tt(-a) ] [ var(filename) [ var(histsize) [ var(savehistsize) ] ] ])
+xitem(tt(fc) tt(-P))
 item(tt(fc) tt(-ARWI) [ var(filename) ])(
 Select a range of commands from var(first) to var(last) from the
 history list.
@@ -349,6 +429,37 @@ Adding the tt(-i) flag causes the dates to be printed in ISO8601
 `var(yyyy)tt(-)var(mm)tt(-)var(dd)' format.
 With the tt(-D) flag, tt(fc) prints elapsed times.
 
+cindex(history, stack)
+cindex(stack, history)
+
+`tt(fc -p)' pushes the current history list onto a stack and switches to a
+new history list.  If the tt(-a) option is also specified, this history list
+will be automatically popped when the current function scope is exited, which
+is a much better solution than creating a trap function to call `tt(fc -P)'
+manually.  If no arguments are specified, the history list is left empty,
+tt($HISTFILE) is unset, and tt($HISTSIZE) & tt($SAVEHIST) are set to their
+default values.  If one argument is given, tt($HISTFILE) is set to that
+filename, tt($HISTSIZE) & tt($SAVEHIST) are left unchanged, and the history
+file is read in (if it exists) to initialize the new list.  If a second
+argument is specified, tt($HISTSIZE) & tt($SAVEHIST) are instead set to the
+single specified numeric value.  Finally, if a third argument is specified,
+tt($SAVEHIST) is set to a separate value from tt($HISTSIZE).  You are free to
+change these environment values for the new history list however you desire
+in order to manipulate the new history list.
+
+`tt(fc -P)' pops the history list back to an older list saved by `tt(fc -p)'.
+The current list is saved to its tt($HISTFILE) before it is destroyed
+(assuming that tt($HISTFILE) and tt($SAVEHIST) are set appropriately, of
+course).  The values of tt($HISTFILE), tt($HISTSIZE), and tt($SAVEHIST) are
+restored to the values they had when `tt(fc -p)' was called.  Note that this
+restoration can conflict with making these variables "local", so your best
+bet is to avoid local declarations for these variables in functions that use
+`tt(fc -p)'.  The one other guaranteed-safe combination is declaring these
+variables to be local at the top of your function and using the automatic
+option (tt(-a)) with `tt(fc -p)'.  Finally, note that it is legal to manually
+pop a push marked for automatic popping if you need to do so before the
+function exits.
+
 cindex(history, file)
 cindex(file, history)
 `tt(fc -R)' reads the history from the given file,
@@ -372,14 +483,16 @@ Bring each specified var(job) in turn to the foreground.
 If no var(job) is specified, resume the current job.
 )
 findex(float)
-item(tt(float) [ {tt(PLUS())|tt(-)}tt(EFghlrtux) ] [ var(name)[tt(=)var(value)] ... ])(
+item(tt(float) [ {tt(PLUS())|tt(-)}tt(EFHghlprtux) ] [ tt(-LRZ) [ var(n) ]] \
+[ var(name)[tt(=)var(value)] ... ])(
 Equivalent to tt(typeset -E), except that options irrelevant to floating
 point numbers are not permitted.
 )
 findex(functions)
-item(tt(functions) [ {tt(PLUS())|tt(-)}tt(UXmtu) ] [ var(name) ... ])(
+item(tt(functions) [ {tt(PLUS())|tt(-)}tt(UXkmtuz) ] [ var(name) ... ])(
 Equivalent to tt(typeset -f).
 )
+module(getcap)(zsh/cap)
 findex(getln)
 cindex(line, reading)
 cindex(reading a line)
@@ -395,6 +508,7 @@ Checks the var(arg)s for legal options.  If the var(arg)s are omitted,
 use the positional parameters.  A valid option argument
 begins with a `tt(PLUS())' or a `tt(-)'.  An argument not beginning with
 a `tt(PLUS())' or a `tt(-)', or the argument `tt(--)', ends the options.
+Note that a single `tt(-)' is not considered a valid option argument.
 var(optstring) contains the letters that tt(getopts)
 recognizes.  If a letter is followed by a `tt(:)', that option
 is expected to have an argument.  The options can be
@@ -424,7 +538,7 @@ an error message when an option is invalid.  The exit status is
 nonzero when there are no more options.
 )
 findex(hash)
-item(tt(hash) [ tt(-dfmrv) ] [ var(name)[tt(=)var(value)] ] ...)(
+item(tt(hash) [ tt(-Ldfmrv) ] [ var(name)[tt(=)var(value)] ] ...)(
 tt(hash) can be used to directly modify the contents of the command
 hash table, and the named directory hash table.  Normally one would
 modify these tables by modifying one's tt(PATH)
@@ -466,10 +580,14 @@ the hash table will be unchanged.
 
 The tt(-v) option causes hash table entries to be listed as they are
 added by explicit specification.  If has no effect if used with tt(-f).
+
+If the tt(-L) flag is present, then each hash table entry is printed in
+the form of a call to hash.
 )
 alias(history)(fc -l)
 findex(integer)
-item(tt(integer) [ {tt(PLUS())|tt(-)}tt(ghlrtux) ] [ var(name)[tt(=)var(value)] ... ])(
+item(tt(integer) [ {tt(PLUS())|tt(-)}tt(Hghilprtux) ] \
+[ tt(-LRZ) [ var(n) ]] [ var(name)[tt(=)var(value)] ... ])(
 Equivalent to tt(typeset -i), except that options irrelevant to
 integers are not permitted.
 )
@@ -493,22 +611,31 @@ used by daemons, to indicate their state.
 findex(kill)
 cindex(killing jobs)
 cindex(jobs, killing)
-xitem(tt(kill) [ tt(-s) var(signal_name) ] var(job) ...)
-xitem(tt(kill) [ tt(-)var(sig) ] var(job) ...)
+xitem(tt(kill) [ tt(-s) var(signal_name) | tt(-n) var(signal_number) | \
+tt(-)var(sig) ] var(job) ...)
 item(tt(kill) tt(-l) [ var(sig) ... ])(
 Sends either tt(SIGTERM) or the specified signal to the given
 jobs or processes.
-Signals are given by number or by names, without the `tt(SIG)' prefix.
+Signals are given by number or by names, with or without the `tt(SIG)'
+prefix.
 If the signal being sent is not `tt(KILL)' or `tt(CONT)', then the job
 will be sent a `tt(CONT)' signal if it is stopped.
 The argument var(job) can be the process ID of a job
 not in the job list.
-In the third form, tt(kill -l), if var(sig) is not
+In the second form, tt(kill -l), if var(sig) is not
 specified the signal names are listed.  Otherwise, for each
 var(sig) that is a name, the corresponding signal number is
 listed.  For each var(sig) that is a signal number or a number
 representing the exit status of a process which was terminated or
 stopped by a signal the name of the signal is printed.
+
+On some systems, alternative signal names are allowed for a few signals.
+Typical examples are tt(SIGCHLD) and tt(SIGCLD) or tt(SIGPOLL) and
+tt(SIGIO), assuming they correspond to the same signal number.  tt(kill
+-l) will only list the preferred form, however tt(kill -l) var(alt) will
+show if the alternative form corresponds to a signal number.  For example,
+under Linux tt(kill -l IO) and tt(kill -l POLL) both output 29, hence
+tt(kill -IO) and tt(kill -POLL) have the same effect.
 )
 findex(let)
 item(tt(let) var(arg) ...)(
@@ -532,6 +659,10 @@ set the limit to the specified value.  If the tt(-h) flag
 is given, use hard limits instead of soft limits.
 If no var(resource) is given, print all limits.
 
+When looping over multiple resources, the shell will abort immediately if
+it detects a badly formed argument.  However, if it fails to set a limit
+for some other reason it will continue trying to set the remaining limits.
+
 var(resource) can be one of:
 
 startsitem()
@@ -548,14 +679,24 @@ sitem(tt(maxproc))(Maximum number of processes.)
 sitem(tt(maxpthreads))(Maximum number of threads per process.)
 sitem(tt(memorylocked))(Maximum amount of memory locked in RAM.)
 sitem(tt(memoryuse))(Maximum resident set size.)
+sitem(tt(msgqueue))(Maximum number of bytes in POSIX message queues.)
 sitem(tt(resident))(Maximum resident set size.)
+sitem(tt(sigpending))(Maximum number of pending signals.)
 sitem(tt(sockbufsize))(Maximum size of all socket buffers.)
 sitem(tt(stacksize))(Maximum stack size for each process.)
 sitem(tt(vmemorysize))(Maximum amount of virtual memory.)
 endsitem()
 
 Which of these resource limits are available depends on the system.
-var(resource) can be abbreviated to any unambiguous prefix.
+var(resource) can be abbreviated to any unambiguous prefix.  It
+can also be an integer, which corresponds to the integer defined
+for the resource by the operating system.
+
+If argument corresponds to a number which is out of the range of the
+resources configured into the shell, the shell will try to read or write
+the limit anyway, and will report an error if this fails.  As the shell
+does not store such resources internally, an attempt to set the limit will
+fail unless the tt(-s) option is present.
 
 var(limit) is a number, with an optional scaling factor, as follows:
 
@@ -567,9 +708,11 @@ sitem([var(mm)tt(:)]var(ss))(minutes and seconds)
 endsitem()
 )
 findex(local)
-item(tt(local) [ {tt(PLUS())|tt(-)}tt(AEFLRUZahilrtu) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)(
-Same as tt(typeset), except that the options tt(-g), tt(-x) and
-tt(-f) are not permitted.
+item(tt(local) [ {tt(PLUS())|tt(-)}tt(AEFHUahlprtux) ] \
+[ tt(-LRZi) [ var(n) ]] [ var(name)[tt(=)var(value)] ] ...)(
+Same as tt(typeset), except that the options tt(-g), and
+tt(-f) are not permitted.  In this case the tt(-x) option does not force
+the use of tt(-g), i.e. exported variables will be local to functions.
 )
 findex(log)
 vindex(watch, use of)
@@ -596,8 +739,10 @@ If the tt(PUSHD_MINUS) option is set, the meanings of `tt(PLUS())' and
 `tt(-)' in this context are swapped.
 )
 findex(print)
-item(tt(print) [ tt(-bnrslzpNDPoOicm) ] [ tt(-u)var(n) ] [ tt(-R) [ tt(-en) ]] [ var(arg) ... ])(
-With no flags or with flag `tt(-)', the arguments are printed on
+xitem(tt(print) [ tt(-abcDilmnNoOpPrsz) ] [ tt(-u) var(n) ] [ tt(-f) var(format) ] [ tt(-C) var(cols) ])
+item(  [ tt(-R) [ tt(-en) ]] [ var(arg) ... ])(
+With the `tt(-f)' option the arguments are printed as described by tt(printf).
+With no flags or with the flag `tt(-)', the arguments are printed on
 the standard output as described by tt(echo), with the following differences:
 the escape sequence `tt(\M-)var(x)' metafies the character
 var(x) (sets the highest bit),
@@ -607,36 +752,44 @@ Finally, if not in an escape
 sequence, `tt(\)' escapes the following character and is not printed.
 
 startitem()
-item(tt(-r))(
-Ignore the escape conventions of tt(echo).
-)
-item(tt(-R))(
-Emulate the BSD tt(echo) command, which does not process escape sequences
-unless the tt(-e) flag is given.  The tt(-n) flag suppresses the trailing
-newline.  Only the tt(-e) and tt(-n) flags are recognized after
-tt(-R); all other arguments and options are printed.
+item(tt(-a))(
+Print arguments with the column incrementing first.  Only useful with the
+tt(-c) and tt(-C) options.
 )
 item(tt(-b))(
 Recognize all the escape sequences defined for the tt(bindkey) command,
 see 
-ifzman(zmanref(zshmodules))\
-ifnzman(noderef(The zsh/zle Module))\
+ifzman(zmanref(zshzle))\
+ifnzman(noderef(Zle Builtins))\
 .
 )
+item(tt(-c))(
+Print the arguments in columns.  Unless tt(-a) is also given, arguments are
+printed with the row incrementing first.
+)
+item(tt(-C) var(cols))(
+Print the arguments in var(cols) columns.  Unless tt(-a) is also given,
+arguments are printed with the row incrementing first.
+)
+item(tt(-D))(
+Treat the arguments as directory names, replacing prefixes with tt(~)
+expressions, as appropriate.
+)
+item(tt(-i))(
+If given together with tt(-o) or tt(-O), sorting is performed
+case-independently.
+)
+item(tt(-l))(
+Print the arguments separated by newlines instead of spaces.
+)
 item(tt(-m))(
 Take the first argument as a pattern (should be quoted), and remove
 it from the argument list together with subsequent arguments that
 do not match this pattern.
 )
-item(tt(-s))(
-Place the results in the history list instead of on the standard output.
-)
 item(tt(-n))(
 Do not add a newline to the output.
 )
-item(tt(-l))(
-Print the arguments separated by newlines instead of spaces.
-)
 item(tt(-N))(
 Print the arguments separated and terminated by nulls.
 )
@@ -646,40 +799,76 @@ Print the arguments sorted in ascending order.
 item(tt(-O))(
 Print the arguments sorted in descending order.
 )
-item(tt(-i))(
-If given together with tt(-o) or tt(-O), sorting is performed
-case-independently.
+item(tt(-p))(
+Print the arguments to the input of the coprocess.
 )
-item(tt(-c))(
-Print the arguments in columns.
+item(tt(-P))(
+Perform prompt expansion (see
+ifzman(zmanref(zshmisc))\
+ifnzman(noderef(Prompt Expansion))\
+).
 )
-item(tt(-u)var(n))(
-Print the arguments to file descriptor var(n).
+item(tt(-r))(
+Ignore the escape conventions of tt(echo).
 )
-item(tt(-p))(
-Print the arguments to the input of the coprocess.
+item(tt(-R))(
+Emulate the BSD tt(echo) command, which does not process escape sequences
+unless the tt(-e) flag is given.  The tt(-n) flag suppresses the trailing
+newline.  Only the tt(-e) and tt(-n) flags are recognized after
+tt(-R); all other arguments and options are printed.
 )
-item(tt(-z))(
-Push the arguments onto the editing buffer stack, separated by spaces;
-no escape sequences are recognized.
+item(tt(-s))(
+Place the results in the history list instead of on the standard output.
 )
-item(tt(-D))(
-Treat the arguments as directory names, replacing prefixes with tt(~)
-expressions, as appropriate.
+item(tt(-u) var(n))(
+Print the arguments to file descriptor var(n).
 )
-item(tt(-P))(
-Perform prompt expansion (see noderef(Prompt Expansion)).
+item(tt(-z))(
+Push the arguments onto the editing buffer stack, separated by spaces.
 )
 enditem()
+
+If any of `tt(-m)', `tt(-o)' or `tt(-O)' are used in combination with
+`tt(-f)' and there are no arguments (after the removal process in the
+case of `tt(-m)') then nothing is printed.
+)
+findex(printf)
+item(tt(printf) var(format) [ var(arg) ... ])(
+Print the arguments according to the format specification. Formatting
+rules are the same as used in C. The same escape sequences as for tt(echo)
+are recognised in the format. All C conversion specifications ending in
+one of csdiouxXeEfgGn are handled. In addition to this, `tt(%b)' can be
+used instead of `tt(%s)' to cause escape sequences in the argument to be
+recognised and `tt(%q)' can be used to quote the argument in such a way
+that allows it to be reused as shell input. With the numeric format
+specifiers, if the corresponding argument starts with a quote character,
+the numeric value of the following character is used as the number to
+print otherwise the argument is evaluated as an arithmetic expression. See
+noderef(Arithmetic Evaluation) for a description of arithmetic
+expressions. With `tt(%n)', the corresponding argument is taken as an
+identifier which is created as an integer parameter.
+
+Normally, conversion specifications are applied to each argument in order
+but they can explicitly specify the var(n)th argument is to be used by
+replacing `tt(%)' by `tt(%)var(n)tt($)' and `tt(*)' by `tt(*)var(n)tt($)'.
+It is recommended that you do not mix references of this explicit style
+with the normal style and the handling of such mixed styles may be subject
+to future change.
+
+If arguments remain unused after formatting, the format string is reused
+until all arguments have been consumed. With the tt(print) builtin, this
+can be suppressed by using the tt(-r) option. If more arguments are
+required by the format than have been specified, the behaviour is as if
+zero or an empty string had been specified as the argument.
 )
 findex(pushd)
 pindex(PUSHD_TO_HOME, use of)
 pindex(PUSHD_MINUS, use of)
 pindex(CDABLE_VARS, use of)
 pindex(PUSHD_SILENT, use of)
-xitem(tt(pushd) [ var(arg) ])
-xitem(tt(pushd) var(old) var(new))
-item(tt(pushd) {tt(PLUS())|tt(-)}var(n))(
+xitem(tt(pushd) [ tt(-sLP) ] [ var(arg) ])
+xitem(tt(pushd) [ tt(-sLP) ] var(old) var(new))
+item(tt(pushd) [ tt(-sLP) ] {tt(PLUS())|tt(-)}var(n))(
 Change the current directory, and push the old current directory
 onto the directory stack.  In the first form, change the
 current directory to var(arg).
@@ -700,6 +889,9 @@ of `tt(PLUS())' and `tt(-)' in this context are swapped.
 
 If the option tt(PUSHD_SILENT) is not set, the directory
 stack will be printed after a tt(pushd) is performed.
+
+The options tt(-s), tt(-L) and tt(-P) have the same meanings as for the
+tt(cd) builtin.
 )
 findex(pushln)
 item(tt(pushln) [ var(arg) ... ])(
@@ -716,18 +908,27 @@ contain symbolic links.
 alias(r)(fc -e -)
 findex(read)
 vindex(IFS, use of)
-item(tt(read) [ tt(-rzpqAclneE) ] [ tt(-k) [ var(num) ] ] \
-[ tt(-u)var(n) ] [ var(name)[tt(?)var(prompt)] ] [ var(name) ...  ])(
+ifzman(xitem(tt(read) [ tt(-rszpqAclneE) ] [ tt(-t) [ var(num) ] ] [ tt(-k) [ var(num) ] ] [ tt(-d) var(delim) ]))
+item(ifnzman(tt(read) [ tt(-rszpqAclneE) ] [ tt(-t) [ var(num) ] ] [ tt(-k) [ var(num) ] ] [ tt(-d) var(delim) ]) [ tt(-u) var(n) ] [ var(name)[tt(?)var(prompt)] ] [ var(name) ...  ])(
+vindex(REPLY, use of)
+vindex(reply, use of)
 Read one line and break it into fields using the characters
 in tt($IFS) as separators, except as noted below.
 The first field is assigned to the first var(name), the second field
 to the second var(name), etc., with leftover
 fields assigned to the last var(name).
+If var(name) is omitted then
+tt(REPLY) is used for scalars and tt(reply) for arrays.
 
 startitem()
 item(tt(-r))(
 Raw mode: a `tt(\)' at the end of a line does not signify line
-continuation.
+continuation and backslashes in the line don't quote the following
+character and are not removed.
+)
+item(tt(-s))(
+Don't echo back characters if reading from the terminal.  Currently does
+not work with the tt(-q) option.
 )
 item(tt(-q))(
 Read only one character from the terminal and set var(name) to
@@ -742,9 +943,6 @@ Read only one (or var(num)) characters.  All are assigned to the first
 var(name), without word splitting.  This flag is ignored when tt(-q) is
 present.  Input is read from the terminal unless one of tt(-u) or tt(-p)
 is present.  This option may also be used within zle widgets.
-
-Note that var(num) must be in the argument word that follows tt(-k), not
-in the same word.  See tt(-u).
 )
 item(tt(-z))(
 Read one entry from the editor buffer stack and assign it to the first
@@ -770,8 +968,7 @@ function used for completion (specified with the tt(-K) flag to
 tt(compctl)).  If the tt(-c) flag is given, the words of the
 current command are read. If the tt(-l) flag is given, the whole
 line is assigned as a scalar.  If both flags are present, tt(-l)
-is used and tt(-c) is ignored.  If var(name) is omitted then
-tt(REPLY) is used for scalars and tt(reply) for arrays.
+is used and tt(-c) is ignored.
 )
 item(tt(-n))(
 Together with tt(-c), the number of the word the cursor is on is
@@ -780,15 +977,40 @@ read.  Note that the command name is word number 1, not word 0,
 and that when the cursor is at the end of the line, its character
 index is the length of the line plus one.
 )
-item(tt(-u)var(n))(
-Input is read from file descriptor var(n), where var(n) is a single
-digit and must em(not) be separated from tt(-u) by any whitespace.
+item(tt(-u) var(n))(
+Input is read from file descriptor var(n).
 )
 item(tt(-p))(
 Input is read from the coprocess.
 )
+item(tt(-d) var(delim))(
+Input is terminated by the first character of var(delim) instead of
+by newline.
+)
+item(tt(-t) [ var(num) ])(
+Test if input is available before attempting to read.  If var(num)
+is present, it must begin with a digit and will be evaluated
+to give a number of seconds, which may be a floating point number;
+in this case the read times out if input is not available within this
+time.  If var(num) is not present, it is taken to be zero, so that
+tt(read) returns immediately if no input is available.
+If no input is available, return status 1 and do not set any variables.
+ifzman( )
+This option is not available when reading from the editor buffer with
+tt(-z), when called from within completion with tt(-c) or tt(-l), with
+tt(-q) which clears the input queue before reading, or within zle where
+other mechanisms should be used to test for input.
+ifzman( )
+Note that read does not attempt to alter the input processing mode.  The
+default mode is canonical input, in which an entire line is read at a time,
+so usually `tt(read -t)' will not read anything until an entire line has
+been typed.  However, when reading from the terminal with tt(-k)
+input is processed one key at a time; in this case, only availability of
+the first character is tested, so that e.g. `tt(read -t -k 2)' can still
+block on the second character.  Use two instances of `tt(read -t -k)' if
+this is not what is wanted.
+)
 enditem()
-
 If the first argument contains a `tt(?)', the remainder of this
 word is used as a var(prompt) on standard error when the shell
 is interactive.
@@ -821,17 +1043,19 @@ the effect is different for zero and non-zero return status.  With zero
 status (or after an implicit return at the end of the trap), the shell
 will return to whatever it was previously processing; with a non-zero
 status, the shell will behave as interrupted except that the return
-status of the trap is retained.  Note that the signal which caused the
-trap is passed as the first argument, so the statement `tt(return
-$((128PLUS()$1)))' will return the same status as if the signal had not
-been trapped.
+status of the trap is retained.  Note that the numeric value of the signal
+which caused the trap is passed as the first argument, so the statement
+`tt(return $((128PLUS()$1)))' will return the same status as if the signal
+had not been trapped.
 )
+module(sched)(zsh/sched)
 findex(set)
 cindex(parameters, listing)
 cindex(parameters, positional)
 cindex(parameters, setting array)
 cindex(array parameters, setting)
-item(tt(set) [ {tt(PLUS())|tt(-)}var(options) | {tt(PLUS())|tt(-)}tt(o) var(option_name) ] ... [ {tt(PLUS())|tt(-)}tt(A) [ var(name) ] ] [ var(arg) ... ])(
+pindex(KSH_ARRAYS, use of)
+item(tt(set) [ {tt(PLUS())|tt(-)}var(options) | {tt(PLUS())|tt(-)}tt(o) [ var(option_name) ] ] ... [ {tt(PLUS())|tt(-)}tt(A) [ var(name) ] ] [ var(arg) ... ])(
 Set the options for the shell and/or set the positional parameters, or
 declare and set an array.  If the tt(-s) option is given, it causes the
 specified arguments to be sorted before assigning them to the positional
@@ -839,17 +1063,41 @@ parameters (or to the array var(name) if tt(-A) is used).  With tt(PLUS()s)
 sort arguments in descending order.  For the meaning of the other flags, see
 ifzman(zmanref(zshoptions))\
 ifnzman(noderef(Options))\
-.  Flags may be specified by name using the tt(-o) option.
+.  Flags may be specified by name using the tt(-o) option. If no option
+name is supplied with tt(-o), the current option states are printed.
+With tt(PLUS()o) they are printed in a form that can be used as input
+to the shell.
 
-If the tt(-A) flag is specified, var(name) is
-set to an array containing the given var(arg)s. if tt(PLUS()A) is used and
-var(name) is an array, the given arguments will replace the initial
-elements of that array; if no var(name) is specified, all arrays are
-printed.  Otherwise the positional parameters are set.  If no arguments are
-given, then the names and values of all parameters are printed on the
-standard output.  If the only argument is `tt(PLUS())',
-the names of all parameters are printed.
+If the tt(-A) flag is specified, var(name) is set to an array containing
+the given var(arg)s; if no var(name) is specified, all arrays are printed
+together with their values.
+
+If tt(PLUS()A) is used and var(name) is an array, the
+given arguments will replace the initial elements of that array; if no
+var(name) is specified, all arrays are printed without their values.
+
+The behaviour of arguments after tt(-A) var(name) or tt(PLUS()A) var(name)
+depends on whether the option tt(KSH_ARRAYS) is set.  If it is not set, all
+arguments following var(name) are treated as values for the array,
+regardless of their form.  If the option is set, normal option processing
+continues at that point; only regular arguments are treated as values for
+the array.  This means that
+
+example(set -A array -x -- foo)
+
+sets tt(array) to `tt(-x -- foo)' if tt(KSH_ARRAYS) is not set, but sets
+the array to tt(foo) and turns on the option `tt(-x)' if it is set.
+
+If the tt(-A) flag is not present, but there are arguments beyond the
+options, the positional parameters are set.  If the option list (if any)
+is terminated by `tt(-)tt(-)', and there are no further arguments, the
+positional parameters will be unset.
+
+If no arguments and no `tt(-)tt(-)' are given, then the names and values of
+all parameters are printed on the standard output.  If the only argument is
+`tt(PLUS())', the names of all parameters are printed.
 )
+module(setcap)(zsh/cap)
 findex(setopt)
 cindex(options, setting)
 item(tt(setopt) [ {tt(PLUS())|tt(-)}var(options) | \
@@ -875,6 +1123,7 @@ item(tt(source) var(file) [ var(arg) ... ])(
 Same as tt(.), except that the current directory is always searched and
 is always searched first, before directories in tt($path).
 )
+module(stat)(zsh/stat)
 findex(suspend)
 cindex(shell, suspending)
 cindex(suspending the shell)
@@ -888,6 +1137,12 @@ xitem(tt(test) [ var(arg) ... ])
 item(tt([) [ var(arg) ... ] tt(]))(
 Like the system version of tt(test).  Added for compatibility;
 use conditional expressions instead (see noderef(Conditional Expressions)).
+The main differences between the conditional expression syntax and the
+tt(test) and tt([) builtins are:  these commands are not handled
+syntactically, so for example an empty variable expansion may cause an
+argument to be omitted; syntax errors cause status 2 to be returned instead
+of a shell error; and arithmetic operators expect integer arguments rather
+than arithemetic expressions.
 )
 findex(times)
 cindex(shell, timing)
@@ -919,6 +1174,8 @@ If var(sig) is tt(0) or tt(EXIT)
 and the tt(trap) statement is not executed inside the body of a function,
 then the command var(arg) is executed when the shell terminates.
 
+tt(ZERR), tt(DEBUG) and tt(EXIT) traps are not executed inside other traps.
+
 The tt(trap) command with no arguments prints a list of commands
 associated with each signal.
 
@@ -935,6 +1192,11 @@ will print the line number of a command executed after it has run, while
 example(TRAPDEBUG() { print $LINENO; })
 
 will always print the number zero.
+
+Alternative signal names are allowed as described under tt(kill) above.
+Defining a trap under either name causes any trap under an alternative
+name to be removed.  However, it is recommended that for consistency
+users stick exclusively to one name or another.
 )
 findex(true)
 cindex(doing nothing, successfully)
@@ -960,10 +1222,12 @@ Equivalent to tt(whence -v).
 findex(typeset)
 cindex(parameters, setting)
 cindex(parameters, declaring)
-xitem(tt(typeset) [ {tt(PLUS())|tt(-)}tt(AEFLRUZafghilrtuxm) [var(n)]] [ \
+xitem(tt(typeset) [ {tt(PLUS())|tt(-)}tt(AEFHUafghklprtuxmz) ] [ tt(-LRZi) \
+[ var(n) ]] [ \
 var(name)[tt(=)var(value)] ... ])
-item(tt(typeset) -T [ {tt(PLUS()|tt(-))}tt(LRUZrux) ] \
-  var(SCALAR)[tt(=)var(value)] var(array))(
+item(tt(typeset) -T [ {tt(PLUS()|tt(-))}tt(Urux) ] \
+ [ tt(-LRZ) [ var(n) ]] \
+ var(SCALAR)[tt(=)var(value)] var(array) tt([) var(sep) tt(]))(
 Set or display attributes and values for shell parameters.
 
 A parameter is created for each var(name) that does not already refer
@@ -972,55 +1236,77 @@ var(name) (even those that already exist), and is unset again when the
 function completes.  See
 ifzman(`Local Parameters' in zmanref(zshparam))\
 ifnzman(noderef(Local Parameters))\
-.  Local parameters are not exported unless tt(ALL_EXPORT) is set, in
-which case the parameter is exported em(only) when var(name) does not
-already exist.  The same rules apply to special shell parameters, which
+.  The same rules apply to special shell parameters, which
 retain their special attributes when made local.
 
 For each var(name)tt(=)var(value) assignment, the parameter
-var(name) set to var(value).  Note that arrays currently cannot be
+var(name) is set to var(value).  Note that arrays currently cannot be
 assigned in tt(typeset) expressions, only scalars and integers.
 
-For each remaining var(name) that refers to a parameter that is set, the
-name and value of the parameter are printed in the form of an assignment.
-Nothing is printed for newly-created parameters, or if any attribute flags
-listed below are given.  Using `tt(PLUS())' instead of minus to introduce
-an attribute turns it off.
-
-If the tt(-T) option is given, exactly two (or zero) var(name)
-arguments must be present.  They represent a scalar and an array (in
-that order) that will be tied together in the manner of tt($PATH) and
-tt($path).  In other words, an array present in the latter variable
-appears as a scalar with the elements of the array joined by colons in
-the former.  Only the scalar may have an initial value.  Both the
-scalar and the array may otherwise be manipulated as normal.  If one
-is unset, the other will automatically be unset too.  There is no way
-of untying the variables without unsetting them, or converting the
-type of one them with another tt(typeset) command; tt(+T) does not work,
-assigning an array to var(SCALAR) is an error, and assigning a scalar
-to var(array) sets it to be a single-element array.  Note that
-both tt(typeset -xT ...) and tt(export -T ...) work, but only the
-scalar will be marked for export.
-
-The flag tt(-g) (global) flag is treated specially: it means that any
+If the shell option tt(TYPESET_SILENT) is not set, for each remaining
+var(name) that refers to a parameter that is set, the name and value of the
+parameter are printed in the form of an assignment.  Nothing is printed for
+newly-created parameters, or when any attribute flags listed below are
+given along with the var(name).  Using `tt(PLUS())' instead of minus to
+introduce an attribute turns it off.
+
+If the tt(-p) option is given, parameters and values are printed in the
+form of a typeset comand and an assignment (which will be printed
+separately for arrays and associative arrays), regardless of other flags
+and options.  Note that the tt(-h) flag on parameters is respected; no
+value will be shown for these parameters.
+
+If the tt(-T) option is given, two or three arguments must be present (an
+exception is that zero arguments are allowed to show the list of parameters
+created in this fashion).  The first two are the name of a scalar and an
+array parameter (in that order) that will be tied together in the manner of
+tt($PATH) and tt($path).  The optional third argument is a single-character
+separator which will be used to join the elements of the array to form the
+scalar; if absent, a colon is used, as with tt($PATH).  Only the first
+character of the separator is significant; any remaining characters are
+ignored.  Only the scalar parameter may be assigned an initial value.  Both
+the scalar and the array may otherwise be manipulated as normal.  If one is
+unset, the other will automatically be unset too.  There is no way of
+untying the variables without unsetting them, or converting the type of one
+of them with another tt(typeset) command; tt(+T) does not work, assigning
+an array to var(SCALAR) is an error, and assigning a scalar to var(array)
+sets it to be a single-element array.  Note that both `tt(typeset -xT ...)'
+and `tt(export -T ...)' work, but only the scalar will be marked for
+export.  Setting the value using the scalar version causes a split on all
+separators (which cannot be quoted).
+
+The tt(-g) (global) flag is treated specially: it means that any
 resulting parameter will not be restricted to local scope.  Note that this
 does not necessarily mean that the parameter will be global, as the flag
 will apply to any existing parameter (even if unset) from an enclosing
 function.  This flag does not affect the parameter after creation, hence it
 has no effect when listing existing parameters, nor does the flag tt(+g)
-have any effect.
+have any effect except in combination with tt(-m) (see below).
 
 If no var(name) is present, the names and values of all parameters are
 printed.  In this case the attribute flags restrict the display to only
 those parameters that have the specified attributes, and using `tt(PLUS())'
 rather than `tt(-)' to introduce the flag suppresses printing of the values
-of parameters when there is no parameter name.  Also, if the option list
-ends with `tt(PLUS())', values will not be printed.  If only the tt(-m)
-flag is given the arguments are taken as patterns (which should be quoted)
-and all parameters (or functions with the tt(-f) flag) with matching names
-are printed.  If no attribute flags and no tt(-m) flag is present, the
-parameter names will be preceded by a list of any attributes (tt(array),
-tt(association), tt(exported), tt(integer), tt(readonly)).
+of parameters when there is no parameter name.  Also, if the last option
+is the word `tt(PLUS())', then names are printed but values are not.
+
+If the tt(-m) flag is given the var(name) arguments are taken as patterns
+(which should be quoted).  With no attribute flags, all parameters (or
+functions with the tt(-f) flag) with matching names are printed (the shell
+option tt(TYPESET_SILENT) is not used in this case).  Note that tt(-m) is
+ignored if no patterns are given.  If the tt(+g) flag is combined with
+tt(-m), a new local parameter is created for every matching parameter that
+is not already local.  Otherwise tt(-m) applies all other flags or
+assignments to the existing parameters.  Except when assignments are made
+with var(name)tt(=)var(value), using tt(+m) forces the matching parameters
+to be printed, even inside a function.
+
+If no attribute flags are given and either no tt(-m) flag is present or
+the tt(+m) form was used, each parameter name printed is preceded by a
+list of the attributes of that parameter (tt(array), tt(association),
+tt(exported), tt(integer), tt(readonly)).  If tt(+m) is used with attribute
+flags, and all those flags are introduced with tt(PLUS()), the matching
+parameter names are printed but their values are not.
 
 The following attribute flags may be specified:
 
@@ -1033,20 +1319,21 @@ ifnzman(noderef(Array Parameters))\
 )
 item(tt(-L))(
 Left justify and remove leading blanks from var(value).
-If var(n) is nonzero, it defines the width of the field;
-otherwise it is determined by the width of the value of the first
-assignment.
+If var(n) is nonzero, it defines the width of the field.
+If var(n) is zero, the width is determined by the width of the value of
+the first assignment.  In the case of numeric parameters, the length of the
+complete value assigned to the parameter is used to determine the width,
+not the value that would be output.
 When the parameter is expanded, it is filled on the right with
 blanks or truncated if necessary to fit the field.
+Note truncation can lead to unexpected results with numeric parameters.
 Leading zeros are removed if the tt(-Z) flag is also set.
 )
 item(tt(-R))(
-Right justify and fill with leading blanks.  If var(n) is nonzero
-if defines the width of the field;
-otherwise it is determined by the width of the value of the first
-assignment.
-When the parameter is expanded, the field is left filled with
-blanks or truncated from the end.
+Similar to tt(-L), except that right justification is used;
+when the parameter is expanded, the field is left filled with
+blanks or truncated from the end.  May not be combined with the tt(-Z)
+flag.
 )
 item(tt(-U))(
 For arrays (but not for associative arrays), keep only the first
@@ -1055,11 +1342,12 @@ colon-separated special parameters like tt(PATH) or tt(FIGNORE), etc.
 This flag has a different meaning when used with tt(-f); see below.
 )
 item(tt(-Z))(
-Right justify and fill with leading zeros if the first non-blank
-character is a digit and the tt(-L) flag has not been set.
-If var(n) is nonzero it defines the width of the field;
-otherwise it is determined by the width of the value of the
-first assignment.
+Specially handled if set along with the tt(-L) flag.
+Otherwise, similar to tt(-R), except that leading zeros are used for
+padding instead of blanks if the first non-blank character is a digit.
+Numeric parameters are specially handled: they are always eligible
+for padding with zeroes, and the zeroes are inserted at an appropriate
+place in the output.
 )
 item(tt(-a))(
 The names refer to array parameters.  An array parameter may be
@@ -1069,18 +1357,21 @@ shown.
 )
 item(tt(-f))(
 The names refer to functions rather than parameters.  No assignments
-can be made, and the only other valid flags are tt(-t), tt(-u) and
-tt(-U).  The flag tt(-t) turns on execution tracing for this
+can be made, and the only other valid flags are tt(-t), tt(-k), tt(-u),
+tt(-U) and tt(-z).  The flag tt(-t) turns on execution tracing for this
 function.  The tt(-u) and tt(-U) flags cause the function to be
 marked for autoloading; tt(-U) also causes alias expansion to be
 suppressed when the function is loaded.  The tt(fpath) parameter
 will be searched to find the function definition when the function
-is first referenced; see noderef(Functions).
+is first referenced; see noderef(Functions). The tt(-k) and tt(-z) flags
+make the function be loaded using ksh-style or zsh-style autoloading
+respectively. If neither is given, the setting of the KSH_AUTOLOAD option
+determines how the function is loaded.
 )
 item(tt(-h))(
 Hide: only useful for special parameters (those marked `<S>' in the table in
 ifzman(zmanref(zshparams))\
-ifnzman(noderef(Parameters))\
+ifnzman(noderef(Parameters Set By The Shell))\
 ), and for local parameters with the same name as a special parameter,
 though harmless for others.  A special parameter with this attribute will
 not retain its special effect when made local.  Thus after `tt(typeset -h
@@ -1092,9 +1383,19 @@ special tt(PATH) parameter is not altered in any way.  It is also possible
 to create a local parameter using `tt(typeset +h )var(special)', where the
 local copy of var(special) will retain its special properties regardless of
 having the tt(-h) attribute.  Global special parameters loaded from shell
-modules (currently those in tt(mapfile) and tt(parameter)) are
+modules (currently those in tt(zsh/mapfile) and tt(zsh/parameter)) are
 automatically given the tt(-h) attribute to avoid name clashes.
 )
+item(tt(-H))(
+Hide value: specifies that tt(typeset) will not display the value of the
+parameter when listing parameters; the display for such parameters is
+always as if the `tt(PLUS())' flag had been given.  Use of the parameter is
+in other respects normal, and the option does not apply if the parameter is
+specified by name, or by pattern with the tt(-m) option.  This is on by
+default for the parameters in the tt(zsh/parameter) and tt(zsh/mapfile)
+modules.  Note, however, that unlike the tt(-h) flag this is also useful
+for non-special parameters.
+)
 item(tt(-i))(
 Use an internal integer representation.  If var(n) is nonzero it
 defines the output arithmetic base, otherwise it is determined by the
@@ -1117,7 +1418,9 @@ Convert the result to lower case whenever the parameter is expanded.
 The value is em(not) converted when assigned.
 )
 item(tt(-r))(
-The given var(name)s are marked readonly.
+The given var(name)s are marked readonly.  Note that if var(name) is a
+special parameter, the readonly attribute can be turned on, but cannot then
+be turned off.
 )
 item(tt(-t))(
 Tags the named parameters.  Tags have no special meaning to the shell.
@@ -1130,17 +1433,21 @@ This flag has a different meaning when used with tt(-f); see above.
 )
 item(tt(-x))(
 Mark for automatic export to the environment of subsequently
-executed commands.
+executed commands.  If the option tt(GLOBAL_EXPORT) is set, this implies
+the option tt(-g), unless tt(+g) is also explicitly given; in other words
+the parameter is not made local to the enclosing function.  This is for
+compatibility with previous versions of zsh.
 )
 enditem()
 )
 findex(ulimit)
 cindex(resource limits)
 cindex(limits, resource)
-item(tt(ulimit) [ tt(-SHacdflmnpstv) [ var(limit) ] ... ])(
+item(tt(ulimit) [ [ tt(-SHacdfilmnpqstvx) | tt(-N) var(resource) [ var(limit) ] ... ])(
 Set or display resource limits of the shell and the processes started by
 the shell.  The value of var(limit) can be a number in the unit specified
-below or the value `tt(unlimited)'.  If the tt(-H) flag is given use
+below or the value `tt(unlimited)'.  By default, only soft limits are
+manipulated. If the tt(-H) flag is given use
 hard limits instead of soft limits.  If the tt(-S) flag is given
 together with the tt(-H) flag set both hard and soft limits.  If no
 options are used, the file size limit (tt(-f)) is assumed.  If
@@ -1148,19 +1455,37 @@ var(limit) is omitted the current value of the specified resources are
 printed.  When more than one resource values are printed the limit name and
 unit is printed before each value.
 
+When looping over multiple resources, the shell will abort immediately if
+it detects a badly formed argument.  However, if it fails to set a limit
+for some other reson it will continue trying to set the remaining limits.
+
 startsitem()
 sitem(tt(-a))(Lists all of the current resource limits.)
 sitem(tt(-c))(512-byte blocks on the size of core dumps.)
 sitem(tt(-d))(K-bytes on the size of the data segment.)
 sitem(tt(-f))(512-byte blocks on the size of files written.)
+sitem(tt(-i))(The number of pending signals.)
 sitem(tt(-l))(K-bytes on the size of locked-in memory.)
 sitem(tt(-m))(K-bytes on the size of physical memory.)
 sitem(tt(-n))(open file descriptors.)
+sitem(tt(-q))(Bytes in POSIX message queues.)
 sitem(tt(-s))(K-bytes on the size of the stack.)
 sitem(tt(-t))(CPU seconds to be used.)
 sitem(tt(-u))(processes available to the user.)
-sitem(tt(-v))(K-bytes on the size of virtual memory.)
+sitem(tt(-v))(K-bytes on the size of virtual memory.  On some systems this
+refers to the limit called `address space'.)
+sitem(tt(-x))(The number of locks on files.)
 endsitem()
+
+A resource may also be specified by integer in the form `tt(-N)
+var(resource)', where var(resource) corresponds to the integer defined for
+the resource by the operating system.  This may be used to set the limits
+for resources known to the shell which do not correspond to option letters.
+Such limits will be shown by number in the output of `tt(ulimit -a)'.
+
+The number may alternatively be out of the range of limits compiled into
+the shell.  The shell will try to read or write the limit anyway, and
+will report an error if this fails.
 )
 findex(umask)
 cindex(umask)
@@ -1178,10 +1503,12 @@ alias(unalias)(unhash -a)
 cindex(functions, removing)
 alias(unfunction)(unhash -f)
 findex(unhash)
-item(tt(unhash) [ tt(-adfm) ] var(name) ...)(
+item(tt(unhash) [ tt(-adfms) ] var(name) ...)(
 Remove the element named var(name) from an internal hash table.  The
 default is remove elements from the command hash table.  The tt(-a)
-option causes tt(unhash) to remove aliases.  The tt(-f) option causes
+option causes tt(unhash) to remove regular or global aliases.
+The tt(-s) option causes tt(unhash) to remove suffix aliases.
+The tt(-f) option causes
 tt(unhash) to remove shell functions.  The tt(-d) options causes
 tt(unhash) to remove named directories.  If the tt(-m) flag is given
 the arguments are taken as patterns (should be quoted) and all elements
@@ -1199,7 +1526,7 @@ flag is given.
 )
 findex(unset)
 cindex(parameters, unsetting)
-item(tt(unset) [ tt(-fm) ] var(name) ...)(
+item(tt(unset) [ tt(-fmv) ] var(name) ...)(
 Each named parameter is unset.
 Local parameters remain local even if unset; they appear unset within scope,
 but the previous value will still reappear when the scope ends.
@@ -1213,6 +1540,9 @@ be quoted) and all parameters with matching names are unset.  Note that this
 cannot be used when unsetting associative array elements, as the subscript
 will be treated as part of the pattern.
 
+The tt(-v) flag specifies that var(name) refers to parameters. This is the
+default behaviour.
+
 tt(unset -f) is equivalent to tt(unfunction).
 )
 findex(unsetopt)
@@ -1226,6 +1556,7 @@ If the tt(-m) flag is given the arguments are taken as patterns
 (which should be quoted to preserve them from being interpreted as glob
 patterns), and all options with names matching these patterns are unset.
 )
+zlecmd(vared)
 findex(wait)
 cindex(waiting for jobs)
 cindex(jobs, waiting for)
@@ -1291,55 +1622,74 @@ item(tt(which) [ tt(-wpams) ] var(name) ...)(
 Equivalent to tt(whence -c).
 )
 findex(zcompile)
-cindex(wordcode, creation)
+cindex(.zwc files, creation)
 cindex(compilation)
-xitem(tt(zcompile) [ tt(-U) ] [ tt(-z) | tt(-k) ] [ tt(-r) | tt(-m) ] var(file) [ var(name) ... ])
-xitem(tt(zcompile) tt(-c) [ tt(-M) ] [ tt(-z) | tt(-k) ] [ tt(-r) | tt(-m) ] var(file) [ var(name) ... ])
+xitem(tt(zcompile) [ tt(-U) ] [ tt(-z) | tt(-k) ] [ tt(-R) | tt(-M) ] var(file) [ var(name) ... ])
+xitem(tt(zcompile) tt(-ca) [ tt(-m) ] [ tt(-R) | tt(-M) ] var(file) [ var(name) ... ])
 item(tt(zcompile -t) var(file) [ var(name) ... ])(
-This builtin command can be used to compile functions or scripts and
-store the compiled form in a file, and to examine files containing
+This builtin command can be used to compile functions or scripts,
+storing the compiled form in a file, and to examine files containing
 the compiled form.  This allows faster autoloading of functions and
 execution of scripts by avoiding parsing of the text when the files
 are read.
 
-The first form (without the tt(-c) or tt(-t) options) creates a
-compiled file.  If only the var(file) argument is provided, the
+The first form (without the tt(-c), tt(-a) or tt(-t) options) creates a
+compiled file.  If only the var(file) argument is given, the
 output file has the name `var(file)tt(.zwc)' and will be placed in
-the same directory as the var(file).  This will make the compiled
-file be loaded instead of the normal function file when the function
-is autoloaded (see
+the same directory as the var(file).  The shell will load the compiled
+file instead of the normal function file when the function
+is autoloaded; see
 ifzman(\
 the section `Autoloading Functions' in zmanref(zshfunc)
 )\
 ifnzman(\
 noderef(Functions)
 )\
-for a description of how autoloaded functions are searched).  The
-extension tt(.zwc) stands for `zsh word codes'.
-
-If there is at least one var(name) argument, all those named files
-are compiled into one output var(file).  If var(file) does not end
-in tt(.zwc), this extension is automatically appended.  Files
-containing multiple compiled functions are called `digest' files,
-and are intended to be used as elements of the tt(FPATH)/tt(fpath)
+for a description of how autoloaded functions are searched.  The
+extension tt(.zwc) stands for `zsh word code'.
+
+If there is at least one var(name) argument, all the named files
+are compiled into the output var(file) given as the first argument.  If
+var(file) does not end in tt(.zwc), this extension is automatically
+appended.  Files containing multiple compiled functions are called `digest'
+files, and are intended to be used as elements of the tt(FPATH)/tt(fpath)
 special array.
 
-The second form, with the tt(-c) option, writes the definitions for
-all the named functions into var(file).  The names must be functions
-currently defined in the shell or marked for autoloading.  If the
-tt(-M) option is given, too, the var(name)s are used as patterns and
-all functions whose names match one of these patterns will be
-written. If no var(name) is given, the definitions of all functions
-currently defined or marked as autoloaded will be written.
+The second form, with the tt(-c) or tt(-a) options, writes the compiled
+definitions for all the named functions into var(file).  For tt(-c), the
+names must be functions currently defined in the shell, not those marked
+for autoloading.  Undefined functions that are marked for autoloading
+may be written by using the tt(-a) option, in which case the tt(fpath)
+is searched and the contents of the definition files for those
+functions, if found, are compiled into var(file).  If both tt(-c) and
+tt(-a) are given, names of both defined functions and functions marked
+for autoloading may be given.  In either case, the functions in files
+written with the tt(-c) or tt(-a) option will be autoloaded as if the
+tt(KSH_AUTOLOAD) option were unset.
+
+The reason for handling loaded and not-yet-loaded functions with
+different options is that some definition files for autoloading define
+multiple functions, including the function with the same name as the
+file, and, at the end, call that function.  In such cases the output of
+`tt(zcompile -c)' does not include the additional functions defined in
+the file, and any other initialization code in the file is lost.  Using
+`tt(zcompile -a)' captures all this extra information.
+
+If the tt(-m) option is combined with tt(-c) or tt(-a),
+the var(name)s are used as patterns and all functions whose names
+match one of these patterns will be written. If no var(name) is given,
+the definitions of all functions currently defined or marked as
+autoloaded will be written.
 
 The third form, with the tt(-t) option, examines an existing
 compiled file.  Without further arguments, the names of the original
-files compiled into it are listed.  The first line of output tells
+files compiled into it are listed.  The first line of output shows
 the version of the shell which compiled the file and how the file
-will be used (mapping or reading the file).  With arguments, nothing
-is output and the return value is set to zero if em(all) var(name)s
-name files contained in the wordcode file, and non-zero if at least
-one var(name) is not contained in it.
+will be used (i.e. by reading it directly or by mapping it into memory).
+With arguments, nothing is output and the return value is set to zero if
+definitions for em(all) var(name)s were found in the compiled
+file, and non-zero if the definition for at least one var(name) was not
+found.
 
 Other options:
 
@@ -1347,67 +1697,78 @@ startitem()
 item(tt(-U))(
 Aliases are not expanded when compiling the var(name)d files.
 )
-item(tt(-r))(
+item(tt(-R))(
 When the compiled file is read, its contents are copied into the
-shell's memory, rather than memory-mapped (see tt(-m)).  This
+shell's memory, rather than memory-mapped (see tt(-M)).  This
 happens automatically on systems that do not support memory mapping.
 
 When compiling scripts instead of autoloadable functions, it is
-often desirable to use this option. Otherwise the whole file will
-remain mapped if the script has defined one or more functions, even
-if the rest of the file will not be used again.
+often desirable to use this option; otherwise the whole file, including the
+code to define functions which have already been defined, will
+remain mapped, consequently wasting memory.
 )
-item(tt(-m))(
+item(tt(-M))(
 The compiled file is mapped into the shell's memory when read. This
 is done in such a way that multiple instances of the shell running
-on the same host will share this mapped file.  If neither tt(-r) nor
-tt(-m) is given, the tt(zcompile) builtin decides what to do based
+on the same host will share this mapped file.  If neither tt(-R) nor
+tt(-M) is given, the tt(zcompile) builtin decides what to do based
 on the size of the compiled file.
 )
 xitem(tt(-k))
 item(tt(-z))(
-These options are used when the compiled file contains functions and
-those functions are to be autoloaded. If tt(-z) is given, the
-function will be autoloaded as if the tt(KSHAUTOLOAD) option is
+These options are used when the compiled file contains functions which
+are to be autoloaded. If tt(-z) is given, the
+function will be autoloaded as if the tt(KSH_AUTOLOAD) option is
 em(not) set, even if it is set at the time the compiled file is
-read. The tt(-k) makes the function be loaded as if tt(KASHAUTOLOAD)
-em(is) set.  If neither of these options is given, the function will
-be loaded as determined by the setting of the tt(KSHAUTOLOAD) option
-at the time the compiled file is read.
-
-These options may also be repeated among the listed var(name)s to
-specify the loading style of all following functions, up to the next
-tt(-k) or tt(-z).
+read, while if the tt(-k) is given, the function will be loaded as if
+tt(KSH_AUTOLOAD) em(is) set.  These options also take precedence over
+any tt(-k) or tt(-z) options specified to the tt(autoload) builtin. If
+neither of these options is given, the function will be loaded as
+determined by the setting of the tt(KSH_AUTOLOAD) option at the time
+the compiled file is read.
+ifzman( )
+These options may also appear as many times as necessary between the listed
+var(name)s to specify the loading style of all following functions, up to
+the next tt(-k) or tt(-z).
+)
+ifnzman(enditem()
 )
-enditem()
-
 The created file always contains two versions of the compiled
 format, one for big-endian machines and one for small-endian
-machines. The upshot of this is that the compiled file is machine
+machines.  The upshot of this is that the compiled file is machine
 independent and if it is read or mapped, only one half of the file
 is actually used (and mapped).
+ifzman(enditem())
 )
+module(zformat)(zsh/zutil)
+module(zftp)(zsh/zftp)
+zlecmd(zle)
 findex(zmodload)
 cindex(modules, loading)
 cindex(loading modules)
 xitem(tt(zmodload) [ tt(-dL) ] [ ... ])
-xitem(tt(zmodload -e) [ ... ])
+xitem(tt(zmodload -e) [ tt(-A) ] [ ... ])
 xitem(tt(zmodload) [ tt(-a) [ tt(-bcpf) [ tt(-I) ] ] ] [ tt(-iL) ] ...)
-item(tt(zmodload) tt(-u) [ tt(-abcdpf) [ tt(-I) ] ] [ tt(-iL) ] ...)(
-tt(zmodload) performs operations relating to zsh's loadable modules.
-This feature is not available on all operating systems,
-or on all installations on a particular operating system.
-
-Without arguments all currently loaded binary modules are printed.
-The tt(-L) option causes this list to be in the form of a series of
-tt(zmodload) commands.  Forms with arguments are:
+xitem(tt(zmodload) tt(-u) [ tt(-abcdpf) [ tt(-I) ] ] [ tt(-iL) ] ...)
+xitem(tt(zmodload) tt(-A) [ tt(-L) ] [ var(modalias)[tt(=)var(module)] ... ])
+item(tt(zmodload) tt(-R) var(modalias) ... )(
+Performs operations relating to zsh's loadable modules.
+Loading of modules while the shell is running (`dynamical loading') is not
+available on all operating systems, or on all installations on a particular
+operating system, although the tt(zmodload) command itself is always
+available and can be used to manipulate modules built into versions of the
+shell executable without dynamical loading.
+
+Without arguments the names of all currently loaded binary modules are
+printed.  The tt(-L) option causes this list to be in the form of a
+series of tt(zmodload) commands.  Forms with arguments are:
 
 startitem()
 xitem(tt(zmodload) [ tt(-i) ] var(name) ... )
 item(tt(zmodload) tt(-u) [ tt(-i) ] var(name) ...)(
 In the simplest case, tt(zmodload) loads a binary module.  The module must
 be in a file with a name consisting of the specified var(name) followed by
-a standard suffix, usually `tt(.so)'.
+a standard suffix, usually `tt(.so)' (`tt(.sl)' on HPUX).
 If the module to be loaded is
 already loaded and the tt(-i) option is given, the duplicate module is
 ignored.  Otherwise tt(zmodload) prints an error message.
@@ -1484,7 +1845,7 @@ tt(zmodload) work on autoloaded parameters instead.
 xitem(tt(zmodload) tt(-af) [ tt(-L) ])
 xitem(tt(zmodload) tt(-af) [ tt(-i) ] var(name) [ var(function) ... ])
 item(tt(zmodload) tt(-uf) [ tt(-i) ] var(function) ...)(
-The tt(-p) option is like the tt(-b), tt(-p), and tt(-c) options, but
+The tt(-f) option is like the tt(-b), tt(-p), and tt(-c) options, but
 makes tt(zmodload) work on autoloaded math functions instead. 
 )
 xitem(tt(zmodload) tt(-a) [ tt(-L) ])
@@ -1492,21 +1853,68 @@ xitem(tt(zmodload) tt(-a) [ tt(-i) ] var(name) [ var(builtin) ... ])
 item(tt(zmodload) tt(-ua) [ tt(-i) ] var(builtin) ...)(
 Equivalent to tt(-ab) and tt(-ub).
 )
-item(tt(zmodload -e) [ var(string) ... ])(
-The tt(-e) option without arguments lists all loaded modules loaded.
-With arguments only the return status is set to zero
+item(tt(zmodload -e) [ tt(-A) ] [ var(string) ... ])(
+The tt(-e) option without arguments lists all loaded modules; if the tt(-A)
+option is also given, module aliases corresponding to loaded modules are
+also shown.  With arguments only the return status is set to zero
 if all var(string)s given as arguments are names of loaded modules
 and to one if at least on var(string) is not the name of a
-loaded module. This can be used to test for the availability 
-of things implemented by modules.
+loaded module.  This can be used to test for the availability 
+of things implemented by modules.  In this case, any aliases are
+automatically resolved and the tt(-A) flag is not used.
+)
+item(tt(zmodload) tt(-A) [ tt(-L) ] [ var(modalias)[tt(=)var(module)] ... ])(
+For each argument, if both var(modalias) and var(module) are given,
+define var(modalias) to be an alias for the module var(module).
+If the module var(modalias) is ever subsequently requested, either via a
+call to tt(zmodload) or implicitly, the shell will attempt to load
+var(module) instead.  If var(module) is not given, show the definition of
+var(modalias).  If no arguments are given, list all defined module aliases.
+When listing, if the tt(-L) flag was also given, list the definition as a
+tt(zmodload) command to recreate the alias.
+
+The existence of aliases for modules is completely independent of whether
+the name resolved is actually loaded as a module: while the alias exists,
+loading and unloading the module under any alias has exactly the same
+effect as using the resolved name, and does not affect the connection
+between the alias and the resolved name which can be removed either by
+tt(zmodload -R) or by redefining the alias.  Chains of aliases (i.e. where
+the first resolved name is itself an alias) are valid so long as these are
+not circular.  As the aliases take the same format as module names, they
+may include path separators:  in this case, there is no requirement for any
+part of the path named to exist as the alias will be resolved first.  For
+example, `tt(any/old/alias)' is always a valid alias.
+
+Dependencies added to aliased modules are actually added to the resolved
+module; these remain if the alias is removed.  It is valid to create an
+alias whose name is one of the standard shell modules and which resolves to
+a different module.  However, if a module has dependencies, it
+will not be possible to use the module name as an alias as the module will
+already be marked as a loadable module in its own right.
+
+Apart from the above, aliases can be used in the tt(zmodload) command
+anywhere module names are required.  However, aliases will not be
+shown in lists of loaded modules with a bare `tt(zmodload)'.
+)
+item(tt(zmodload) tt(-R) var(modalias) ... )(
+For each var(modalias) argument that was previously defined as a module
+alias via tt(zmodload -A), delete the alias.  If any was not defined, an
+error is caused and the remainder of the line is ignored.
 )
 enditem()
 
-Note that tt(zsh) makes no difference between modules that were linked 
+Note that tt(zsh) makes no distinction between modules that were linked 
 into the shell and modules that are loaded dynamically. In both cases
 this builtin command has to be used to make available the builtins and
 other things defined by modules (unless the module is autoloaded on
-these definitions). This is even true for systems that don't support
+these definitions). This is true even for systems that don't support
 dynamic loading of modules.
 )
+module(zparseopts)(zsh/zutil)
+module(zprof)(zsh/zprof)
+module(zpty)(zsh/zpty)
+module(zregexparse)(zsh/zutil)
+module(zsocket)(zsh/net/socket)
+module(zstyle)(zsh/zutil)
+module(ztcp)(zsh/net/tcp)
 enditem()