home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Shells / zsh-3.0.5-MIHS / docs / zsh.info-3 < prev    next >
Encoding:
GNU Info File  |  1997-06-23  |  37.5 KB  |  1,055 lines

  1. This is Info file zsh.info, produced by Makeinfo-1.64 from the input
  2. file ../../zsh-3.0.4/Doc/zsh.texi.
  3.  
  4. This is a texinfo version of the man page for the Z Shell, originally by
  5. Paul Falstad.  It was converted from the `zsh.1' file distributed with
  6. zsh v2.5.0 by Jonathan Hardwick, `jch@cs.cmu.edu' and updated/modified
  7. by Clive Messer, `clive@epos.demon.co.uk' to its present state.
  8.  
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.  
  13.    Permission is granted to copy and distribute modified versions of
  14. this manual under the conditions for verbatim copying, provided also
  15. that the entire resulting derived work is distributed under the terms
  16. of a permission notice identical to this one.
  17.  
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions.
  21.  
  22. 
  23. File: zsh.info,  Node: Miscellaneous,  Prev: Completion,  Up: Zsh Line Editor
  24.  
  25. Miscellaneous
  26. =============
  27.  
  28. `accept-and-hold (`ESC-A' `ESC-a') (unbound) (unbound)'
  29.      Push the contents of the buffer on the buffer stack and execute it.
  30.  
  31. `accept-and-infer-next-history'
  32.      Execute the contents of the buffer.  Then search the history list
  33.      for a line matching the current one and push the event following
  34.      onto the buffer stack.
  35.  
  36. `accept-line (`^J' `^M') (`^J' `^M') (`^J' `^M')'
  37.      Execute the contents of the buffer.
  38.  
  39. `accept-line-and-down-history (`^O') (unbound) (unbound)'
  40.      Execute the current line, and push the next history event on the
  41.      the buffer stack.
  42.  
  43. `vi-cmd-mode (`^X^V') (unbound) (`^[')'
  44.      Enter command mode; that is, use the alternate keymap.  Yes, this
  45.      is bound by default in emacs mode.
  46.  
  47. `vi-caps-lock-panic'
  48.      Hang until any lowercase key is pressed.  This is for vi users
  49.      without the mental capacity to keep track of their caps lock key
  50.      (like the author).
  51.  
  52. `clear-screen (`^L' `ESC-^L') (`^L') (`^L')'
  53.      Clear the screen and redraw the prompt.
  54.  
  55. `describe-key-briefly'
  56.      Waits for keypress, then prints the function bound to the pressed
  57.      key.
  58.  
  59. `exchange-point-and-mark (`^X^X') (unbound) (unbound)'
  60.      Exchange the cursor position with the position of the mark.
  61.  
  62. `execute-named-cmd (`ESC-x') (unbound) (unbound)'
  63.      Read the name of a editor command and execute it.  A restricted
  64.      set of editing functions is available in the mini-buffer.  An
  65.      interrupt signal, as defined by the stty setting, will abort the
  66.      function.  The allowed functions are: `backward-delete-char',
  67.      `vi-backward-delete-char', `clear-screen', `redisplay',
  68.      `quoted-insert', `vi-quoted-insert', `kill-region' (kills the last
  69.      word), `backward-kill-word', `vi-backward-kill-word',
  70.      `kill-whole-line', `vi-kill-line', `backward-kill-line',
  71.      `list-choices', `delete-char-or-list', `complete-word',
  72.      `expand-or-complete', `expand-or-complete-prefix', `accept-line',
  73.      and `vi-cmd-mode' (treated the same as accept line).  The SPC and
  74.      TAB characters, if not bound to one of these functions, will
  75.      complete the name and then list the possibilities if the
  76.      `AUTO_LIST' option is set.  Any string that is bound to an
  77.      out-string (via `bindkey -s') will behave as if out-string were
  78.      typed directly.  Any other character that is not bound to
  79.      `self-insert' or `self-insert-unmeta' will beep and be ignored.
  80.      If the function is called from vi command mode, the bindings of
  81.      the current insert mode will be used.
  82.  
  83. `execute-last-named-cmd (`ESC-z') (unbound) (unbound)'
  84.      Redo the last function executed with `execute-named-cmd'.
  85.  
  86. `get-line (`ESC-G' `ESC-g') (unbound) (unbound)'
  87.      Pop the top line off the buffer stack and insert it at the cursor
  88.      position.
  89.  
  90. `pound-insert (unbound) (`#') (unbound)'
  91.      If there is no `#' character at the beginning of the buffer, add
  92.      one to the beginning of each line.  If there is one, remove a `#'
  93.      from each line that has one.  In either case, accept the current
  94.      line.  The `INTERACTIVE_COMMENTS' option must be set for this to
  95.      have any usefulness.
  96.  
  97. `vi-pound-insert'
  98.      If there is no `#' character at the beginning of the current line,
  99.      add one.  If there is one, remove it.  The `INTERACTIVE_COMMENTS'
  100.      option must be set for this to have any usefulness.
  101.  
  102. `push-input'
  103.      Push the entire current multi-line construct onto the buffer stack
  104.      and return to the top-level (`PS1') prompt.  If the current parser
  105.      construct is only a single line, this is exactly like `push-line'.
  106.      Next time the editor starts up or is popped with `get-line', the
  107.      construct will be popped off the top of the buffer stack and
  108.      loaded into the editing buffer.
  109.  
  110. `push-line (`^Q' `ESC-Q' `ESC-q') (unbound) (unbound)'
  111.      Push the current buffer onto the buffer stack and clear the buffer.
  112.      Next time the editor starts up, the buffer will be popped off the
  113.      top of the buffer stack and loaded into the editing buffer.
  114.  
  115. `push-line-or-edit'
  116.      At the top-level (`PS1') prompt, equivalent to `push-line'.  At a
  117.      secondary (`PS2') prompt, move the entire current multi-line
  118.      construct into the editor buffer.  The latter is equivalent to
  119.      `push-line' followed by `get-line'.
  120.  
  121. `redisplay (unbound) (`^R') (`^R')'
  122.      Redisplays the edit buffer.
  123.  
  124. `send-break (`^G' `ESC-^G') (unbound) (unbound)'
  125.      Abort the current editor function, e.g. `execute-named-command', or
  126.      the editor itself, e.g. if you are in `vared'.  Otherwise abort the
  127.      parsing of the current line.
  128.  
  129. `run-help (`ESC-H' `ESC-h') (unbound) (unbound)'
  130.      Push the buffer onto the buffer stack, and execute the command
  131.      `run-help CMD', where CMD is the current command.  `run-help' is
  132.      normally aliased to `man'.
  133.  
  134. `vi-set-buffer (unbound) (`"') (unbound)'
  135.      Specify a buffer to be used in the following command.  There are
  136.      35 buffers that can be  specified: the  26  "named" buffers `"a'
  137.      to  `"z'  and the nine "queued" buffers "1 to "9.  The named
  138.      buffers can also be specified as `"A' to `"Z'.  When a buffer is
  139.      specified for a cut command, the text being cut replaces the
  140.      previous contents of the specified buffer.  If a named buffer is
  141.      specified using a capital, the newly cut text is appended to the
  142.      buffer instead of overwriting it.  If no buffer is specified for a
  143.      cut command, `"1' is used, and the contents of `"1' to `"8' are
  144.      each shifted along one buffer; the contents of `"9' is lost.
  145.  
  146. `vi-set-mark (unbound) (`m') (unbound)'
  147.      Set the specified mark at the cursor position.
  148.  
  149. `set-mark-command (`^@') (unbound) (unbound)'
  150.      Set the mark at the cursor position.
  151.  
  152. `spell-word (`ESC-$' `ESC-S' `ESC-s') (unbound) (unbound)'
  153.      Attempt spelling correction on the current word.
  154.  
  155. `undefined-key (lots o' keys) (lots o' keys) (unbound)'
  156.      Beep.
  157.  
  158. `undo (`^_' `^Xu' `^X^U') (unbound) (unbound)'
  159.      Incrementally undo the last text modification.
  160.  
  161. `vi-undo-change (unbound) (`u') (unbound)'
  162.      Undo the last text modification.  If repeated, redo the
  163.      modification.
  164.  
  165. `where-is'
  166.      Read the name of an editor command and and print the listing of
  167.      key sequences that invoke the specified command.
  168.  
  169. `which-command (`ESC-?') (unbound) (unbound)'
  170.      Push the buffer onto the buffer stack, and execute the command
  171.      `which-command CMD', where CMD is the current command.
  172.      `which-command' is normally aliased to `whence'.
  173.  
  174. `vi-digit-or-beginning-of-line(unbound) (`0') (unbound)'
  175.      If the last command executed was a digit as part of an argument,
  176.      continue the argument.  Otherwise, execute `vi-beginning-of-line'.
  177.  
  178. 
  179. File: zsh.info,  Node: Parameters,  Next: Options,  Prev: Zsh Line Editor,  Up: Top
  180.  
  181. Parameters
  182. **********
  183.  
  184. A parameter has a name, a value, and a number of attributes.  A name may
  185. be any sequence of alphanumeric characters and `_''s, or the single
  186. characters `*', `@', `#', `?', `-', `$', or `!'.  The value may be
  187. either a scalar (a string), an integer, or an array.  To assign a
  188. scalar or integer value to a parameter, use the `typeset' builtin.  To
  189. assign an array value, use `set -A NAME VALUE ...'.  The value of a
  190. parameter may also be assigned by writing:
  191.  
  192.    `NAME=VALUE ...'
  193.  
  194. If the integer attribute, `-i', is set for NAME, the VALUE is subject
  195. to arithmetic evaluation.
  196.  
  197. * Menu:
  198.  
  199. * Array Parameters::
  200. * Positional Parameters::
  201. * Parameters Set By The Shell::
  202. * Parameters Used By The Shell::
  203.  
  204. 
  205. File: zsh.info,  Node: Array Parameters,  Next: Positional Parameters,  Up: Parameters
  206.  
  207. Array Parameters
  208. ================
  209.  
  210. The value of an array parameter may be assigned by writing:
  211.  
  212.    NAME=(VALUE ...) ...
  213.  
  214. Individual elements of an array may be selected using a subscript.  A
  215. subscript of the form `[EXP]' selects the single element EXP, where EXP
  216. is an arithmetic expression which will be subject to arithmetic
  217. expansion as if it were surrounded by `$((...))'.  The elements are
  218. numbered beginning with 1 unless the `KSH_ARRAYS' option is set when
  219. they are numbered from zero.
  220.  
  221. A subscript of the form `[*]' or `[@]' evaluates to all elements of an
  222. array; there is no difference between the two except when they appear
  223. within double quotes.  `"$foo[*]"' evaluates to `"$foo[1] $foo[2]
  224. ..."', while `"$foo[@]"' evaluates to `"$foo[1]"' `"$foo[2]"', etc.
  225.  
  226. A subscript of the form `[EXP1,EXP2]' selects all elements in the range
  227. EXP1 to EXP2, inclusive.  If one of the subscripts evaluates to a
  228. negative number, say `-N', then the N'th element from the end of the
  229. array is used.  Thus `$foo[-3]' is the third element from the end of
  230. the array `foo', and `$foo[1,-1]' is the same as `$foo[*]'.
  231.  
  232. Subscripting may also be performed on non-array values, in which case
  233. the subscripts specify a substring to be extracted.  For example, if
  234. `FOO' is set to `foobar', then `echo $FOO[2,5]' prints `ooba'.
  235.  
  236. Subscripts may be used inside braces used to delimit a parameter name,
  237. thus `${foo[2]}' is equivalent to `$foo[2]'.  If the `KSH_ARRAYS'
  238. option is set, the braced form is the only one that will work, the
  239. subscript otherwise not being treated specially.
  240.  
  241. If a subscript is used on the left side of an assignment the selected
  242. range is replaced by the expression on the right side.
  243.  
  244. If the opening bracket or the comma is directly followed by an opening
  245. parenthesis the string up to the matching closing parenthesis is
  246. considered to be a list of flags.  The flags currently understood are:
  247.  
  248. `e'
  249.      This option has no effect and retained for backward compatibility
  250.      only.
  251.  
  252. `w'
  253.      If the parameter subscripted is a scalar, then this flag makes
  254.      subscription work on a per-word basis instead of characters.
  255.  
  256. `s:STRING:'
  257.      Defines the STRING that separates words (for use with the `w'
  258.      flag).
  259.  
  260. `p'
  261.      Recognize the same escape sequences as the `print' builtin in the
  262.      string argument of a subsequent `s' flag.
  263.  
  264. `f'
  265.      If the parameter subscripted is a scalar than this flag makes
  266.      subscription work on a per-line basis instead of characters.
  267.      This is a shorthand for `pws:\n:'.
  268.  
  269. `r'
  270.      If this flag is given the exp is taken as a pattern and the result
  271.      is the first matching array element, substring or word (if the
  272.      parameter is an array, if it is a scalar, or if it is a scalar and
  273.      the `w' flag is given, respectively); note that this is like
  274.      giving a number: `$foo[(r)??,3]' and `$foo[(r)??,(r)f*]' work.
  275.  
  276. `R'
  277.      Like `r', but gives the last match.
  278.  
  279. `i'
  280.      Like `r', but gives the index of the match instead; this may not be
  281.      combined with a second argument.
  282.  
  283. `I'
  284.      Like `i', but gives the index of the last match.
  285.  
  286. `n:EXPR:'
  287.      If combined with `r', `R', `i', or `I', makes them return the N'th
  288.      or N'th last match (if EXPR evaluates to N).
  289.  
  290. 
  291. File: zsh.info,  Node: Positional Parameters,  Next: Parameters Set By The Shell,  Prev: Array Parameters,  Up: Parameters
  292.  
  293. Positional Parameters
  294. =====================
  295.  
  296. Positional parameters are set by the shell on invocation, by the `set'
  297. builtin, or by direct assignment.  The parameter N, where N is a
  298. number, is the N'th positional parameter.  The parameters `*', `@', and
  299. `argv' are arrays containing all the positional parameters; thus
  300. `argv[N]', is equivalent to simply N.
  301.  
  302. 
  303. File: zsh.info,  Node: Parameters Set By The Shell,  Next: Parameters Used By The Shell,  Prev: Positional Parameters,  Up: Parameters
  304.  
  305. Parameters Set By The Shell
  306. ===========================
  307.  
  308. The following parameters are automatically set by the shell:
  309.  
  310. `!'
  311.      The process id of the last background command invoked.
  312.  
  313. `#'
  314.      The number of positional parameters in decimal.
  315.  
  316. `ARGC'
  317.      Same as `#'.  It has no special meaning in sh/ksh compatibility
  318.      mode.
  319.  
  320. `$'
  321.      The process id of this shell.
  322.  
  323. `-'
  324.      Flags supplied to the shell on invocation or by the `set' or
  325.      `setopt' commands.
  326.  
  327. `*'
  328.      An array containing the positional parameters.
  329.  
  330. `argv'
  331.      Same as `*'.  It has no special meaning in sh/ksh compatibility
  332.      mode.
  333.  
  334. `@'
  335.      Same as `argv[@]' but it can be used in sh/ksh compatibility mode.
  336.  
  337. `?'
  338.      The exit value returned by the last command.
  339.  
  340. `status'
  341.      Same as `?'.  It has no special meaning in sh/ksh compatibility
  342.      mode.
  343.  
  344. `_'
  345.      The last argument of the previous command.  Also, this parameter
  346.      is set in the environment of every command executed to the full
  347.      pathname of the command.
  348.  
  349. `EGID'
  350.      The effective group id of the shell process.  If you have
  351.      sufficient privileges, you may change the effective group id of
  352.      the shell process by assigning to this parameter.  Also (assuming
  353.      sufficient privileges), you may start a single command with a
  354.      different effective group id by: `(EGID=egid ; command)'
  355.  
  356. `EUID'
  357.      The effective user id of the shell process.  If you have sufficient
  358.      privileges, you may change the effective user id of the shell
  359.      process by assigning to this parameter.  Also (assuming sufficient
  360.      privileges), you may start a single command with a different
  361.      effective user id by: `(EUID=euid ; command)'
  362.  
  363. `ERRNO'
  364.      The value of `errno' as set by the most recently failed system
  365.      call.  This value is system dependent and is intended for debugging
  366.      purposes.
  367.  
  368. `GID'
  369.      The group id of the shell process.  If you have sufficient
  370.      privileges, you may change the group id of the shell process by
  371.      assigning to this parameter.  Also (assuming sufficient
  372.      privileges), you may start a single command under a different
  373.      group id by: `(GID=gid ; command)'
  374.  
  375. `HOST'
  376.      The current hostname.
  377.  
  378. `LINENO'
  379.      The line number of the current line within the current script being
  380.      executed.
  381.  
  382. `LOGNAME'
  383.      If the corresponding variable is not set in the environment of the
  384.      shell, it is initialized to the login name corresponding to the
  385.      current login session.  This parameter is exported by default but
  386.      this can be disabled using the `typeset' builtin.
  387.  
  388. `MACHTYPE'
  389.      The machine type (microprocessor class or machine model), as
  390.      determined at compile time.
  391.  
  392. `OLDPWD'
  393.      The previous working directory.
  394.  
  395. `OPTARG'
  396.      The value of the last option argument processed by the `getopts'
  397.      command.
  398.  
  399. `OPTIND'
  400.      The index of the last option argument processed by the `getopts'
  401.      command.
  402.  
  403. `OSTYPE'
  404.      The operating system, as determined at compile time.
  405.  
  406. `PPID'
  407.      The process id of the parent of the shell.
  408.  
  409. `PWD'
  410.      The present working directory.
  411.  
  412. `RANDOM'
  413.      A random integer from 0 to 32767, newly generated each time this
  414.      parameter is referenced.  The random number generator can be
  415.      seeded by assigning a numeric value to `RANDOM'.
  416.  
  417. `SECONDS'
  418.      The number of seconds since shell invocation.  If this parameter is
  419.      assigned a value, then the value returned upon reference will be
  420.      the value that was assigned plus the number of seconds since the
  421.      assignment.
  422.  
  423. `SHLVL'
  424.      Incremented by one each time a new shell is started.
  425.  
  426. `signals'
  427.      An array containing the names of the signals.
  428.  
  429. `TTY'
  430.      The name of the tty associated with the shell, if any.
  431.  
  432. `TTYIDLE'
  433.      The idle time of the tty associated with the shell in seconds or
  434.      -1 if there is no such tty.
  435.  
  436. `UID'
  437.      The user id of the shell process.  If you have sufficient
  438.      privileges, you may change the user id of the shell by assigning
  439.      to this parameter.  Also (assuming sufficient privileges), you may
  440.      start a single command under a different user id by: `(UID=uid ;
  441.      command)'
  442.  
  443. `USERNAME'
  444.      The username corresponding to the user id of the shell process.
  445.      If you have sufficient privileges, you may change the username
  446.      (and also the user id and group id) of the shell by assigning to
  447.      this parameter.  Also (assuming sufficient privileges), you may
  448.      start a single command under a different username (and user id and
  449.      group id) by: `(USERNAME=username ; command)'
  450.  
  451. `VENDOR'
  452.      The vendor, as determined at compile time.
  453.  
  454. `ZSHNAME'
  455. `ZSH_NAME'
  456.      Expands to the basename of the command used to invoke this
  457.      instance of zsh.
  458.  
  459. `ZSH_VERSION'
  460.      The version number of this zsh.
  461.  
  462. 
  463. File: zsh.info,  Node: Parameters Used By The Shell,  Prev: Parameters Set By The Shell,  Up: Parameters
  464.  
  465. Parameters Used By The Shell
  466. ============================
  467.  
  468. The following parameters are used by the shell:
  469.  
  470. `ARGV0'
  471.      If exported, its value is used as argv[0] of external commands.
  472.      Usually used in constructs like `ARGV0=emacs nethack'.
  473.  
  474. `BAUD'
  475.      The baud rate of the current connection.  Used by the line editor
  476.      update mechanism to compensate for a slow terminal by delaying
  477.      updates until necessary.  This may be profitably set to a lower
  478.      value in some circumstances, e.g. for slow modems dialing into a
  479.      communications server which is connected to a host via a fast
  480.      link; in this case, this variable would be set by default to the
  481.      speed of the fast link, and not the modem.  This parameter should
  482.      be set to the baud rate of the slowest part of the link for best
  483.      performance.  The compensation mechanism can be turned off by
  484.      setting the variable to zero.
  485.  
  486. `cdpath (CDPATH)'
  487.      An array (colon-separated list) of directories specifying the
  488.      search path for the `cd' command.
  489.  
  490. `COLUMNS'
  491.      The number of columns for this terminal session.  Used for printing
  492.      select lists and for the line editor.
  493.  
  494. `DIRSTACKSIZE'
  495.      The maximum size of the directory stack.  If the stack gets larger
  496.      than this, it will be truncated automatically.  This is useful
  497.      with the `AUTO_PUSHD' option.
  498.  
  499. `FCEDIT'
  500.      The default editor for the `fc' builtin.
  501.  
  502. `fignore (FIGNORE)'
  503.      An array (colon-separated list) containing the suffixes of files
  504.      to be ignored during filename completion.  However, if the
  505.      completion generates only files which would match if this variable
  506.      would be ignored, than these files are completed anyway.
  507.  
  508. `fpath (FPATH)'
  509.      An array (colon-separated list) of directories specifying the
  510.      search path for function definitions.  This path is searched when
  511.      a function with the `-u' attribute is referenced.  If an
  512.      executable file is found, then it is read and executed in the
  513.      current environment.
  514.  
  515. `histchars'
  516.      Three characters used by the shell's history and lexical analysis
  517.      mechanism.  The first character signals the start of a history
  518.      substitution (default `!').  The second character signals the start
  519.      of a quick history substitution (default `^').  The third character
  520.      is the comment character (default `#').
  521.  
  522. `HISTCHARS'
  523.      Depreciated. Use `histchars'.
  524.  
  525. `HISTFILE'
  526.      The file to save the history in when an interactive shell exits.
  527.      If unset, the history is not saved.
  528.  
  529. `HISTSIZE'
  530.      The maximum size of the history list.
  531.  
  532. `HOME'
  533.      The default argument for the `cd' command.
  534.  
  535. `IFS'
  536.      Internal field separators, normally space, tab, and newline, that
  537.      are used to separate words which result from command or parameter
  538.      substitution and words read by the `read' builtin.  Any characters
  539.      from the set space, tab and newline that appear in the `IFS' are
  540.      called "IFS white space".  One or more IFS white space characters
  541.      or one non-IFS white space character together with any adjacent
  542.      IFS white space character delimit a field.  If an IFS white space
  543.      character appears twice consecutively in the `IFS', this character
  544.      is treated as if it were not an IFS white space character.
  545.  
  546. `KEYTIMEOUT'
  547.      The time the shell waits, in hundredths of seconds, for another
  548.      key to be pressed when reading bound multi-character sequences.
  549.  
  550. `LANG'
  551.      This variable determines the locale category for any category not
  552.      specifically selected via a variable starting with `LC_'.
  553.  
  554. `LC_ALL'
  555.      This variable overrides the value of the `LANG' variable and the
  556.      value of any of the other variables starting with `LC_'.
  557.  
  558. `LC_COLLATE'
  559.      This variable determines the locale category for character
  560.      collation information within ranges in glob brackets and for
  561.      sorting.
  562.  
  563. `LC_CTYPE'
  564.      This variable determines the locale category for character handling
  565.      functions.
  566.  
  567. `LC_MESSAGES'
  568.      This variable determines the language in which messages should be
  569.      written.  Note that zsh does not use message catalogs.
  570.  
  571. `LC_TIME'
  572.      This variable determines the locale category for date and time
  573.      formatting in promt escape sequences.
  574.  
  575. `LINES'
  576.      The number of lines for this terminal session.  Used for printing
  577.      select lists and for the line editor.
  578.  
  579. `LISTMAX'
  580.      In the line editor, the number of filenames to list without asking
  581.      first.  If set to zero, the shell asks only if the listing would
  582.      scroll off the screen.
  583.  
  584. `LOGCHECK'
  585.      The interval in seconds between checks for login/logout activity
  586.      using the `watch' parameter.
  587.  
  588. `MAIL'
  589.      If this parameter is set and `mailpath' is not set, the shell looks
  590.      for mail in the specified file.
  591.  
  592. `MAILCHECK'
  593.      The interval in seconds between checks for new mail.
  594.  
  595. `mailpath (MAILPATH)'
  596.      An array (colon-separated list) of filenames to check for new
  597.      mail.  Each filename can be followed by a `?' and a message that
  598.      will be printed.  The message will undergo parameter expansion,
  599.      command substitution and arithmetic substitution with the variable
  600.      `$_' defined as the name of the file that has changed.  The
  601.      default message is `You have new mail'.  If an element is a
  602.      directory instead of a file the shell will recursively check every
  603.      file in every subdirectory of the element.
  604.  
  605. `manpath (MANPATH)'
  606.      An array (colon-separated list) whose value is not used by the
  607.      shell.  The `manpath' array can be useful, however, since setting
  608.      it also sets `MANPATH', and vice versa.
  609.  
  610. `NULLCMD'
  611.      The command name to assume if a redirection is specified with no
  612.      command.  Defaults to `cat'.  For sh/ksh-like behaviour, change
  613.      this to `:'.  For csh-like behaviour, unset this parameter; the
  614.      shell will print an error message if null commands are entered.
  615.  
  616. `path (PATH)'
  617.      An array (colon-separated list) of directories to search for
  618.      commands.  When this parameter is set, each directory is scanned
  619.      and all files found are put in a hash table.
  620.  
  621. `POSTEDIT'
  622.      This string is output whenever the line editor exits.  It usually
  623.      contains termcap strings to reset the terminal.
  624.  
  625. `PS1'
  626.      The primary prompt string, printed before a command is read; the
  627.      default is `%m%# '.  If the escape sequence takes an optional
  628.      integer, it should appear between the `%' and the next character
  629.      of the sequence.  The following escape sequences are recognized:
  630.  
  631.     `%%'
  632.           A `%'.
  633.  
  634.     `%)'
  635.           A `)'.
  636.  
  637.     `%d'
  638.     `%/'
  639.           Present working directory (`$PWD').
  640.  
  641.     `%~'
  642.           `$PWD'.  If it has a named directory as its prefix, that part
  643.           is replaced by a `~' followed by the name of the directory.
  644.           If it starts with `$HOME', that part is replaced by a `~'.
  645.  
  646.     `%c'
  647.     `%.'
  648.     `%C'
  649.           Trailing component of `$PWD'.  An integer may follow the `%'
  650.           to get more than one component.  Unless `%C' is used, tilde
  651.           expansion is performed first.
  652.  
  653.     `!'
  654.     `%h'
  655.     `%!'
  656.           Current history event number.
  657.  
  658.     `%M'
  659.           The full machine hostname.
  660.  
  661.     `%m'
  662.           The hostname up to the first `.'.  An integer may follow the
  663.           `%' to specify how many components of the hostname are
  664.           desired.
  665.  
  666.     `%S (%s)'
  667.           Start (stop) standout mode.
  668.  
  669.     `%U (%u)'
  670.           Start (stop) underline mode.
  671.  
  672.     `%B (%b)'
  673.           Start (stop) boldface mode.
  674.  
  675.     `%t'
  676.     `%@'
  677.           Current time of day, in 12-hour, am/pm format.
  678.  
  679.     `%T'
  680.           Current time of day, in 24-hour format.
  681.  
  682.     `%*'
  683.           Current time of day in 24-hour format, with seconds.
  684.  
  685.     `%n'
  686.           `$USERNAME'.
  687.  
  688.     `%w'
  689.           The date in day-dd format.
  690.  
  691.     `%W'
  692.           The date in mm/dd/yy format.
  693.  
  694.     `%D'
  695.           The date in yy-mm-dd format.
  696.  
  697.     `%D{STRING}'
  698.           STRING is formatted using the `strftime' function.  See
  699.           `strftime(3)' for more details, if your system has it.
  700.  
  701.     `%l'
  702.           The line (tty) the user is logged in on.
  703.  
  704.     `%?'
  705.           The return code of the last command executed just before the
  706.           prompt.
  707.  
  708.     `%_'
  709.           The status of the parser, i.e. the shell constructs (like
  710.           `if' and `for') that have been started on the command line.
  711.           If given an integer number, that many strings will be
  712.           printed; zero or no integer means print as many as there are.
  713.  
  714.     `%E'
  715.           Clears to end of line.
  716.  
  717.     `%#'
  718.           A `#' if the shell is running as root, a `%' if not.
  719.           Equivalent to `%(#.#.%%)'
  720.  
  721.     `%v'
  722.           The value of the first element of the `psvar' array parameter.
  723.           Following the `%' with an integer gives that element of the
  724.           array.
  725.  
  726.     `%{...%}'
  727.           Include a string as a literal escape sequence.  The string
  728.           within the braces should not change the cursor position.
  729.  
  730.     `%(x.TRUE-TEXT.FALSE-TEXT)'
  731.           Specifies a ternary expression.  The character following the
  732.           `x' is arbitrary; the same character is used to separate the
  733.           text for the true result from that for the false result.  The
  734.           separator may not appear in the `true-text', except as part
  735.           of a `%' sequence.  A `)' may appear in the `false-text' as a
  736.           `%)'.  `true-text' and `false-text' may both contain contain
  737.           arbitrarily-nested escape sequences, including further
  738.           ternary expressions.  The left parenthesis may be preceded or
  739.           followed by a positive integer `n', which defaults to zero.
  740.           The test character `x' may be any of the following:
  741.  
  742.          `c'
  743.          `.'
  744.          `~'
  745.                True if the current path, with prefix replacement, has
  746.                at least N elements.
  747.  
  748.          `/'
  749.          `C'
  750.                True if the current absolute path has at least N
  751.                elements.
  752.  
  753.          `t'
  754.                True if the time in minutes is equal to N.
  755.  
  756.          `T'
  757.                True if the time in hours is equal to N.
  758.  
  759.          `d'
  760.                True if the day of the month is equal to N.
  761.  
  762.          `D'
  763.                True if the month is equal to N (January = 0).
  764.  
  765.          `w'
  766.                True if the day of the week is equal to N (Sunday = 0).
  767.  
  768.          `?'
  769.                True if the exit status of the last command was N.
  770.  
  771.          `#'
  772.                True if the effective uid of the current process is N.
  773.  
  774.          `g'
  775.                True if the effective gid of the current process is N.
  776.  
  777.          `L'
  778.                True if the `SHLVL' parameter is at least N.
  779.  
  780.          `S'
  781.                True if the `SECONDS' parameter is at least N.
  782.  
  783.          `v'
  784.                True if the array `psvar' has at least N elements.
  785.  
  786.          `_'
  787.                True if at least N shell constructs were started.
  788.  
  789.          `%<STRING<'
  790.          `%>STRING>'
  791.          `%[XSTRING]'
  792.                Specifies truncation behaviour.  The third form is
  793.                equivalent to `%XSTRINGX', i.efi `X' may be `<' or `>'.
  794.                The numeric argument, which in the third form may appear
  795.                immediately after the `[', specifies the maximum
  796.                permitted length of the various strings that can be
  797.                displayed in the prompt.  If this integer is zero, or
  798.                missing, truncation is disabled.  Truncation is initially
  799.                disabled.  The forms with `<' truncate at the left of
  800.                the string, and the forms with `>' truncate at the right
  801.                of the string.  For example, if the current directory is
  802.                `/home/pike', the prompt `%8<..<%/' will expand to
  803.                `..e/pike'.  The `string' will be displayed in place of
  804.                the truncated portion of any string.  In this string,
  805.                the terminating character (`<', `>' or `]'), or in fact
  806.                any character, may be quoted by a preceding `\'.  `%'
  807.                sequences are not treated specially.  If the `string' is
  808.                longer than the specified truncation length, it will
  809.                appear in full, completely replacing the truncated
  810.                string.
  811.  
  812. `PS2'
  813.      The secondary prompt, printed when the shell needs more
  814.      information to complete a command.  Recognizes the same escape
  815.      sequences as `$PS1'.  The default is `%_> '.
  816.  
  817. `PS3'
  818.      Selection prompt used within a `select' loop.  Recognizes the same
  819.      escape sequences as `PS1'.  The default is `?# '.
  820.  
  821. `PS4'
  822.      The execution trace prompt.  Default is `+ '.
  823.  
  824. `PROMPT'
  825. `PROMPT2'
  826. `PROMPT3'
  827. `PROMPT4'
  828.      Same as `PS1', `PS2', `PS3', and `PS4', respectively.  These
  829.      parameters do not have any special meaning in sh/ksh compatibility
  830.      mode.
  831.  
  832. `psvar (PSVAR)'
  833.      An array (colon-separated list) whose first nine values can be
  834.      used in `PROMPT' strings.  Setting `psvar' also sets `PSVAR', and
  835.      vice versa.
  836.  
  837. `prompt'
  838.      Same as `PS1'.  It has no special meaning in sh/ksh compatibility
  839.      mode.
  840.  
  841. `READNULLCMD'
  842.      The command name to assume if a single input redirection is
  843.      specified with no command.  Defaults to `more'.
  844.  
  845. `REPORTTIME'
  846.      If nonzero, commands whose combined user and system execution times
  847.      (measured in seconds) are greater than this value have timing
  848.      statistics printed for them.
  849.  
  850. `RPROMPT'
  851. `RPS1'
  852.      This prompt is displayed on the right-hand side of the screen when
  853.      the primary prompt is being displayed on the left.  This does not
  854.      work if the `SINGLELINEZLE' option is set.  Recognizes the same
  855.      escape sequences as `PROMPT'.
  856.  
  857. `SAVEHIST'
  858.      The maximum number of history events to save in the history file.
  859.  
  860. `SPROMPT'
  861.      The prompt used for spelling correction.  The sequence `%R' expands
  862.      to the string which presumably needs spelling correction, and `%r'
  863.      expands to the proposed correction.  All other `PROMPT' escapes are
  864.      also allowed.
  865.  
  866. `STTY'
  867.      If this parameter is set in a command's environment, the shell
  868.      runs the `stty' command with the value of this parameter as
  869.      arguments in order to set up the terminal before executing the
  870.      command.  The modes apply only to the command, and are reset when
  871.      it finishes or is suspended.  If the command is suspended and
  872.      continued later with the `fg' or `wait' builtins it will see the
  873.      modes specified by `STTY', as if it were not suspended.  This
  874.      (intentionally) does not apply if the command is continued via
  875.      `kill -CONT'.  `STTY' is ignored if the command is run in the
  876.      background, or if it is in the environment of the shell but not
  877.      explicitly assigned to in the input line.  This avoids running
  878.      `stty' at every external command by accidentally exporting it.
  879.      Also note that `STTY' should not be used for window size
  880.      specifications; these will not be local to the command.
  881.  
  882. `TIMEFMT'
  883.      The format of process time reports with the `time' keyword.  The
  884.      default is `%E real  %U user  %S system  %P %J'.  Recognizes the
  885.      following escape sequences:
  886.  
  887.     `%'
  888.           A `%'.
  889.  
  890.     `%U'
  891.           CPU seconds spent in user mode.
  892.  
  893.     `%S'
  894.           CPU seconds spent in kernel mode.
  895.  
  896.     `%E'
  897.           Elapsed time in seconds.
  898.  
  899.     `%P'
  900.           The CPU percentage, computed as (%U+%S)/%E.
  901.  
  902.     `%J'
  903.           The name of this job.
  904.  
  905.      A star may be inserted between the percent sign and flags printing
  906.      time.  This cause the time to be printed in `hh:mm:ss.ttt' format
  907.      (hours and minutes are only printed if they are not zero).
  908.  
  909. `TMOUT'
  910.      If this parameter is nonzero, the shell will receive an `ALRM'
  911.      signal if a command is not entered within the specified number of
  912.      seconds after issuing a prompt.  If there is a trap on `SIGALRM',
  913.      it will be executed and a new alarm is scheduled using the value
  914.      of the `TMOUT' parameter after executing the trap.  If no trap is
  915.      set, and the idle time of the terminal is not less than the value
  916.      of the `TMOUT' parameter, zsh terminates.  Otherwise a new alarm
  917.      is scheduled to `TMOUT' seconds after the last keypress.
  918.  
  919. `TMPPREFIX'
  920.      A pathname prefix which the shell will use for all temporary files.
  921.      Note that this should include an initial part for the file name as
  922.      well as any directory names.  The default is `/tmp/zsh'.
  923.  
  924. `watch (WATCH)'
  925.      An array (colon-separated list) of login/logout events to report.
  926.      If it contains the single word `all', then all login/logout events
  927.      are reported.  If it contains the single word `notme', then all
  928.      login/logout events are reported except for those originating from
  929.      `$USERNAME'.  An entry in this list may consist of a username, an
  930.      `@' followed by a remote hostname, and a `%' followed by a line
  931.      (tty).  Any or all of these components may be present in an entry;
  932.      if a login/logout event matches all of them, it is reported.
  933.  
  934. `WATCHFMT'
  935.      The format of login/logout reports if the `watch' parameter is set.
  936.      Default is `%n has %a %l from %m'.  Recognizes the following escape
  937.      sequences:
  938.  
  939.     `%n'
  940.           The name of the user that logged in/out.
  941.  
  942.     `%a'
  943.           The observed action, i.e. `logged on' or `logged off'.
  944.  
  945.     `%l'
  946.           The line (tty) the user is logged in on.
  947.  
  948.     `%M'
  949.           The full hostname of the remote host.
  950.  
  951.     `%m'
  952.           The hostname up to the first `.'.  If only the IP address is
  953.           available or the utmp field contains the name of an X-windows
  954.           display, the whole name is printed.
  955.  
  956.           NOTE: The `%m' and `%M' escapes will work only if there is a
  957.           host name field in the `utmp' on your machine.  Otherwise
  958.           they are treated as ordinary strings.
  959.  
  960.     `%S (%s)'
  961.           Start (stop) standout mode.
  962.  
  963.     `%U (%u)'
  964.           Start (stop) underline mode.
  965.  
  966.     `%B (%b)'
  967.           Start (stop) boldface mode.
  968.  
  969.     `%t'
  970.     `%@'
  971.           The time, in 12-hour, am/pm format.
  972.  
  973.     `%T'
  974.           The time, in 24-hour format.
  975.  
  976.     `%w'
  977.           The date in day-dd format.
  978.  
  979.     `%W'
  980.           The date in mm/dd/yy format.
  981.  
  982.     `%D'
  983.           The date in yy-mm-dd format.
  984.  
  985.     `%(x:TRUE-TEXT:FALSE-TEXT)'
  986.           Specifies a ternary expression.  The character following the
  987.           `x' is arbitrary; the same character is used to separate the
  988.           text for the true result from that for the false result.
  989.           Both the separator and the right parenthesis may be escaped
  990.           with a backslash.  Ternary expressions may be nested.
  991.  
  992.           The test character `x' may be any one of `l', `n', `m', or
  993.           `M', which indicate a true result if the corresponding escape
  994.           sequence would return a non-empty value; or it may be `a',
  995.           which indicates a true result if the watched user has logged
  996.           in, or false if he has logged out.  Other characters evaluate
  997.           to neither true nor false; the entire expression is omitted
  998.           in this case.
  999.  
  1000.           If the result is true, then the TRUE-TEXT is formatted
  1001.           according to the result above and printed, and the FALSE-TEXT
  1002.           is skipped.  If false, the TRUE-TEXT is skipped, and the
  1003.           FALSE-TEXT is formatted and printed.  Either or both of the
  1004.           branches may be empty, but both separators must always be
  1005.           present.
  1006.  
  1007. `WORDCHARS'
  1008.      A list of non-alphanumeric characters considered part of a word by
  1009.      the line editor.
  1010.  
  1011. `ZDOTDIR'
  1012.      The directory to search for shell startup files (`.zshrc', etc), if
  1013.      not `$HOME'.
  1014.  
  1015. 
  1016. File: zsh.info,  Node: Options,  Next: Shell Builtin Commands,  Prev: Parameters,  Up: Top
  1017.  
  1018. Options
  1019. *******
  1020.  
  1021. * Menu:
  1022.  
  1023. * Specifying Options::
  1024. * Description of Options::
  1025. * Single Letter Options::
  1026.  
  1027. 
  1028. File: zsh.info,  Node: Specifying Options,  Next: Description of Options,  Up: Options
  1029.  
  1030. Specifying Options
  1031. ==================
  1032.  
  1033. Options are primarily referred to by name.  These names are case
  1034. insensitive and underscores are ignored.  For example, `allexport' is
  1035. equivalent to `A__lleXP_ort'.
  1036.  
  1037. The sense of an option name may be inverted by preceding it with `no',
  1038. so `setopt No_Beep' is equivalent to `unsetopt beep'.  This inversion
  1039. can only be done once, so `nonobeep' is *not* a synonym for `beep'.
  1040. Similarly, `tify' is *not* a synonym for `nonotify' (the inversion of
  1041. `notify').
  1042.  
  1043. Some options also have one or more single letter names.  There are two
  1044. sets of single letter options: one used by default, and another when
  1045. the shell is emulating `sh' or `ksh'.  The single letter options can be
  1046. used on the shell command line, or with the `set', `setopt' and
  1047. `unsetopt' builtins, as normal Unix options preceded by `-'.
  1048.  
  1049. The  sense of the single letter options may be inverted by using `+'
  1050. instead of `-'.  Some of the single letter option names refer to an
  1051. option being off, in which case the inversion of that name refers to the
  1052. option being on.  For example, `+n' is the short name of `exec', and
  1053. `-n' is the short name of its inversion, `noexec'.
  1054.  
  1055.