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-5 < prev    next >
Encoding:
GNU Info File  |  1997-06-23  |  49.1 KB  |  1,272 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: Shell Builtin Commands,  Next: Programmable Completion,  Prev: Options,  Up: Top
  24.  
  25. Shell Builtin Commands
  26. **********************
  27.  
  28. `- simple command'
  29.      *Note Precommand Modifiers::.
  30.  
  31. `. FILE [ ARG ... ]'
  32.      Read and execute commands from FILE and execute them in the
  33.      current shell environment.  If FILE does not contain a slash, or if
  34.      `PATH_DIRS' is set, the shell looks in the components of `path' to
  35.      find the directory containing FILE.  Files in the current
  36.      directory are not read unless `.' appears somewhere in `path'.  If
  37.      any arguments ARG are given, they become the positional
  38.      parameters; the old positional parameters are restored when the
  39.      FILE is done executing.  The exit status is the exit status of the
  40.      last command executed.
  41.  
  42. `: [ ARG ... ]'
  43.      This command only expands parameters.  A zero exit code is
  44.      returned.
  45.  
  46. `alias [ -grmL ] [ NAME[=VALUE] ] ...'
  47.      For each NAME with a corresponding VALUE, define an alias with that
  48.      value.  A trailing space in VALUE causes the next word to be
  49.      checked for alias substitution.  If the `-g' flag is present,
  50.      define a global alias; global aliases are expanded even if they do
  51.      not occur in command position.  For each NAME with no VALUE, print
  52.      the value of NAME, if any.  With no arguments, print all currently
  53.      defined aliases.  If the `-m' flag is given the arguments are
  54.      taken as patterns (they should be quoted to preserve them from
  55.      being interpreted as glob patterns) and the aliases matching these
  56.      patterns are printed.  When printing aliases and the `-g' or `-r'
  57.      flags are present, then restrict the printing to global or regular
  58.      aliases, respectively.  If the `-L' flag is present, then print
  59.      each alias in a manner suitable for putting in a startup script.
  60.      The exit status is nonzero if a NAME (with no VALUE) is given for
  61.      which no alias has been defined.
  62.  
  63. `autoload [ NAME ... ]'
  64.      For each of the NAMEs (which are names of functions), create a
  65.      function marked undefined.  The `fpath' variable will be searched
  66.      to find the actual function definition when the function is first
  67.      referenced.  The definition is contained in a file of the same
  68.      name as the function.  If the file found contains a standard
  69.      definition for the function, that is stored as the function;
  70.      otherwise, the contents of the entire file are stored as the
  71.      function.  The latter format allows functions to be used directly
  72.      as scripts.
  73.  
  74. `bg [ JOB ... ]'
  75. `JOB ... &'
  76.      Put each specified JOB in the background, or the current job if
  77.      none is specified. *Note Jobs & Signals::.
  78.  
  79. `bindkey -mevd'
  80. `bindkey -r IN-STRING ...'
  81. `bindkey [ -a ] IN-STRING [ COMMAND ] ...'
  82. `bindkey -s [ -a ] IN-STRING OUT-STRING ...'
  83.      The `-e' and `-v' options put the keymaps in emacs mode and vi
  84.      mode respectively; they cannot be used simultaneously.  The `-d'
  85.      option resets all bindings to the compiled-in settings.  If not
  86.      used with options `-e' or `-v', the maps will be left in emacs
  87.      mode, or in vi mode if the `VISUAL' or `EDITOR' variables contain
  88.      the string `vi'.  Metafied characters are bound to self-insert by
  89.      default.  The `-m' option loads the compiled-in bindings of these
  90.      characters for the mode determined by the preceding options, or
  91.      the current mode if used alone.  Any previous binding done by the
  92.      user will be preserved.  If the `-r' option is given, remove any
  93.      binding for each IN-STRING.  If the `-s' option is not specified,
  94.      bind each IN-STRING to a specified COMMAND.  If no COMMAND is
  95.      specified, print the binding of IN-STRING if it is bound, or
  96.      return a nonzero exit code if it is not bound.  If the `-s' option
  97.      is specified, bind each IN-STRING to each specified OUT-STRING.
  98.      When IN-STRING is typed, OUT-STRING will be pushed back and
  99.      treated as input to the line editor.  The process is recursive,
  100.      but to avoid infinite loops the shell will report an error if more
  101.      than 20 consecutive replacements happen.  If the `-a' option is
  102.      specified, bind the IN-STRINGs in the alternative keymap instead
  103.      of the standard one.  The alternative keymap is used in vi command
  104.      mode.
  105.  
  106.      It's possible for an IN-STRING to be bound to something and also
  107.      be the beginning of a longer bound string.  In this case the shell
  108.      will wait a certain time to see if more characters are typed, and
  109.      if not it will execute the binding.  This timeout is defined by the
  110.      `KEYTIMEOUT' parameter; the default is 0.4 seconds.  No timeout is
  111.      done if the prefix string is not bound.
  112.  
  113.      For either IN-STRING or OUT-STRING, control characters may be
  114.      specified in the form `^X', and the backslash may be used to
  115.      introduce one of the following escape sequences:
  116.  
  117.     `\a'
  118.           Bell character
  119.  
  120.     `\n'
  121.           Linefeed (newline)
  122.  
  123.     `\b'
  124.           Backspace
  125.  
  126.     `\t'
  127.           Horizontal tab
  128.  
  129.     `\v'
  130.           Vertical tab
  131.  
  132.     `\f'
  133.           Form feed
  134.  
  135.     `\r'
  136.           Carriage return
  137.  
  138.     `\e'
  139.     `\E'
  140.           Escape
  141.  
  142.     `\NNN'
  143.           Character code in octal
  144.  
  145.     `\xNN'
  146.           Character code in hexadecimal
  147.  
  148.     `\M-XXX'
  149.           Character or escape sequence with meta bit set.  The `-'
  150.           after the `M' is optional.
  151.  
  152.     `\C-X'
  153.           Control character.  The `-' after the `M' is optional.
  154.  
  155.      In all other cases, `\' escapes the following character.  Delete is
  156.      written as `^?'.  Note that `\M^?' and `^\M?' are not the same.
  157.  
  158.      Multi-character IN-STRINGS cannot contain the null character (`^@'
  159.      or `^ ').  If they appear in a bindkey command, they will be
  160.      silently translated to `\M-^@'.  This restriction does not apply
  161.      to OUT-STRINGS, single-character IN-STRINGS and the first
  162.      character of a multi-char IN-STRING.
  163.  
  164. `break [ N ]'
  165.      Exit from an enclosing `for', `while', `until', `select', or
  166.      `repeat' loop.  If N is specified, then break N levels instead of
  167.      just one.
  168.  
  169. `builtin NAME [ ARGS ] ...'
  170.      Executes the builtin NAME, with the given ARGS.
  171.  
  172. `bye'
  173.      Same as `exit'.
  174.  
  175. `cd [ ARG ]'
  176. `cd OLD NEW'
  177. `cd [+-]n'
  178.      Change the current directory.  In the first form, change the
  179.      current directory to ARG, or to the value of `HOME' if ARG is not
  180.      specified.  If ARG is `-', change to the value of `OLDPWD', the
  181.      previous directory.  If a directory named ARG is not found in the
  182.      current directory and ARG does not begin with a slash, search each
  183.      component of the shell parameter `cdpath'.  If the option
  184.      `CDABLEVARS' is set, and a parameter named ARG exists whose value
  185.      begins with a slash, treat its value as the directory.
  186.  
  187.      The second form of `cd' substitutes the string NEW for the string
  188.      OLD in the name of the current directory, and tries to change to
  189.      this new directory.
  190.  
  191.      The third form of `cd' extracts an entry from the directory stack,
  192.      and changes to that directory.  An argument of the form `+N'
  193.      identifies a stack entry by counting from the left of the list
  194.      shown by the `dirs' command, starting with zero.  An argument of
  195.      the form `-N' counts from the right.  If the `PUSHD_MINUS' option
  196.      is set, the meanings of `+' and `-' in this context are swapped.
  197.  
  198. `chdir'
  199.      Same as `cd'.
  200.  
  201. `command simple command'
  202.      *Note Precommand Modifiers::.
  203.  
  204. `compctl'
  205.      *Note Programmable Completion::.
  206.  
  207. `continue [ NUM ]'
  208.      Resume the next iteration of the enclosing `for', `while',
  209.      `until', `select', or `repeat' loop.  If N is specified, break out
  210.      of N-1 loops and resume at the N'th enclosing loop.
  211.  
  212. `declare [ ARG ... ]'
  213.      Same as `typeset'.
  214.  
  215. `dirs [ -v ] [ ARG ... ]'
  216.      With no arguments, print the contents of the directory stack.  If
  217.      the `-v' option is given, number the directories in the stack when
  218.      printing.  Directories are added to this stack with the `pushd'
  219.      command, and removed with the `cd' or `popd' commands.  If
  220.      arguments are specified, load them onto the directory stack,
  221.      replacing anything that was there, and push the current directory
  222.      onto the stack.
  223.  
  224. `disable [ -afmr ] ARG ...'
  225.      Disable the hash table element named ARG temporarily.  The default
  226.      is to disable builtin commands.  This allows you to use an
  227.      external command with the same name as a builtin command.  The
  228.      `-a' option causes `disable' to act on aliases.  The `-f' option
  229.      causes `disable' to act on shell functions.  The `-r' option
  230.      causes `disable' to act on reserved words.  Without arguments all
  231.      disabled hash table elements from the corresponding hash table are
  232.      printed.  With the `-m' flag the arguments are taken as patterns
  233.      (which should be quoted to preserve them from being taken as glob
  234.      patterns) and all hash table elements from the corresponding hash
  235.      table matching these patterns are disabled.  Disabled objects can
  236.      be enabled with the `enable' command.
  237.  
  238. `disown [ JOB ... ]'
  239. `job ... &|'
  240. `job ... &!'
  241.      Remove the specified jobs from the job table; the shell will no
  242.      longer report their status, and will not complain if you try to
  243.      exit an interactive shell with them running or stopped.  If no
  244.      `job' is specified use the current `job'.
  245.  
  246. `echo [ -neE ] [ ARG ... ]'
  247.      Write each ARG on the standard output, with a space separating
  248.      each one.  If the `-n' flag is not present, print a newline at the
  249.      end.  `echo' recognizes the following escape sequences:
  250.  
  251.     `\a'
  252.           Bell
  253.  
  254.     `\b'
  255.           Backspace
  256.  
  257.     `\c'
  258.           Don't print an ending newline
  259.  
  260.     `\e'
  261.           Escape
  262.  
  263.     `\f'
  264.           Form feed
  265.  
  266.     `\n'
  267.           Newline
  268.  
  269.     `\r'
  270.           Carriage return
  271.  
  272.     `\t'
  273.           Horizontal tab
  274.  
  275.     `\v'
  276.           Vertical tab
  277.  
  278.     `\\'
  279.           Backslash
  280.  
  281.     `\0NNN'
  282.           Character code in octal, with a maximum of three digits after
  283.           the zero.  A non-octal digit terminates the number.
  284.  
  285.     `\xNN'
  286.           Character code in hexadecimal, with a maximum of two digits
  287.           after the `x'.  A non-hexadecimal digit terminates the number.
  288.  
  289.      The `-E' flag or the `BSD_ECHO' option can be used to disable
  290.      these escape sequences.  In the later case `-e' flag can be used
  291.      to enable them.
  292.  
  293. `echotc CAP [ ARG ... ]'
  294.      Output the termcap string corresponding to the capability CAP,
  295.      with optional arguments.
  296.  
  297. `emulate [ -R ] [ zsh | sh | ksh | csh ]'
  298.      Set up zsh options to emulate the specified shell as much as
  299.      possible.  `csh' will never be fully emulated.  If the argument is
  300.      not one of the shells listed above, `zsh' will be used as a
  301.      default.  If the `-R' option is given, all options are reset to
  302.      their default value corresponding to the specified emulation mode.
  303.  
  304. `enable [ -afmr ] ARG ...'
  305.      Enable the hash table element named ARG, presumably disabled
  306.      earlier with `disable'.  The default is to enable builtin
  307.      commands.  The `-a' option causes `enable' to act on aliases.  The
  308.      `-f' option causes `enable' to act on shell functions.  The `-r'
  309.      option causes `enable' to act on reserved words.  Without
  310.      arguments all enable hash table elements from the corresponding
  311.      hash table are printed.  With the `-m' flag the arguments are
  312.      taken as patterns (should be quoted) and all hash table elements
  313.      from the corresponding hash table matching these patterns are
  314.      enabled.  Enabled objects can be disabled with the `disable'
  315.      builtin command.
  316.  
  317. `eval [ ARG ... ]'
  318.      Read the arguments as input to the shell and execute the resulting
  319.      command(s) in the current shell process.
  320.  
  321. `exec simple command'
  322.      *Note Precommand Modifiers::.
  323.  
  324. `exit [ N ]'
  325.      Exit the shell with the exit code specified by N; if none is
  326.      specified, use the exit code from the last command executed.  An
  327.      `EOF' condition will also cause the shell to exit, unless the
  328.      `IGNORE_EOF' option is set.
  329.  
  330. `export [ NAME[=VALUE] ... ]'
  331.      The specified NAMEs are marked for automatic export to the
  332.      environment of subsequently executed commands.  `export' is
  333.      equivalent to `typeset -x'.
  334.  
  335. `false'
  336.      Do nothing and return an exit code of 1.
  337.  
  338. `fc [ -e ENAME ] [ -nlrdDfEim ] [ OLD=NEW ... ] [ FIRST [ LAST ]]'
  339. `fc -ARWI [ FILENAME ]'
  340.      Select a range of commands from FIRST to LAST from the history
  341.      list.  The arguments FIRST and LAST may be specified as a number
  342.      or as a string.  A negative number is used as an offset to the
  343.      current history event number.  A string specifies the most recent
  344.      event beginning with the given string.  All substitutions OLD=NEW,
  345.      if any, are then performed on the commands.  If the `-l' flag is
  346.      given, the resulting commands are listed on standard output.  If
  347.      the `-m' flag is also given the first argument is taken as a
  348.      pattern (which should be quoted), and only the history events
  349.      matching this pattern will be shown.  Otherwise the editor program
  350.      ENAME is invoked on a file containing these history events.  If
  351.      ENAME is not given, the value of the parameter `FCEDIT' is used.
  352.      If ENAME is `-', no editor is invoked.  When editing is complete,
  353.      the edited command(s) is executed.  If FIRST is not specified, it
  354.      will be set to -1 (the most recent event), or to -16 if the `-l'
  355.      flag is given.  If LAST is not specified, it will be set to FIRST,
  356.      or to -1 if the `-l' flag is given.  The flag `-r' reverses the
  357.      order of the commands and the flag `-n' suppresses command numbers
  358.      when listing.  Also when listing, `-d' prints timestamps for each
  359.      command, `-f' prints full time and date stamps. Adding the `-E'
  360.      flag causes the dates to be printed as (`dd.mm.yyyy'), instead of
  361.      the default, `mm/dd/yyyy'.  Adding the `-i' flag causes the dates
  362.      to be printed as `yyyy-mm-dd', in a fixed format.  With the `-D'
  363.      flag, `fc' prints elapsed times.
  364.  
  365.      `fc -R' reads the history from the given file, `fc -W' writes the
  366.      history out to the given file, and `fc -A' appends the history out
  367.      to the given file. `fc -AI' (`WI') appends (writes) only those
  368.      events that are new since the last incremental append (write) to
  369.      the history file.  In any case the file will have no more than
  370.      `SAVEHIST' entries.
  371.  
  372. `fg [ JOB ... ]'
  373. `JOB ...'
  374.      Bring the specified JOBs to the foreground.  If no JOB is
  375.      specified, use the current job.
  376.  
  377. `functions [ +-tum ] [ NAME ... ]'
  378.      Equivalent to `typeset -f'.
  379.  
  380. `getln NAME ...'
  381.      Read the top value from the buffer stack and put it in the shell
  382.      parameter NAME.  Equivalent to `read -zr'.  The flags `-c', `-l',
  383.      `-A', `-e', `-E', and `-n' are also supported.
  384.  
  385. `getopts OPTSTRING NAME [ ARG ... ]'
  386.      Checks ARG for legal options.  If ARG is omitted, use the
  387.      positional parameters.  A valid option argument begins with a `+'
  388.      or a `-'.  An argument not beginning with a `+' or a `-', or the
  389.      argument `--', ends the options.  OPTSTRING contains the letters
  390.      that `getopts' recognizes.  If a letter is followed by a `:', that
  391.      option is expected to have an argument.  The options can be
  392.      separated from the argument by blanks.
  393.  
  394.      Each time it is invoked, `getopts' places the option letter it
  395.      finds in the shell parameter NAME, prepended with a `+' when ARG
  396.      begins with a `+'.  The index of the next ARG is stored in
  397.      `OPTIND'.  The option argument, if any, is stored in `OPTARG'.
  398.  
  399.      A leading `:' in OPTSTRING causes `getopts' to store the letter of
  400.      the invalid option in `OPTARG', and to set NAME to `?' for an
  401.      unknown option and to `:' when a required option is missing.
  402.      Otherwise, `getopts' prints an error message.  The exit status is
  403.      nonzero when there are no more options.
  404.  
  405. `hash [ -dfmr ] [ NAME[=VALUE ] ] ...'
  406.      With no arguments or options, `hash' will list the entire command
  407.      hash table.
  408.  
  409.      The `-m' option causes the arguments to be taken as patterns (they
  410.      should be quoted) and the elements of the command hash table
  411.      matching these patterns are printed.
  412.  
  413.      The `-r' option causes the command hash table to be thrown out and
  414.      restarted.  The `-f' option causes the entire path to be searched,
  415.      and all the commands found are added to the hash table.  These
  416.      options cannot be used with any arguments.
  417.  
  418.      For each NAME with a corresponding VALUE, put NAME in the command
  419.      hash table, associating it with the pathname VALUE.  Whenever NAME
  420.      is used as a command argument, the shell will try to execute the
  421.      file given by VALUE.  For each NAME with no corresponding VALUE,
  422.      search for NAME in the path, and add it to the command hash table,
  423.      and associating it with the discovered path, if it is found.
  424.  
  425.      Adding the `-d' option causes `hash' to act on the named directory
  426.      table instead of the command hash table.  The remaining discussion
  427.      of `hash' will assume that the `-d' is given.
  428.  
  429.      If invoked without any arguments, and without any other options,
  430.      `hash -d' lists the entire named directory table.
  431.  
  432.      The `-m' option causes the arguments to be taken as patterns (they
  433.      should be quoted) and the elements of the named directory table
  434.      matching these patterns are printed.
  435.  
  436.      The `-r' option causes the named directory table to be thrown out
  437.      and restarted so that it only contains  `~'.  The `-f' option
  438.      causes all usernames to be added to the named directory table.
  439.      These options cannot be used with any arguments.
  440.  
  441.      For each NAME with a corresponding VALUE, put NAME in the named
  442.      directory table.  The directory name NAME is then associated with
  443.      the specified path VALUE, so that VALUE may be referred to as
  444.      `~NAME'.  For each NAME with no corresponding VALUE, search for as
  445.      a username and as a parameter.  If it is found, it is added to the
  446.      named directory hash table.
  447.  
  448. `history [ -nrdDfEim ] [ FIRST [ LAST ]]'
  449.      Same as `fc -l'.
  450.  
  451. `integer [ +-lrtux ] [ NAME[=VALUE] ]'
  452.      Same as `typeset -i', except that options irrelevant to integers
  453.      are not permitted.
  454.  
  455. `jobs [ -lprs ] [ JOB ... ]'
  456.      Lists information about each given job, or all jobs if JOB is
  457.      omitted.  The `-l' flag lists process ids, and the `-p' flag lists
  458.      process groups.  If the `-r' flag is given only running jobs will
  459.      be listed; if the `-s' flag is given only stopped jobs are shown.
  460.  
  461. `kill [ -s SIGNAL_NAME ] JOB ...'
  462. `kill [ -SIG ] JOB ...'
  463. `kill -l [ SIG ... ]'
  464.      Sends either `SIGTERM' or the specified signal to the given jobs or
  465.      processes.  Signals are given by number or by names, without the
  466.      `SIG' prefix.  If the signal being sent is not `KILL' or `CONT',
  467.      then the job will be sent a `CONT' signal if it is stopped.  The
  468.      argument JOB can be the process id of a job not in the job list.
  469.      In the third form, `kill -l', if SIG is not specified the signal
  470.      names are listed.  Otherwise, for each SIG that is a name, the
  471.      corresponding signal number is listed.  For each SIG that is a
  472.      signal number or a number representing the exit status of a
  473.      process which was terminated or stopped by a signal the name of
  474.      the signal is printed.
  475.  
  476. `let ARG ...'
  477.      Evaluate each ARG as an arithmetic expression.  *Note Arithmetic
  478.      Evaluation::, for a description of arithmetic expressions.  The
  479.      exit status is 0 if the value of the last expression is nonzero,
  480.      and 1 otherwise.
  481.  
  482. `limit [ -hs ] [ RESOURCE [ LIMIT ] ] ...'
  483.      Set or display resource limits.  Unless the `-s' flag is given the
  484.      limit applies only the children of the shell.  If `-s' is given
  485.      without other arguments, the resource limits of the current shell
  486.      is set to the previously set resource limits of the children.  If
  487.      LIMIT is not specified, print the current limit placed on
  488.      RESOURCE; otherwise set the limit to the specified value.  If the
  489.      `-h' flag is given, use hard limits instead of soft limits.  If no
  490.      RESOURCE is given, print all limits.
  491.      RESOURCE is one of:
  492.  
  493.     `cputime'
  494.           Maximum CPU seconds per process.
  495.  
  496.     `filesize'
  497.           Largest single file allowed.
  498.  
  499.     `datasize'
  500.           Maximum data size (including stack) for each process.
  501.  
  502.     `stacksize'
  503.           Maximum stack size for each process.
  504.  
  505.     `coredumpsize'
  506.           Maximum size of a core dump.
  507.  
  508.     `resident'
  509.     `memoryuse'
  510.           Maximum resident set size.
  511.  
  512.     `memorylocked'
  513.           Maximum amount of memory locked in RAM.
  514.  
  515.     `descriptors'
  516.           Maximum value for a file descriptor.
  517.  
  518.     `openfiles'
  519.           Maximum number of open files.
  520.  
  521.     `vmemorysize'
  522.           Maximum amount of virtual memory.
  523.  
  524.      Which of these resource limits are available depends on the system.
  525.      LIMIT is a number, with an optional scaling factor, as follows:
  526.  
  527.     `Nh'
  528.           Hours.
  529.  
  530.     `Nk'
  531.           Kilobytes.  This is the default for all but cputime.
  532.  
  533.     `Nm'
  534.           Megabytes or minutes.
  535.  
  536.     `MM:SS'
  537.           Minutes and seconds.
  538.  
  539. `local [ +-LRZilrtu [N]] [ NAME[=VALUE] ]'
  540.      Same as `typeset', except that the options `-x' and `-f' are not
  541.      permitted.
  542.  
  543. `log'
  544.      List all users currently logged in who are affected by the current
  545.      setting of the `watch' parameter.
  546.  
  547. `logout'
  548.      Exit the shell, if this is a login shell.
  549.  
  550. `noglob simple command'
  551.      *Note Precommand Modifiers::.
  552.  
  553. `popd [ +-N ]'
  554.      Removes a entry from the directory stack and, performs a `cd' to
  555.      the new top directory.  With no argument, the current top entry is
  556.      removed.  An argument of the form `+N' identifies a stack entry by
  557.      counting from the left of the list shown by the `dirs' command,
  558.      starting with zero.  An argument of the form `-n' counts from the
  559.      right.  If the `PUSHD_MINUS' option is set, the meanings of `+'
  560.      and `-' in this context are swapped.
  561.  
  562. `print [ -nrslzpNDPoOicm ] [ -uN ] [ -R [ -en ]] [ ARG ... ]'
  563.      With no flags or with flag `-', the arguments are printed on the
  564.      standard output as described by `echo', with the following
  565.      differences: the escape sequence `\M-x' metafies the character `x'
  566.      (sets the highest bit), `\C-x' produces a control character
  567.      (`\C-@' and `\C-?' give the characters NULL and delete) and `\E'
  568.      is a synonym for `\e'.  Finally, if not in an escape sequence, `\'
  569.      escapes the following character and is not printed.
  570.  
  571.     `-r'
  572.           Ignore the escape conventions of `echo'.
  573.  
  574.     `-R'
  575.           Emulate the BSD `echo' command which does not process escape
  576.           sequences unless the `-e' flag is given.  The `-n' flag
  577.           suppresses the trailing newline.  Only the `-e' and `-n'
  578.           flags are recognized after `-R', all other arguments and
  579.           options are printed.
  580.  
  581.     `-m'
  582.           Take the fist argument as a pattern (should be  quoted) and
  583.           remove it from the argument list together with subsequent
  584.           arguments that do not match this pattern.
  585.  
  586.     `-s'
  587.           Place the results in the history list instead of on the
  588.           standard output.
  589.  
  590.     `-n'
  591.           Do not add a newline to the output.
  592.  
  593.     `-l'
  594.           Print the arguments separated by newlines instead of spaces.
  595.  
  596.     `-N'
  597.           Print the arguments separated and terminated by nulls.
  598.  
  599.     `-o'
  600.           Print the arguments sorted in ascending order.
  601.  
  602.     `-O'
  603.           Print the arguments sorted in descending order.
  604.  
  605.     `-i'
  606.           If given together with `-o' or `-O', makes the sort be
  607.           case-insensitive.
  608.  
  609.     `-c'
  610.           Print the arguments in columns.
  611.  
  612.     `-uN'
  613.           Print the arguments to file descriptor N.
  614.  
  615.     `-p'
  616.           Print the arguments to the input of the coprocess.
  617.  
  618.     `-z'
  619.           Push the arguments onto the editing buffer stack, separated
  620.           by spaces; no escape sequences are recognized.
  621.  
  622.     `-D'
  623.           Treat the arguments as directory names, replacing prefixes
  624.           with `~' expressions, as appropriate.
  625.  
  626.     `-P'
  627.           Recognize the same escape sequences as in the `PROMPT'
  628.           parameter.
  629.  
  630. `pushd [ ARG ]'
  631. `pushd OLD NEW'
  632. `pushd +-N'
  633.      Change the current directory, and push the old current directory
  634.      onto the directory stack.  In the first form, change the current
  635.      directory to ARG.  If ARG is not specified, change to the second
  636.      directory on the stack (that is, exchange the top two entries), or
  637.      change to the value of `HOME' if the `PUSHD_TO_HOME' option is set
  638.      or if there is only one entry on the stack.  If ARG is `-', change
  639.      to the value of `OLDPWD', the previous directory.  If a directory
  640.      named ARG is not found in the current directory and ARG does not
  641.      contain a slash, search each component of the shell parameter
  642.      `cdpath'.  If the option `CDABLEVARS' is set, and a parameter
  643.      named ARG exists whose value begins with a slash, treat its value
  644.      as the directory.  If the option `PUSHD_SILENT' is not set, the
  645.      directory stack will be printed after a `pushd' is performed.
  646.  
  647.      The second form of `pushd' substitutes the string NEW for the
  648.      string OLD in the name of the current directory, and tries to
  649.      change to this new directory.
  650.  
  651.      The third form of `pushd' changes directory by rotating the
  652.      directory list.  An argument of the form `+n' identifies a stack
  653.      entry by counting from the left of the list shown by the `dirs'
  654.      command, starting with zero.  An argument of the form `-n' counts
  655.      from the right.  If the `PUSHD_MINUS' option is set, the meanings
  656.      of `+' and `-' in this context are swapped.
  657.  
  658. `pushln'
  659.      Equivalent to `print -nz'.
  660.  
  661. `pwd [ -r ]'
  662.      Print the absolute pathname of the current working directory.  If
  663.      the `-r' flag is specified or the `CHASE_LINKS' option is set, the
  664.      printed path will not contain symbolic links.
  665.  
  666. `r'
  667.      Equivalent to `fc -e -'.
  668.  
  669. `read [ -rzpqAclneE ] [ -k [NUM] ] [ -uN ] [ NAME?PROMPT ] [ NAME ... ]'
  670.      Read one line and break it into fields using the characters in
  671.      `IFS' as separators.
  672.  
  673.     `-r'
  674.           Raw mode: a `\' at the end of a line does not signify line
  675.           continuation.
  676.  
  677.     `-q'
  678.           Read only one character from the terminal and set NAME to `y'
  679.           if this character was `y' or `Y' and to `n' otherwise.  With
  680.           this flag set the return value is zero only if the character
  681.           was `y' or `Y'.
  682.  
  683.     `-k [ NUM ]'
  684.           Read only one (or NUM) characters from the terminal.
  685.  
  686.     `-z'
  687.           Read from the editor buffer stack.  The first field is
  688.           assigned to the first NAME, the second field to the second
  689.           NAME,  etc., with leftover fields assigned to the last NAME.
  690.  
  691.     `-e'
  692.     `-E'
  693.           The words read are printed after the whole line is read.  If
  694.           the `-e' flag is set, the words are not assigned to the
  695.           parameters.
  696.  
  697.     `-A'
  698.           The first NAME is taken as the name of an array and all words
  699.           are assigned to it.
  700.  
  701.     `-c'
  702.     `-l'
  703.           These flags are allowed only if called inside a function used
  704.           for completion (specified with the `-K' flag to `compctl').
  705.           If the `-c' flag is given, the words of  the  current command
  706.           are  read. If the `-l' flag is given, the whole line is
  707.           assigned as a scalar.  If `name' is omitted then `REPLY' is
  708.           used for scalars and `reply' for arrays.
  709.  
  710.     `-n'
  711.           Together with either of the previous flags, this option gives
  712.           the number of the word the cursor is on or the index of the
  713.           character the cursor is on respectively.
  714.  
  715.     `-uN'
  716.           Input is read from file descriptor N.
  717.  
  718.     `-p'
  719.           Input is read from the coprocess.
  720.  
  721.      If the first argument contains a `?', the remainder of this word is
  722.      used as a `prompt' on standard error when the shell is
  723.      interactive.  The exit status is `0' unless an end-of-file is
  724.      encountered.
  725.  
  726. `readonly [ NAME[=VALUE]] ...'
  727.      The given NAMES are marked readonly; these names cannot be changed
  728.      by subsequent assignment.
  729.  
  730. `rehash [ -df ]'
  731.      Throw out the command hash table and start over.  If the `-f'
  732.      option is set, rescan the command path immediately, instead of
  733.      rebuilding the hash table incrementally.
  734.  
  735.      The `-d' option causes `rehash' to act on the named directory table
  736.      instead of the command hash table.  This reduces the named
  737.      directory table to only the `~' entry.  If the `-f' option is also
  738.      used, the named directory table is rebuilt immediately.
  739.  
  740.      `rehash' is equivalent to `hash -r'.
  741.  
  742. `return [ N ]'
  743.      Causes a shell function or `.' script to return to the invoking
  744.      script with the return status specified by N.  If N is omitted
  745.      then the return status is that of the last command executed.
  746.  
  747.      If `return' was executed from a trap in a `TRAPxxx' function, the
  748.      effect is different for zero and nonzero return status.  With zero
  749.      status (or after an implicit return at the end of the trap), the
  750.      shell will return to whatever it was previously processing;  with
  751.      a non-zero status, the shell will behave as interrupted except
  752.      that the return status of the trap is retained.  Note that the
  753.      signal which caused the trap is passed as the first argument, so
  754.      the statement `return $((128+$1))' will return the same status as
  755.      if the signal had not been trapped.
  756.  
  757. `sched [+]HH:MM COMMAND ...'
  758. `sched [ -ITEM ]'
  759.      Make an entry in the scheduled list of commands to execute.  The
  760.      time may be specified in either absolute or relative time.  With no
  761.      arguments, prints the list of scheduled commands.  With the
  762.      argument `-ITEM', removes the given item from the list.
  763.  
  764. `set [ +-OPTIONS ] [ +-o OPTION NAME ] ... [ +-A [ NAME ] ] [ ARG ... ]'
  765.      Set the options for the shell and/or set the positional
  766.      parameters, or declare an array.  If the `-s' option is given it
  767.      causes the specified arguments to be sorted before assigning them
  768.      to the positional parameters (or to the array NAME if `-A' is
  769.      used).  With `+s' sort arguments in descending order.  *Note
  770.      Options::, for the meaning of the other flags.  Flags may be
  771.      specified by name using the `-o' option.  If the `-A' flag is
  772.      specified, NAME is set to an array containing the given ARGs; if
  773.      `+A' is used and NAME is an array, the gien arguments will replace
  774.      the initial elements of that array; if no NAME is specified, all
  775.      arrays are printed.  Otherwise the positional parameters are set.
  776.      If no arguments are given, then the names and values of all
  777.      parameters are printed on the standard output.  If the only
  778.      argument is `+', the names of all parameters are printed.
  779.  
  780. `setopt [ -m ] [ +-OPTIONS ] [ NAME ... ]'
  781.      Set the options for the shell.  All options specified either with
  782.      flags or by name are set.  If no arguments are supplied, the names
  783.      of all options currently set are printed.  In option names, case is
  784.      insignificant, and all underscore characters are ignored.  If the
  785.      `-m' flag is given the arguments are taken as patterns (which
  786.      should be quoted to preserve them from being interpreted as glob
  787.      patterns), and all options with names matching these patterns are
  788.      set.
  789.  
  790. `shift [ N ] [ NAME ... ]'
  791.      The positional parameters from `$N+1' ... are renamed `$1', where
  792.      N is an arithmetic expression that defaults to 1.  If any NAMEs
  793.      are given then the arrays with these names are shifted, instead of
  794.      the positional parameters.
  795.  
  796. `source'
  797.      Same as `.', except that the current directory is always searched
  798.      and is always searched first, before directories in `path'.
  799.  
  800. `suspend [ -f ]'
  801.      Suspend the execution of the shell (send it a `SIGTSTP') until it
  802.      receives a `SIGCONT'.  If the `-f' option is not given, complain
  803.      if this is a login shell.
  804.  
  805. `test ARG ...'
  806. `[ ARG ... ]'
  807.      Like the system version of `test'.  Added for compatibility; use
  808.      conditional expressions instead.
  809.  
  810. `times'
  811.      Print the accumulated user and system times for the shell and for
  812.      processes run from the shell.
  813.  
  814. `trap [ ARG ] [ SIG ] ...'
  815.      ARG is a command to be read and executed when the shell receives
  816.      SIG.  Each SIG can be given as a number or as the name of a
  817.      signal.  If ARG is `-', then all traps SIG are reset to their
  818.      default values.  If ARG is the null string, then this signal is
  819.      ignored by the shell and by the commands it invokes.  If SIG is
  820.      `ZERR' then ARG will be executed after each command with a nonzero
  821.      exit status.  If SIG is `DEBUG' then ARG will be executed after
  822.      each command. If SIG is `0' or `EXIT' and the `trap' statement is
  823.      executed inside the body of a function, then the command ARG is
  824.      executed after the function completes.  If SIG is `0' or `EXIT'
  825.      and the `trap' statement is not executed inside the body of a
  826.      function, then the command ARG is executed when the shell
  827.      terminates.  The `trap' command with no arguments prints a list of
  828.      commands associated with each signal.
  829.  
  830. `true'
  831.      Do nothing and return an exit code of 0.
  832.  
  833. `ttyctl [ -fu ]'
  834.      The `-f' option freezes the tty, and `-u' un-freezes it.  When the
  835.      tty is frozen, no changes made to the tty settings by external
  836.      programs will be honoured by the shell, except for changes in the
  837.      size of the screen; the shell will simply reset the settings to
  838.      their previous values as soon as each command exits.  Thus, `stty'
  839.      and similar programs have no effect when the tty is frozen.
  840.      Without options it reports whether the terminal is frozen or not.
  841.  
  842. `type [ -fpam ] NAME ...'
  843.      Same as `whence -v'.
  844.  
  845. `typeset [ +-LRUZfilrtuxm [N]] [ NAME[=VALUE]] ...'
  846.      Set attributes and values for shell parameters.  When invoked
  847.      inside a function, a new parameter is created which will be unset
  848.      when the function completes.  The new parameter will not be
  849.      exported unless `ALL_EXPORT' is set, in which case the parameter
  850.      will be exported provided no parameter of that name already
  851.      exists.  The following attributes are valid:
  852.  
  853.     `-L'
  854.           Left justify and remove leading blanks from VALUE.  If N is
  855.           nonzero, it defines the width of the field; otherwise it is
  856.           determined by the width of the value of the first assignment.
  857.           When the parameter is printed, it is filled on the right
  858.           with blanks or truncated if necessary to fit the field.
  859.           Leading zeros are removed if the `-Z' flag is also set.
  860.  
  861.     `-R'
  862.           Right justify and fill with leading blanks.  If N is nonzero
  863.           it defines the width of the field; otherwise it is determined
  864.           by the width of the value of the first assignment.  When the
  865.           parameter is printed, the field is left filled with blanks or
  866.           truncated from the end.
  867.  
  868.     `-U'
  869.           For arrays keep only the first element of each duplications.
  870.           It can also be set for colon separated special parameters
  871.           like `PATH' or `FIGNORE', etc.
  872.  
  873.     `-Z'
  874.           Right justify and fill with leading zeros if the first
  875.           non-blank character is a digit and the `-L' flag has not been
  876.           set.  If N is nonzero it defines the width of the field;
  877.           otherwise it is determined by the width of the value of the
  878.           first assignment.
  879.  
  880.     `-f'
  881.           The names refer to functions rather than parameters.  No
  882.           assignments can be made, and the only other valid flags are
  883.           `-t' and `-u'.  The flag `-t' turns on execution tracing for
  884.           this function.  The flag `-u' causes this function to be
  885.           marked for autoloading.  The `fpath' parameter will be
  886.           searched to find the function definition when the function is
  887.           first referenced.; see `autoload'.
  888.  
  889.     `-i'
  890.           Use an internal integer representation.  If N is nonzero it
  891.           defines the output arithmetic base, otherwise it is
  892.           determined by the first assignment.
  893.  
  894.     `-l'
  895.           Convert to lower case.
  896.  
  897.     `-r'
  898.           The given NAMEs are marked read-only.
  899.  
  900.     `-t'
  901.           Tags the named parameters.  Tags have no special meaning to
  902.           the shell.
  903.  
  904.     `-u'
  905.           Convert to upper case.
  906.  
  907.     `-x'
  908.           Mark for automatic export to the environment of subsequently
  909.           executed commands.
  910.  
  911.      Using `+' rather than `-' causes these flags to be turned off.  If
  912.      no arguments are given but flags are specified, a list of named
  913.      parameters which have these flags set is printed.  Using `+'
  914.      instead of `-' keeps their values from being printed.  If no
  915.      arguments or options are given, the names and attributes of all
  916.      parameters are printed.  If only the `-m' flag is given the
  917.      arguments are taken as patterns (which should be quoted), and all
  918.      parameters or functions (with the `-f' flag) with matching names
  919.      are printed.
  920.  
  921. `ulimit [ -SHacdflmnpstv ] [ LIMIT ] ...'
  922.      Set or display resource limits of the shell and the processes
  923.      started by the shell.  The value of LIMIT can be a number in the
  924.      unit specified below or the value `unlimited'.  If the `-H' flag
  925.      is given use hard limits instead of soft limits.  If the `-S' flag
  926.      is given together with the `-H' flag set both hard and soft
  927.      limits.  If no options are used, the file size limit (`-f') is
  928.      assumed.  If LIMIT is omitted the current value of the specified
  929.      resources are printed.  When more than one resource values are
  930.      printed the limit name and unit is printed before each value.
  931.  
  932.     `-a'
  933.           Lists all of the current resource limits.
  934.  
  935.     `-c'
  936.           Maximum size of core dumps, in 512-byte blocks.
  937.  
  938.     `-d'
  939.           Maximum size of the data segment, in Kbytes.
  940.  
  941.     `-f'
  942.           Maximum size of individual files written, in 512-byte blocks.
  943.  
  944.     `-l'
  945.           Maximum size of locked-in memory, in Kbytes.
  946.  
  947.     `-m'
  948.           Maximum size of physical memory, in Kbytes.
  949.  
  950.     `-n'
  951.           Maximum number of open file descriptors.
  952.  
  953.     `-s'
  954.           Maximum size of stack, in Kbytes.
  955.  
  956.     `-t'
  957.           Maximum number of CPU seconds.
  958.  
  959.     `-u'
  960.           The number of processes available to the user.
  961.  
  962.     `-v'
  963.           Maximum size of virtual memory, in Kbytes.
  964.  
  965. `umask [ -S] [ MASK ]'
  966.      The umask is set to MASK.  MASK can be either an octal number or a
  967.      symbolic value as described in `chmod(1)'.  If MASK is omitted,
  968.      the current value is printed.  The `-S' option causes the mask to
  969.      be printed as a symbolic value.  Otherwise, the mask is printed as
  970.      an octal number.  Note that in the symbolic form the permissions
  971.      you specify are those which are to be allowed (not denied) to the
  972.      users specified).
  973.  
  974. `unalias [ -m ] NAME ...'
  975.      The alias definition, if any, for each NAME is removed.  With the
  976.      `-m' flag, the arguments are taken as patterns (which should be
  977.      quoted), and all aliases with matching names are removed.
  978.      `unalias' is equivalent to `unhash -a'.
  979.  
  980. `unfunction [ -m ] NAME ...'
  981.      The function definition, if any, for each NAME is removed.  With
  982.      the `-m' flag, the arguments are taken as patterns (which should be
  983.      quoted), and all function with matching names are removed.
  984.      `unfunction' is equivalent to `unhash -f'.
  985.  
  986. `unhash [ -adfm ] NAME ...'
  987.      Remove the element named NAME from an internal hash table.  The
  988.      default is remove elements from the command hash table.  The `-a'
  989.      option causes `unhash' to remove aliases.  The `-f' option causes
  990.      `unhash' to remove shell functions.  The `-d' options causes
  991.      `unhash' to remove named directories.  If the `-m' flag is given
  992.      the arguments are taken as patterns (should be quoted) and all
  993.      elements of the corresponding hash table with matching names will
  994.      be removed.
  995.  
  996. `unlimit [ -hs ] RESOURCE ...'
  997.      The resource limit for each RESOURCE is set to the hard limit.  If
  998.      the `-h' flag is given and the shell is running as root, the hard
  999.      resource limit for each RESOURCE is removed.  The resources of the
  1000.      shell process are only changed if the `-s' flag is given.
  1001.  
  1002. `unset [ -fm ] NAME ...'
  1003.      Each named parameter is unset.  If the `-m' flag is set, the
  1004.      arguments are taken as patterns (which should be quoted), and all
  1005.      parameters with matching names are unset.  `Unset -f' is
  1006.      equivalent to `unfunction'.
  1007.  
  1008. `unsetopt [ -m ]  [ +-OPTIONS ] [ NAME ... ]'
  1009.      Unset the options for the shell.  All options specified either with
  1010.      flags or by name are unset.  If the `-m' flag is given, the
  1011.      arguments are taken as patterns (which should be quoted), and all
  1012.      options with names matching these patterns are unset.
  1013.  
  1014. `vared [ -c ] [ -h ] [ -p PROMPT] [ -r RPROMPT ] NAME'
  1015.      The value of the parameter NAME is loaded into the edit buffer,
  1016.      and the line editor is invoked.  When the editor exits, NAME is
  1017.      set to the string value returned by the editor.  If the `-c' flag
  1018.      is given, the parameter is created if it doesn't already exist.
  1019.      If the `-p' flag is given, PROMPT will be taken as the prompt to
  1020.      display at the left and if the `-r' flag is given, the following
  1021.      string gives the prompt to display at the right.  If the `-h' flag
  1022.      is specified, the history can be accessed from `zle'.
  1023.  
  1024. `wait [ JOB ... ]'
  1025.      Wait for the specified jobs or processes.  If JOB is not given
  1026.      then all currently active child processes are waited for.  Each
  1027.      JOB can be either a job specification or the process-id of a job
  1028.      in the job table.  The exit status from this command is that of
  1029.      the job waited for.
  1030.  
  1031. `whence [ -vcfpam ] NAME ...'
  1032.      For each name, indicate how it would be interpreted if used as a
  1033.      command name.  The `-v' flag produces a more verbose report.  The
  1034.      `-c' flag prints the results in a csh-like format and takes
  1035.      precedence over `-v'.  The `-f' flag causes the contents of a
  1036.      shell function to be displayed, which would otherwise not happen
  1037.      unless the `-c' flag were used.  The `-p' flag does a path search
  1038.      for NAME even if it is an alias, reserved word, shell function or
  1039.      builtin.  The `-a' flag does a search for all occurrences of NAME
  1040.      throughout the command path.  With the `-m' flag, the arguments
  1041.      are taken as patterns (which should be quoted), and the
  1042.      information is displayed for each command matching one of these
  1043.      patterns.
  1044.  
  1045. `where'
  1046.      Same as `whence -ca'.
  1047.  
  1048. `which [ -pam ] NAME ...'
  1049.      Same as `whence -c'.
  1050.  
  1051. 
  1052. File: zsh.info,  Node: Programmable Completion,  Next: Concept Index,  Prev: Shell Builtin Commands,  Up: Top
  1053.  
  1054. Programmable Completion
  1055. ***********************
  1056.  
  1057. `compctl [ -CDT ] OPTIONS [ COMMAND ... ]'
  1058.  
  1059. `compctl [ -CDT ] OPTIONS'
  1060. `        [  -x  PATTERN  OPTIONS - ... -- ] [ + OPTIONS [ -x ... -- ]
  1061. ... [+] ]'
  1062. `        [ COMMAND ... ]'
  1063.  
  1064. `compctl -L [ -CDT ] [ COMMAND ... ]'
  1065.  
  1066. `compctl + COMMAND ...'
  1067.  
  1068. Control the editor's completion behaviour according to the supplied set
  1069. of OPTIONS.  Various editing commands, notably
  1070. `expand-or-complete-word', usually bound to TAB, will attempt to
  1071. complete a word typed by the user, while others, notably
  1072. `delete-char-or-list', usually bound to `^D' in emacs editing mode,
  1073. list the possibilities; `compctl' controls what those possibilities
  1074. are.  They may for example be filenames (the most common case, and
  1075. hence the default), shell variables, or words from a user-specified
  1076. list.
  1077.  
  1078. * Menu:
  1079.  
  1080. * Command Flags::
  1081. * Options Flags::
  1082. * Alternative Completion::
  1083. * Extended Completion::
  1084. * Example::
  1085.  
  1086. 
  1087. File: zsh.info,  Node: Command Flags,  Next: Options Flags,  Up: Programmable Completion
  1088.  
  1089. Command Flags
  1090. =============
  1091.  
  1092. Completion of the arguments of a command may be different for each
  1093. command or may use the default.  The behaviour when completing the
  1094. command word itself may also be separately specified.  These correspond
  1095. to the following flags and arguments, all of which (except for `-L')
  1096. may be combined with any combination of the options described
  1097. subsequently in *Note Options Flags::.
  1098.  
  1099. `COMMAND ...'
  1100.      controls completion for the named commands, which must be listed
  1101.      last on the command line.  If completion is attempted for a
  1102.      command with a pathname containing slashes and no completion
  1103.      definition is found, the  search is retried with the last pathname
  1104.      component.  Note that aliases are expanded before the command name
  1105.      is determined unless the `COMPLETE_ALIASES' option is set.
  1106.      Commands should not be combined with the `-D', `-C' or `-T' flags.
  1107.  
  1108. `-D'
  1109.      controls default completion behavior for the arguments of commands
  1110.      not assigned any special behavior.  If no `compctl -D' command has
  1111.      been issued, filenames are completed.
  1112.  
  1113. `-C'
  1114.      controls completion when the command word itself is being
  1115.      completed.  If no `compctl -C' command has been issued,  the names
  1116.      of any executable command (whether in the path or specific to the
  1117.      shell, such as aliases or functions) are completed.
  1118.  
  1119. `-T'
  1120.      supplies completion flags to be used  before any other processing
  1121.      is done, even those given to specific commands with other `compctl'
  1122.      definitions.  This is only useful when combined with extended
  1123.      completion (the `-x' flag. *Note Extended Completion::).  Using
  1124.      this flag you can define default behaviour which will apply to all
  1125.      commands without exception, or you can alter the standard behaviour
  1126.      for all commands.  For example, if your access to the user
  1127.      database is too slow  and/or it contains too many users (so that
  1128.      completion after `~' is too slow to be usable), you can use
  1129.  
  1130.      `compctl -Tx  'C[0,*/*]' -f - 's[~]' -k FRIENDS -S/'
  1131.  
  1132.      to complete the strings in the array FRIENDS after a `~'.  The
  1133.      first argument is necessary so that this form of `~'-completion is
  1134.      not tried after the directory name is finished.
  1135.  
  1136. `-L'
  1137.      lists the existing completion behaviour in a manner suitable for
  1138.      putting into a start-up script; the existing behaviour is not
  1139.      changed.  Any combination of the above forms may be specified,
  1140.      otherwise all defined completions are listed.  Any other flags
  1141.      supplied are ignored.
  1142.  
  1143. `no argument'
  1144.      If no argument is given, `compctl' lists all defined completions
  1145.      in an abbreviated form; with a list of OPTIONS, all completions
  1146.      with those flags set (not counting extended completion) are listed.
  1147.  
  1148.      If the `+' flag is alone and followed immediately by the COMMAND
  1149.      list, the completion behaviour for all the commands in the list is
  1150.      reset to the default.  In other words, completion will
  1151.      subsequently use the options specified by the `-D' flag.
  1152.  
  1153. 
  1154. File: zsh.info,  Node: Options Flags,  Next: Alternative Completion,  Prev: Command Flags,  Up: Programmable Completion
  1155.  
  1156. Options Flags
  1157. =============
  1158.  
  1159. `[ -fcFBdeaRGovNAIOPZEnbjrzu ]'
  1160. `[ -k ARRAY ] [ -g GLOBSTRING ] [ -s SUBSTSTRING ]'
  1161. `[ -K FUNCTION ] [ -H NUM PATTERN ]'
  1162. `[ -Q ] [ -P PREFIX ] [ -S SUFFIX ]'
  1163. `[ -q ] [ -X EXPLANATION ]'
  1164. `[ -l CMD ] [ -U ]'
  1165.  
  1166. The remaining options specify the type of command arguments to look for
  1167. during completion.  Any combination of these flags may be specified;
  1168. the result is a sorted list of all the possibilities.  The options are
  1169. described in the following sections.
  1170.  
  1171. * Menu:
  1172.  
  1173. * Simple Flags::
  1174. * Flags with arguments::
  1175. * Control Flags::
  1176.  
  1177. 
  1178. File: zsh.info,  Node: Simple Flags,  Next: Flags with arguments,  Up: Options Flags
  1179.  
  1180. Simple Flags
  1181. ------------
  1182.  
  1183. These produce completion lists made up by the shell itself:
  1184.  
  1185. `-f'
  1186.      Filenames and file-system paths.
  1187.  
  1188. `-c'
  1189.      Command names, including aliases, shell functions, builtins and
  1190.      reserved words.
  1191.  
  1192. `-F'
  1193.      Function names.
  1194.  
  1195. `-B'
  1196.      Names of builtin commands.
  1197.  
  1198. `-m'
  1199.      Names of external commands.
  1200.  
  1201. `-w'
  1202.      Reserved words.
  1203.  
  1204. `-a'
  1205.      Alias names.
  1206.  
  1207. `-R'
  1208.      Names of regular (non-global) aliases.
  1209.  
  1210. `-G'
  1211.      Names of global aliases.
  1212.  
  1213. `-d'
  1214.      This can be combined with `-F', `-B', `-w', `-a', `-R' and `-G' to
  1215.      get names of disabled functions, builtins, reserved words or
  1216.      aliases.
  1217.  
  1218. `-e'
  1219.      This option (to show enabled commands) is in effect by default, but
  1220.      may be combined with `-d'; `-de' in combination with `-F', `-B',
  1221.      `-w', `-a', `-R' and `-G' will complete names of functions,
  1222.      builtins, reserved words or aliases whether or not they are
  1223.      disabled.
  1224.  
  1225. `-o'
  1226.      Names of shell options. *Note Options::.
  1227.  
  1228. `-v'
  1229.      Names of any variable defined in the shell.
  1230.  
  1231. `-N'
  1232.      Names of scalar (non-array) parameters.
  1233.  
  1234. `-A'
  1235.      Array names.
  1236.  
  1237. `-I'
  1238.      Names of integer variables.
  1239.  
  1240. `-O'
  1241.      Names of read-only variables.
  1242.  
  1243. `-p'
  1244.      Names of parameters used by the shell (including special
  1245.      parameters).
  1246.  
  1247. `-Z'
  1248.      Names of shell special parameters.
  1249.  
  1250. `-E'
  1251.      Names of environment variables.
  1252.  
  1253. `-n'
  1254.      Named directories.
  1255.  
  1256. `-b'
  1257.      Key binding names.
  1258.  
  1259. `-j'
  1260.      Job names: the first word of the job leader's command line.  This
  1261.      is useful with the kill builtin.
  1262.  
  1263. `-r'
  1264.      Names of running jobs.
  1265.  
  1266. `-z'
  1267.      Names of suspended jobs.
  1268.  
  1269. `-u'
  1270.      User names.
  1271.  
  1272.