about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-07-10 08:59:17 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-07-10 08:59:17 +0000
commit5fcfa125bd4f0006c8207d1652908348f3ea526f (patch)
treeae808a9b4f71468b25760567bee9bb9e9a8cd813 /Doc
parente988866bda1996101ff8792ad959352d516e9e95 (diff)
downloadzsh-5fcfa125bd4f0006c8207d1652908348f3ea526f.tar.gz
zsh-5fcfa125bd4f0006c8207d1652908348f3ea526f.tar.xz
zsh-5fcfa125bd4f0006c8207d1652908348f3ea526f.zip
Better indexing and misc. cleanup in the first tenth or so of the doc.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/arith.yo14
-rw-r--r--Doc/Zsh/builtins.yo3
-rw-r--r--Doc/Zsh/compat.yo5
-rw-r--r--Doc/Zsh/files.yo9
-rw-r--r--Doc/Zsh/func.yo18
-rw-r--r--Doc/Zsh/grammar.yo9
-rw-r--r--Doc/Zsh/intro.yo1
-rw-r--r--Doc/Zsh/invoke.yo7
-rw-r--r--Doc/Zsh/jobs.yo1
-rw-r--r--Doc/Zsh/manual.yo1
-rw-r--r--Doc/Zsh/params.yo8
-rw-r--r--Doc/Zsh/prompt.yo198
-rw-r--r--Doc/Zsh/redirect.yo9
13 files changed, 176 insertions, 107 deletions
diff --git a/Doc/Zsh/arith.yo b/Doc/Zsh/arith.yo
index 4e6fa99f2..2f601057e 100644
--- a/Doc/Zsh/arith.yo
+++ b/Doc/Zsh/arith.yo
@@ -32,6 +32,7 @@ example(let "val = 2 + 1")
 both assigning the value 3 to the shell variable tt(foo) and returning a
 zero status.
 
+cindex(arithmetic base)
 cindex(bases, in arithmetic)
 Integers can be in bases other than 10.
 A leading `tt(0x)' or `tt(0X)' denotes hexadecimal.
@@ -65,6 +66,15 @@ have output base 16, while tt(x) (assuming it does not already exist) is
 implicitly typed by the arithmetic evaluation, where it acquires the output
 base 8.
 
+pindex(C_BASES, use of)
+pindex(OCTAL_ZEROES, use of)
+If the tt(C_BASES) option is set, hexadecimal numbers in the standard C
+format, for example tt(0xFF) instead of the usual `tt(16#FF)'.  If the
+option tt(OCTAL_ZEROES) is also set (it is not by default), octal numbers
+will be treated similarly and hence appear as `tt(077)' instead of
+`tt(8#77)'.  This option has no effect on the output of bases other than
+hexadecimal and octal, and these formats are always understood on input.
+
 When an output base is specified using the `tt([#)var(base)tt(])' syntax,
 an appropriate base prefix will be output if necessary, so that the value
 output is valid syntax for input.  If the tt(#) is doubled, for example
@@ -105,8 +115,8 @@ short-circuiting, and only one of the latter two expressions in a ternary
 operator is evaluated.  Note the precedence of the bitwise AND, OR,
 and XOR operators.
 
-cindex(math functions)
-cindex(functions, math)
+cindex(mathematical functions, use of)
+cindex(functions, math, use of)
 Mathematical functions can be called with the syntax
 `var(func)tt(LPAR())var(args)tt(RPAR())', where the function decides
 if the var(args) is used as a string or a comma-separated list of
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 1c33326eb..cd79b7cfe 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -130,7 +130,8 @@ is specified, then break var(n) levels instead of just one.
 )
 findex(builtin)
 item(tt(builtin) var(name) [ var(args) ... ])(
-Executes the builtin var(name), with the given var(args).
+Executes the builtin var(name), with the given var(args), even if that
+builtin has been disabled (see tt(disable)).
 )
 alias(bye)(exit)
 module(cap)(zsh/cap)
diff --git a/Doc/Zsh/compat.yo b/Doc/Zsh/compat.yo
index f4f9dcb61..bf97fe2ae 100644
--- a/Doc/Zsh/compat.yo
+++ b/Doc/Zsh/compat.yo
@@ -1,8 +1,8 @@
 texinode(Compatibility)(Restricted Shell)()(Invocation)
 sect(Compatibility)
 cindex(compatibility)
-cindex(sh, compatibility)
-cindex(ksh, compatibility)
+cindex(sh compatibility)
+cindex(ksh compatibility)
 Zsh tries to emulate bf(sh) or bf(ksh) when it is invoked as
 tt(sh) or tt(ksh) respectively; more precisely, it looks at the first
 letter of the name by which it was invoked, excluding any initial `tt(r)'
@@ -33,6 +33,7 @@ tt(psvar),
 tt(status),
 tt(watch).
 
+vindex(ENV, use of)
 The usual zsh startup/shutdown scripts are not executed.  Login shells
 source tt(/etc/profile) followed by tt($HOME/.profile).  If the
 tt(ENV) environment variable is set on invocation, tt($ENV) is sourced
diff --git a/Doc/Zsh/files.yo b/Doc/Zsh/files.yo
index aeb4ae885..ae46957b9 100644
--- a/Doc/Zsh/files.yo
+++ b/Doc/Zsh/files.yo
@@ -5,8 +5,12 @@ cindex(files, startup)
 cindex(startup files)
 cindex(files, shutdown)
 cindex(shutdown files)
+pindex(RCS, use of)
+pindex(GLOBAL_RCS, use of)
 pindex(NO_RCS, use of)
 pindex(NO_GLOBAL_RCS, use of)
+vindex(ZDOTDIR, use of)
+@cindex(zshenv)
 Commands are first read from tt(/etc/zshenv); this cannot be overridden.
 Subsequent behaviour is modified by the tt(RCS) and
 tt(GLOBAL_RCS) options; the former affects all startup files, while the
@@ -18,13 +22,17 @@ default.
 
 Commands are then read from tt($ZDOTDIR/.zshenv).
 pindex(LOGIN, use of)
+cindex(zprofile)
 If the shell is a login shell, commands
 are read from tt(/etc/zprofile) and then tt($ZDOTDIR/.zprofile).
+cindex(zshrc)
 Then, if the shell is interactive,
 commands are read from tt(/etc/zshrc) and then tt($ZDOTDIR/.zshrc).
+cindex(zlogin)
 Finally, if the shell is a login shell, tt(/etc/zlogin) and
 tt($ZDOTDIR/.zlogin) are read.
 
+cindex(zlogout)
 When a login shell exits, the files tt($ZDOTDIR/.zlogout) and then
 tt(/etc/zlogout) are read.  This happens with either an explicit exit
 via the tt(exit) or tt(logout) commands, or an implicit exit by reading
@@ -35,6 +43,7 @@ Note also that the tt(RCS) option affects the saving of history files,
 i.e. if tt(RCS) is unset when the shell exits, no history file will be
 saved.
 
+vindex(HOME, use of)
 If tt(ZDOTDIR) is unset, tt(HOME) is used instead.
 Those files listed above as being in tt(/etc) may be in another
 directory, depending on the installation.
diff --git a/Doc/Zsh/func.yo b/Doc/Zsh/func.yo
index 78cfde012..d6bc54599 100644
--- a/Doc/Zsh/func.yo
+++ b/Doc/Zsh/func.yo
@@ -4,7 +4,7 @@ ifzman(\
 sect(Functions)
 )\
 cindex(functions)
-findex(function)
+findex(function, use of)
 Shell functions are defined with the tt(function) reserved word or the
 special syntax `var(funcname) tt(())'.
 Shell functions are read in and stored internally.
@@ -28,10 +28,11 @@ Function identifiers can be listed with the tt(functions) builtin.
 findex(unfunction, use of)
 Functions can be undefined with the tt(unfunction) builtin.
 sect(Autoloading Functions)
-findex(autoload, use of)
 cindex(autoloading functions)
 cindex(functions, autoloading)
 
+findex(autoload, use of)
+vindex(fpath, use of)
 A function can be marked as em(undefined) using the tt(autoload) builtin
 (or `tt(functions -u)' or `tt(typeset -fu)').  Such a function has no
 body.  When the function is first executed, the shell searches for its
@@ -44,6 +45,7 @@ autoload myfunc1 myfunc2 ...)
 The usual alias expansion during reading will be suppressed if the
 tt(autoload) builtin or its equivalent is given the option tt(-U). This is
 recommended for the use of functions supplied with the zsh distribution.
+findex(zcompile, use of)
 Note that for functions precompiled with the tt(zcompile) builtin command
 the flag tt(-U) must be provided when the tt(.zwc) file is created, as the
 corresponding information is compiled into the latter.
@@ -135,14 +137,13 @@ autoload myfunc
 myfunc args...)
 
 In fact, the tt(functions) command outputs `tt(builtin autoload -X)' as
-the body of an autoloaded function.  A true autoloaded function can be
-identified by the presence of the comment `tt(# undefined)' in the body,
-because all comments are discarded from defined functions.  This is done
-so that
+the body of an autoloaded function.  This is done so that
 
 example(eval "$(functions)")
 
-produces a reasonable result.
+produces a reasonable result.  A true autoloaded function can be
+identified by the presence of the comment `tt(# undefined)' in the body,
+because all comments are discarded from defined functions.
 
 To load the definition of an autoloaded function tt(myfunc) without
 executing tt(myfunc), use:
@@ -178,7 +179,7 @@ passed as the first argument, otherwise it is an empty string.  The
 actual command that will be executed (including expanded aliases) is
 passed in two different forms: the second argument is a single-line,
 size-limited version of the command (with things like function bodies
-elided); the third argument contains the full text what what is being
+elided); the third argument contains the full text that is being
 executed.
 )
 item(tt(TRAP)var(NAL))(
@@ -211,6 +212,7 @@ causes the trap to be executed.
 )
 enditem()
 
+findex(trap, use of)
 The functions beginning `tt(TRAP)' may alternatively be defined with the
 tt(trap) builtin:  this may be preferable for some uses, as they are then
 run in the environment of the calling process, rather than in their own
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index e0602d5ff..6b3ea6de1 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -226,7 +226,7 @@ The contents of the line read from standard input is saved
 in the parameter tt(REPLY).  var(list) is executed
 for each selection until a break or end-of-file is encountered.
 )
-cindex(subshells)
+cindex(subshell)
 item(tt(LPAR()) var(list) tt(RPAR()))(
 Execute var(list) in a subshell.  Traps set by the tt(trap) builtin
 are reset to their default values while executing var(list).
@@ -234,6 +234,7 @@ are reset to their default values while executing var(list).
 item(tt({) var(list) tt(}))(
 Execute var(list).
 )
+findex(function)
 xitem(tt(function) var(word) ... [ tt(()) ] [ var(term) ] tt({) var(list) tt(}))
 xitem(var(word) ... tt(()) [ var(term) ] tt({) var(list) tt(}))
 item(var(word) ... tt(()) [ var(term) ] var(command))(
@@ -250,6 +251,7 @@ there is a single var(word);  otherwise, the parentheses will be treated as
 forming a globbing pattern in that case.
 )
 cindex(timing)
+findex(time)
 item(tt(time) [ var(pipeline) ])(
 The var(pipeline) is executed, and timing statistics are
 reported on the standard error in the form specified
@@ -257,7 +259,8 @@ by the tt(TIMEFMT) parameter.
 If var(pipeline) is omitted, print statistics about the
 shell process and its children.
 )
-cindex(testing conditional expression)
+cindex(conditional expression)
+findex([[)
 item(tt([[) var(exp) tt(]]))(
 Evaluates the conditional expression var(exp)
 and return a zero exit status if it is true.
@@ -314,6 +317,7 @@ Another short form of tt(for).
 item(tt(for LPAR()LPAR()) [var(expr1)] tt(;) [var(expr2)] tt(;) [var(expr3)] tt(RPAR()RPAR()) var(sublist))(
 A short form of the arithmetic tt(for) command.
 )
+findex(foreach)
 item(tt(foreach) var(name) ... tt(LPAR()) var(word) ... tt(RPAR()) var(list) tt(end))(
 Another form of tt(for).
 )
@@ -394,6 +398,7 @@ tt(print) builtin, and the resulting string is considered to be
 entirely quoted.  A literal `tt(')' character can be included in the
 string by using the `tt(\')' escape.
 
+@pindex(RC_QUOTES, use of)
 All characters enclosed between a pair of single quotes (tt('')) that
 is not preceded by a `tt($)' are quoted.  A single quote cannot appear
 within single quotes unless the option tt(RC_QUOTES) is set, in which case
diff --git a/Doc/Zsh/intro.yo b/Doc/Zsh/intro.yo
index 95affd9b7..c2244a622 100644
--- a/Doc/Zsh/intro.yo
+++ b/Doc/Zsh/intro.yo
@@ -1,5 +1,6 @@
 texinode(Introduction)(Invocation)(The Z Shell Manual)(Top)
 chapter(Introduction)
+cindex(introduction)
 ifzman(\
 sect(Synopsis)
 Because zsh contains many features, the zsh manual has been split into
diff --git a/Doc/Zsh/invoke.yo b/Doc/Zsh/invoke.yo
index 2d6767975..e0987a1bd 100644
--- a/Doc/Zsh/invoke.yo
+++ b/Doc/Zsh/invoke.yo
@@ -2,8 +2,10 @@ texinode(Invocation)(Files)(Introduction)(Top)
 chapter(Invocation)
 cindex(invocation)
 sect(Invocation Options)
-cindex(flags, shell)
+cindex(shell options)
+cindex(options, shell)
 cindex(shell flags)
+cindex(flags, shell)
 The following flags are interpreted by the shell when invoked to determine
 where the shell will read commands from:
 
@@ -47,6 +49,7 @@ tt(-o) can be stacked up with preceding single-letter options, so for example
 `tt(-xo shwordsplit)' or `tt(-xoshwordsplit)' is equivalent to
 `tt(-x -o shwordsplit)'.
 
+cindex(long option)
 Options may also be specified by name in GNU long option style,
 `tt(--)var(option-name)'.  When this is done, `tt(-)' characters in the
 option name are permitted: they are translated into `tt(_)', and thus ignored.
@@ -58,6 +61,8 @@ Unlike other option syntaxes, GNU-style long options cannot be stacked with
 any other options, so for example `tt(-x-shwordsplit)' is an error,
 rather than being treated like `tt(-x --shwordsplit)'.
 
+cindex(--version)
+cindex(--help)
 The special GNU-style option `tt(--version)' is handled; it sends to standard
 output the shell's version information, then exits successfully.
 `tt(--help)' is also handled; it sends to standard output a list of options
diff --git a/Doc/Zsh/jobs.yo b/Doc/Zsh/jobs.yo
index 98fca58c5..4ae25ed2c 100644
--- a/Doc/Zsh/jobs.yo
+++ b/Doc/Zsh/jobs.yo
@@ -2,6 +2,7 @@ texinode(Jobs & Signals)(Arithmetic Evaluation)(Functions)(Top)
 chapter(Jobs & Signals)
 sect(Jobs)
 cindex(jobs)
+pindex(MONITOR, use of)
 If the tt(MONITOR) option is set,
 an interactive shell associates a em(job) with each pipeline.
 It keeps a table of current jobs, printed by the tt(jobs)
diff --git a/Doc/Zsh/manual.yo b/Doc/Zsh/manual.yo
index b9284e728..787b4a4ce 100644
--- a/Doc/Zsh/manual.yo
+++ b/Doc/Zsh/manual.yo
@@ -7,6 +7,7 @@ This Info file documents Zsh, a freely available UNIX command interpreter
 (shell), which of the standard shells most closely resembles the Korn shell
 (ksh), although it is not completely compatible.
 
+cindex(version)
 Version version(), last updated date().
 )\
 
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 5a9c72ace..9e5dd9193 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -684,6 +684,14 @@ stack gets larger than this, it will be truncated automatically.
 This is useful with the tt(AUTO_PUSHD) option.
 pindex(AUTO_PUSHD, use of)
 )
+vindex(ENV)
+item(tt(ENV))(
+If the tt(ENV) environment variable is set when zsh is invoked as tt(sh)
+or tt(ksh), tt($ENV) is sourced after the profile scripts.  The value of
+tt(ENV) is subjected to parameter expansion, command substitution, and
+arithmetic expansion before being interpreted as a pathname.  Note that
+tt(ENV) is em(not) used unless zsh is emulating bf(sh) or bf(ksh).
+)
 vindex(FCEDIT)
 item(tt(FCEDIT))(
 The default editor for the tt(fc) builtin.
diff --git a/Doc/Zsh/prompt.yo b/Doc/Zsh/prompt.yo
index 80fd736c3..a62418277 100644
--- a/Doc/Zsh/prompt.yo
+++ b/Doc/Zsh/prompt.yo
@@ -3,6 +3,8 @@ chapter(Prompt Expansion)
 ifzman(\
 sect(Prompt Expansion)
 )\
+cindex(prompt expansion)
+cindex(expansion, prompt)
 Prompt sequences undergo a special form of expansion.  This type of expansion
 is also available using the tt(-P) option to the tt(print) builtin.
 
@@ -33,6 +35,7 @@ Some escapes take an optional integer argument, which
 should appear between the `tt(%)' and the next character of the
 sequence.  The following escape sequences are recognized:
 
+subsect(Special characters)
 startitem()
 item(tt(%%))(
 A `tt(%)'.
@@ -40,6 +43,53 @@ A `tt(%)'.
 item(tt(%RPAR()))(
 A `tt(RPAR())'.
 )
+enditem()
+
+subsect(Login information)
+startitem()
+item(tt(%l))(
+The line (tty) the user is logged in on, without `tt(/dev/)' prefix.
+If the name starts with `tt(/dev/tty)', that prefix is stripped.
+)
+item(tt(%M))(
+The full machine hostname.
+)
+item(tt(%m))(
+The hostname up to the first `tt(.)'.
+An integer may follow the `tt(%)' to specify
+how many components of the hostname are desired.  With a negative integer,
+trailing components of the hostname are shown.
+)
+item(tt(%n))(
+tt($USERNAME).
+)
+item(tt(%y))(
+The line (tty) the user is logged in on, without `tt(/dev/)' prefix.
+This does not treat `tt(/dev/tty)' names specially.
+)
+enditem()
+
+subsect(Shell state)
+startitem()
+item(tt(%#))(
+A `tt(#)' if the shell is running with privileges, a `tt(%)' if not.
+Equivalent to `tt(%(!.#.%%))'.
+The definition of `privileged', for these purposes, is that either the
+effective user ID is zero, or, if POSIX.1e capabilities are supported, that
+at least one capability is raised in either the Effective or Inheritable
+capability vectors.
+)
+item(tt(%?))(
+The return code of the last command executed just before the prompt.
+)
+item(tt(%_))(
+The status of the parser, i.e. the shell constructs (like `tt(if)' and
+`tt(for)') that have been started on the command line. If given an integer
+number that many strings will be printed; zero or negative or no integer means
+print as many as there are.  This is most useful in prompts tt(PS2) for
+continuation lines and tt(PS4) for debugging with the tt(XTRACE) option; in
+the latter case it will also work non-interactively.
+)
 xitem(tt(%d))
 item(tt(%/))(
 Present working directory (tt($PWD)).  If an integer follows the `tt(%)',
@@ -56,61 +106,54 @@ xitem(tt(%h))
 item(tt(%!))(
 Current history event number.
 )
+item(tt(%i))(
+The line number currently being executed in the script, sourced file, or
+shell function given by tt(%N).  This is most useful for debugging as part
+of tt($PS4).
+)
 item(tt(%L))(
 The current value of tt($SHLVL).
 )
-item(tt(%M))(
-The full machine hostname.
-)
-item(tt(%m))(
-The hostname up to the first `tt(.)'.
-An integer may follow the `tt(%)' to specify
-how many components of the hostname are desired.  With a negative integer,
-trailing components of the hostname are shown.
+item(tt(%N))(
+The name of the script, sourced file, or shell function that zsh is
+currently executing, whichever was started most recently.  If there is
+none, this is equivalent to the parameter tt($0).  An integer may follow
+the `tt(%)' to specify a number of trailing path components to show; zero
+means the full path.  A negative integer specifies leading components.
 )
-item(tt(%S) LPAR()tt(%s)RPAR())(
-Start (stop) standout mode.
+xitem(tt(%c))
+xitem(tt(%.))
+item(tt(%C))(
+Trailing component of tt($PWD).
+An integer may follow the `tt(%)' to get more than one component.
+Unless `tt(%C)' is used, tilde contraction is performed first.  These are
+deprecated as tt(%c) and tt(%C) are equivalent to tt(%1~) and tt(%1/),
+respectively, while explicit positive integers have the same effect as for
+the latter two sequences.
 )
-item(tt(%U) LPAR()tt(%u)RPAR())(
-Start (stop) underline mode.
+enditem()
+
+subsect(Date and time)
+startitem()
+item(tt(%D))(
+The date in var(yy)tt(-)var(mm)tt(-)var(dd) format.
 )
-item(tt(%B) LPAR()tt(%b)RPAR())(
-Start (stop) boldface mode.
+item(tt(%T))(
+Current time of day, in 24-hour format.
 )
 xitem(tt(%t))
 item(tt(%@))(
 Current time of day, in 12-hour, am/pm format.
 )
-item(tt(%T))(
-Current time of day, in 24-hour format.
-)
 item(tt(%*))(
 Current time of day in 24-hour format, with seconds.
 )
-item(tt(%n))(
-tt($USERNAME).
-)
-item(tt(%N))(
-The name of the script, sourced file, or shell function that zsh is
-currently executing, whichever was started most recently.  If there is
-none, this is equivalent to the parameter tt($0).  An integer may follow
-the `tt(%)' to specify a number of trailing path components to show; zero
-means the full path.  A negative integer specifies leading components.
-)
-item(tt(%i))(
-The line number currently being executed in the script, sourced file, or
-shell function given by tt(%N).  This is most useful for debugging as part
-of tt($PS4).
-)
 item(tt(%w))(
 The date in var(day)tt(-)var(dd) format.
 )
 item(tt(%W))(
 The date in var(mm)tt(/)var(dd)tt(/)var(yy) format.
 )
-item(tt(%D))(
-The date in var(yy)tt(-)var(mm)tt(-)var(dd) format.
-)
 item(tt(%D{)var(string)tt(}))(
 var(string) is formatted using the tt(strftime) function.
 See manref(strftime)(3) for more details.  Three additional codes are
@@ -119,47 +162,37 @@ without any preceding space if the day is a single digit, and
 tt(%K)/tt(%L) correspond to tt(%k)/tt(%l) for the hour of the day
 (24/12 hour clock) in the same way.
 )
-item(tt(%l))(
-The line (tty) the user is logged in on without tt(/dev/) prefix.
-If name starts with tt(/dev/tty) this is stripped.
-)
-item(tt(%y))(
-The line (tty) the user is logged in on without tt(/dev/) prefix.
-It does not treat tt(/dev/tty*) specially.
+enditem()
+
+subsect(Visual effects)
+startitem()
+item(tt(%B) LPAR()tt(%b)RPAR())(
+Start (stop) boldface mode.
 )
-item(tt(%?))(
-The return code of the last command executed just before the prompt.
+item(tt(%E))(
+Clear to end of line.
 )
-item(tt(%_))(
-The status of the parser, i.e. the shell constructs (like `tt(if)' and
-`tt(for)') that have been started on the command line. If given an integer
-number that many strings will be printed; zero or negative or no integer means
-print as many as there are.  This is most useful in prompts tt(PS2) for
-continuation lines and tt(PS4) for debugging with the tt(XTRACE) option; in
-the latter case it will also work non-interactively.
+item(tt(%U) LPAR()tt(%u)RPAR())(
+Start (stop) underline mode.
 )
-item(tt(%E))(
-Clears to end of line.
+item(tt(%S) LPAR()tt(%s)RPAR())(
+Start (stop) standout mode.
 )
-item(tt(%#))(
-A `tt(#)' if the shell is running with privileges, a `tt(%)' if not.
-Equivalent to `tt(%(!.#.%%))'.
-The definition of `privileged', for these purposes, is that either the
-effective user ID is zero, or, if POSIX.1e capabilities are supported, that
-at least one capability is raised in either the Effective or Inheritable
-capability vectors.
+item(tt(%{)...tt(%}))(
+Include a string as a literal escape sequence.
+The string within the braces should not change the cursor
+position.  Brace pairs can nest.
 )
+enditem()
+
+subsect(Conditional substrings)
+startitem()
 item(tt(%v))(
 vindex(psvar, use of)
 The value of the first element of the tt(psvar) array parameter.  Following
 the `tt(%)' with an integer gives that element of the array.  Negative
 integers count from the end of the array.
 )
-item(tt(%{)...tt(%}))(
-Include a string as a literal escape sequence.
-The string within the braces should not change the cursor
-position.  Brace pairs can nest.
-)
 item(tt(%LPAR())var(x.true-text.false-text)tt(RPAR()))(
 Specifies a ternary expression.  The character following the var(x) is
 arbitrary; the same character is used to separate the text for the
@@ -176,26 +209,27 @@ which defaults to zero.  A negative integer will be multiplied by -1.
 The test character var(x) may be any of the following:
 
 startsitem()
+sitem(tt(!))(True if the shell is running with privileges.)
+sitem(tt(#))(True if the effective uid of the current process is var(n).)
+sitem(tt(?))(True if the exit status of the last command was var(n).)
+sitem(tt(_))(True if at least var(n) shell constructs were started.)
+sxitem(tt(C))
+sitem(tt(/))(True if the current absolute path has at least var(n) elements.)
 sxitem(tt(c))
 sxitem(tt(.))
-sitem(tt(~))(True if the current path, with prefix replacement, has at least var(n) elements.)
-sxitem(tt(/))
-sitem(tt(C))(True if the current absolute path has at least var(n) elements.)
-sitem(tt(t))(True if the time in minutes is equal to var(n).)
-sitem(tt(T))(True if the time in hours is equal to var(n).)
-sitem(tt(d))(True if the day of the month is equal to var(n).)
+sitem(tt(~))(True if the current path, with prefix replacement, has at
+least var(n) elements.)
 sitem(tt(D))(True if the month is equal to var(n) (January = 0).)
-sitem(tt(w))(True if the day of the week is equal to var(n) (Sunday = 0).)
-sitem(tt(?))(True if the exit status of the last command was var(n).)
-sitem(tt(#))(True if the effective uid of the current process is var(n).)
+sitem(tt(d))(True if the day of the month is equal to var(n).)
 sitem(tt(g))(True if the effective gid of the current process is var(n).)
+sitem(tt(L))(True if the tt(SHLVL) parameter is at least var(n).)
 sitem(tt(l))(True if at least var(n) characters have already been
 printed on the current line.)
-sitem(tt(L))(True if the tt(SHLVL) parameter is at least var(n).)
 sitem(tt(S))(True if the tt(SECONDS) parameter is at least var(n).)
+sitem(tt(T))(True if the time in hours is equal to var(n).)
+sitem(tt(t))(True if the time in minutes is equal to var(n).)
 sitem(tt(v))(True if the array tt(psvar) has at least var(n) elements.)
-sitem(tt(_))(True if at least var(n) shell constructs were started.)
-sitem(tt(!))(True if the shell is running with privileges.)
+sitem(tt(w))(True if the day of the week is equal to var(n) (Sunday = 0).)
 endsitem()
 )
 xitem(tt(%<)var(string)tt(<))
@@ -237,14 +271,4 @@ current directory, followed by a `tt(%)' or `tt(#)', followed by a
 space.  Without the `tt(%<<)', those two characters would be included
 in the string to be truncated.
 )
-xitem(tt(%c))
-xitem(tt(%.))
-item(tt(%C))(
-Trailing component of tt($PWD).
-An integer may follow the `tt(%)' to get more than one component.
-Unless `tt(%C)' is used, tilde contraction is performed first.  These are
-deprecated as tt(%c) and tt(%C) are equivalent to tt(%1~) and tt(%1/),
-respectively, while explicit positive integers have the same effect as for
-the latter two sequences.
-)
 enditem()
diff --git a/Doc/Zsh/redirect.yo b/Doc/Zsh/redirect.yo
index d65dc133d..308e85ae2 100644
--- a/Doc/Zsh/redirect.yo
+++ b/Doc/Zsh/redirect.yo
@@ -139,6 +139,7 @@ file descriptor 2 would be associated
 with the terminal (assuming file descriptor 1 had been)
 and then file descriptor 1 would be associated with file var(fname).
 sect(Multios)
+cindex(multios)
 pindex(MULTIOS, use of)
 If the user tries to open a file descriptor for writing more than once,
 the shell opens the file descriptor as a pipe to a process that copies
@@ -196,22 +197,22 @@ example(echo foo > bar > baz)
 when tt(MULTIOS) is unset will truncate bar, and write `tt(foo)' into baz.
 
 sect(Redirections with no command)
-vindex(NULLCMD, use of)
-vindex(READNULLCMD, use of)
-pindex(CSH_NULLCMD, use of)
-pindex(SH_NULLCMD, use of)
 When a simple command consists of one or more redirection operators
 and zero or more parameter assignments, but no command name, zsh can
 behave in several ways.
 
+vindex(NULLCMD, use of)
+pindex(CSH_NULLCMD, use of)
 If the parameter tt(NULLCMD) is not set or the option tt(CSH_NULLCMD) is
 set, an error is caused.  This is the bf(csh) behavior and tt(CSH_NULLCMD)
 is set by default when emulating bf(csh).
 
+pindex(SH_NULLCMD, use of)
 If the option tt(SH_NULLCMD) is set, the builtin `tt(:)' is inserted as a
 command with the given redirections.  This is the default when emulating
 bf(sh) or bf(ksh).
 
+vindex(READNULLCMD, use of)
 Otherwise, if the parameter tt(NULLCMD) is set, its value will be used as a
 command with the given redirections.  If both tt(NULLCMD) and
 tt(READNULLCMD) are set, then the value of the latter will be used instead