1ZSHOPTIONS(1)               General Commands Manual              ZSHOPTIONS(1)
2
3
4

NAME

6       zshoptions - zsh options
7

SPECIFYING OPTIONS

9       Options are primarily referred to by name.  These names are case insen‐
10       sitive and underscores are ignored.  For example, `allexport' is equiv‐
11       alent to `A__lleXP_ort'.
12
13       The  sense of an option name may be inverted by preceding it with `no',
14       so `setopt No_Beep' is equivalent to `unsetopt beep'.   This  inversion
15       can only be done once, so `nonobeep' is not a synonym for `beep'.  Sim‐
16       ilarly, `tify' is not  a  synonym  for  `nonotify'  (the  inversion  of
17       `notify').
18
19       Some  options also have one or more single letter names.  There are two
20       sets of single letter options: one used by default, and another used to
21       emulate  sh/ksh  (used  when the SH_OPTION_LETTERS option is set).  The
22       single letter options can be used on the shell command  line,  or  with
23       the  set, setopt and unsetopt builtins, as normal Unix options preceded
24       by `-'.
25
26       The sense of the single letter options may be  inverted  by  using  `+'
27       instead  of  `-'.   Some  of the single letter option names refer to an
28       option being off, in which case the inversion of that  name  refers  to
29       the  option  being  on.  For example, `+n' is the short name of `exec',
30       and `-n' is the short name of its inversion, `noexec'.
31
32       In strings of single letter options supplied to the shell  at  startup,
33       trailing  whitespace  will  be ignored; for example the string `-f    '
34       will be treated just as `-f', but the string `-f i' is an error.   This
35       is  because many systems which implement the `#!' mechanism for calling
36       scripts do not strip trailing whitespace.
37

DESCRIPTION OF OPTIONS

39       In the following list, options set by default  in  all  emulations  are
40       marked  <D>;  those  set by default only in csh, ksh, sh, or zsh emula‐
41       tions are marked <C>, <K>,  <S>,  <Z>  as  appropriate.   When  listing
42       options  (by  `setopt', `unsetopt', `set -o' or `set +o'), those turned
43       on by default appear in the list prefixed  with  `no'.   Hence  (unless
44       KSH_OPTION_PRINT is set), `setopt' shows all options whose settings are
45       changed from the default.
46
47   Changing Directories
48       AUTO_CD (-J)
49              If a command is issued that can't be executed as a  normal  com‐
50              mand, and the command is the name of a directory, perform the cd
51              command to that directory.
52
53       AUTO_PUSHD (-N)
54              Make cd push the old directory onto the directory stack.
55
56       CDABLE_VARS (-T)
57              If the argument to a cd command  (or  an  implied  cd  with  the
58              AUTO_CD  option set) is not a directory, and does not begin with
59              a slash, try to expand the expression as if it were preceded  by
60              a `~' (see the section `Filename Expansion').
61
62       CHASE_DOTS
63              When  changing  to  a  directory  containing a path segment `..'
64              which would otherwise be treated as canceling the previous  seg‐
65              ment in the path (in other words, `foo/..' would be removed from
66              the path, or if `..' is the first part of  the  path,  the  last
67              part of the current working directory would be removed), instead
68              resolve the path to the  physical  directory.   This  option  is
69              overridden by CHASE_LINKS.
70
71              For  example,  suppose  /foo/bar  is  a  link  to  the directory
72              /alt/rod.  Without this option set, `cd /foo/bar/..' changes  to
73              /foo;  with it set, it changes to /alt.  The same applies if the
74              current directory is /foo/bar and `cd ..' is  used.   Note  that
75              all other symbolic links in the path will also be resolved.
76
77       CHASE_LINKS (-w)
78              Resolve symbolic links to their true values when changing direc‐
79              tory.  This also has the effect of CHASE_DOTS, i.e. a `..'  path
80              segment  will  be  treated  as referring to the physical parent,
81              even if the preceding path segment is a symbolic link.
82
83       POSIX_CD
84              Modifies the behaviour of cd, chdir and pushd commands  to  make
85              them more compatible with the POSIX standard. The behaviour with
86              the option unset is described in the documentation  for  the  cd
87              builtin in zshbuiltins(1).  If the option is set, the shell does
88              not test for directories beneath the local directory (`.') until
89              after all directories in cdpath have been tested.
90
91              Also, if the option is set, the conditions under which the shell
92              prints the new directory after changing to it are modified.   It
93              is no longer restricted to interactive shells (although printing
94              of the directory stack with pushd is still limited  to  interac‐
95              tive  shells); and any use of a component of CDPATH, including a
96              `.' but excluding an empty component that is  otherwise  treated
97              as `.', causes the directory to be printed.
98
99       PUSHD_IGNORE_DUPS
100              Don't push multiple copies of the same directory onto the direc‐
101              tory stack.
102
103       PUSHD_MINUS
104              Exchanges the meanings of `+' and `-' when used with a number to
105              specify a directory in the stack.
106
107       PUSHD_SILENT (-E)
108              Do not print the directory stack after pushd or popd.
109
110       PUSHD_TO_HOME (-D)
111              Have pushd with no arguments act like `pushd $HOME'.
112
113   Completion
114       ALWAYS_LAST_PROMPT <D>
115              If  unset,  key functions that list completions try to return to
116              the last prompt if given a numeric argument. If set these  func‐
117              tions try to return to the last prompt if given no numeric argu‐
118              ment.
119
120       ALWAYS_TO_END
121              If a completion is performed with the cursor within a word,  and
122              a full completion is inserted, the cursor is moved to the end of
123              the word.  That is, the cursor is moved to the end of  the  word
124              if  either a single match is inserted or menu completion is per‐
125              formed.
126
127       AUTO_LIST (-9) <D>
128              Automatically list choices on an ambiguous completion.
129
130       AUTO_MENU <D>
131              Automatically use menu completion after the  second  consecutive
132              request  for  completion,  for  example  by pressing the tab key
133              repeatedly. This option is overridden by MENU_COMPLETE.
134
135       AUTO_NAME_DIRS
136              Any parameter that is set to the absolute name  of  a  directory
137              immediately becomes a name for that directory, that will be used
138              by the `%~' and related prompt sequences, and will be  available
139              when completion is performed on a word starting with `~'.  (Oth‐
140              erwise, the parameter must be used in the form `~param' first.)
141
142       AUTO_PARAM_KEYS <D>
143              If a parameter name was  completed  and  a  following  character
144              (normally  a space) automatically inserted, and the next charac‐
145              ter typed is one of those that have to come directly  after  the
146              name (like `}', `:', etc.), the automatically added character is
147              deleted, so that the character typed comes immediately after the
148              parameter  name.   Completion  in  a brace expansion is affected
149              similarly: the added character is a `,', which will  be  removed
150              if `}' is typed next.
151
152       AUTO_PARAM_SLASH <D>
153              If  a  parameter  is  completed  whose  content is the name of a
154              directory, then add a trailing slash instead of a space.
155
156       AUTO_REMOVE_SLASH <D>
157              When the last character resulting from a completion is  a  slash
158              and  the next character typed is a word delimiter, a slash, or a
159              character that ends a command (such as a semicolon or an  amper‐
160              sand), remove the slash.
161
162       BASH_AUTO_LIST
163              On  an ambiguous completion, automatically list choices when the
164              completion function is called twice in succession.   This  takes
165              precedence  over  AUTO_LIST.   The  setting of LIST_AMBIGUOUS is
166              respected.  If AUTO_MENU is set, the menu  behaviour  will  then
167              start  with  the third press.  Note that this will not work with
168              MENU_COMPLETE, since repeated completion calls immediately cycle
169              through the list in that case.
170
171       COMPLETE_ALIASES
172              Prevents  aliases on the command line from being internally sub‐
173              stituted before completion is attempted.  The effect is to  make
174              the alias a distinct command for completion purposes.
175
176       COMPLETE_IN_WORD
177              If unset, the cursor is set to the end of the word if completion
178              is started. Otherwise it stays there and completion is done from
179              both ends.
180
181       GLOB_COMPLETE
182              When  the current word has a glob pattern, do not insert all the
183              words resulting from the expansion but generate matches  as  for
184              completion  and  cycle  through  them  like  MENU_COMPLETE.  The
185              matches are generated as if a `*' was added to the  end  of  the
186              word,  or  inserted  at the cursor when COMPLETE_IN_WORD is set.
187              This actually uses pattern matching, not globbing, so  it  works
188              not only for files but for any completion, such as options, user
189              names, etc.
190
191              Note that when the pattern matcher  is  used,  matching  control
192              (for  example,  case-insensitive or anchored matching) cannot be
193              used.  This limitation only applies when the current  word  con‐
194              tains a pattern; simply turning on the GLOB_COMPLETE option does
195              not have this effect.
196
197       HASH_LIST_ALL <D>
198              Whenever  a  command  completion  or  spelling   correction   is
199              attempted,  make  sure  the entire command path is hashed first.
200              This makes the first completion slower but avoids false  reports
201              of spelling errors.
202
203       LIST_AMBIGUOUS <D>
204              This  option works when AUTO_LIST or BASH_AUTO_LIST is also set.
205              If there is an unambiguous prefix to insert on the command line,
206              that is done without a completion list being displayed; in other
207              words, auto-listing behaviour  only  takes  place  when  nothing
208              would  be  inserted.   In the case of BASH_AUTO_LIST, this means
209              that the list will be delayed to the third call of the function.
210
211       LIST_BEEP <D>
212              Beep on an ambiguous completion.  More accurately,  this  forces
213              the  completion  widgets to return status 1 on an ambiguous com‐
214              pletion, which causes the shell to beep if the  option  BEEP  is
215              also  set;  this  may be modified if completion is called from a
216              user-defined widget.
217
218       LIST_PACKED
219              Try to make the completion list smaller (occupying  less  lines)
220              by printing the matches in columns with different widths.
221
222       LIST_ROWS_FIRST
223              Lay  out  the  matches  in completion lists sorted horizontally,
224              that is, the second match is to the right of the first one,  not
225              under it as usual.
226
227       LIST_TYPES (-X) <D>
228              When  listing files that are possible completions, show the type
229              of each file with a trailing identifying mark.
230
231       MENU_COMPLETE (-Y)
232              On an ambiguous completion, instead of listing possibilities  or
233              beeping,  insert the first match immediately.  Then when comple‐
234              tion is requested again, remove the first match and  insert  the
235              second  match,  etc.  When there are no more matches, go back to
236              the first one again.  reverse-menu-complete may be used to  loop
237              through  the  list in the other direction. This option overrides
238              AUTO_MENU.
239
240       REC_EXACT (-S)
241              In completion, recognize exact matches even if they are  ambigu‐
242              ous.
243
244   Expansion and Globbing
245       BAD_PATTERN (+2) <C> <Z>
246              If  a  pattern for filename generation is badly formed, print an
247              error message.  (If this option is unset, the  pattern  will  be
248              left unchanged.)
249
250       BARE_GLOB_QUAL <Z>
251              In  a  glob  pattern,  treat  a trailing set of parentheses as a
252              qualifier list, if it contains no `|', `(' or (if  special)  `~'
253              characters.  See the section `Filename Generation'.
254
255       BRACE_CCL
256              Expand  expressions  in braces which would not otherwise undergo
257              brace expansion to a lexically ordered list of all  the  charac‐
258              ters.  See the section `Brace Expansion'.
259
260       CASE_GLOB <D>
261              Make  globbing  (filename  generation)  sensitive to case.  Note
262              that other uses of patterns are always sensitive  to  case.   If
263              the option is unset, the presence of any character which is spe‐
264              cial to filename generation will cause  case-insensitive  match‐
265              ing.   For  example, cvs(/) can match the directory CVS owing to
266              the  presence  of  the  globbing   flag   (unless   the   option
267              BARE_GLOB_QUAL is unset).
268
269       CASE_MATCH <D>
270              Make  regular  expressions using the zsh/regex module (including
271              matches with =~) sensitive to case.
272
273       CSH_NULL_GLOB <C>
274              If a pattern for filename generation has no matches, delete  the
275              pattern  from  the  argument list; do not report an error unless
276              all the patterns  in  a  command  have  no  matches.   Overrides
277              NOMATCH.
278
279       EQUALS <Z>
280              Perform = filename expansion.  (See the section `Filename Expan‐
281              sion'.)
282
283       EXTENDED_GLOB
284              Treat the `#', `~' and `^' characters as part  of  patterns  for
285              filename  generation, etc.  (An initial unquoted `~' always pro‐
286              duces named directory expansion.)
287
288       GLOB (+F, ksh: +f) <D>
289              Perform filename generation (globbing).  (See the section `File‐
290              name Generation'.)
291
292       GLOB_ASSIGN <C>
293              If  this  option  is set, filename generation (globbing) is per‐
294              formed on the right hand side of scalar parameter assignments of
295              the  form  `name=pattern (e.g. `foo=*').  If the result has more
296              than one word the parameter will  become  an  array  with  those
297              words  as  arguments. This option is provided for backwards com‐
298              patibility only: globbing is always performed on the right  hand
299              side  of  array  assignments  of  the  form `name=(value)' (e.g.
300              `foo=(*)') and this form is recommended for clarity;  with  this
301              option  set,  it  is  not possible to predict whether the result
302              will be an array or a scalar.
303
304       GLOB_DOTS (-4)
305              Do not require a leading `.' in a filename to be matched explic‐
306              itly.
307
308       GLOB_SUBST <C> <K> <S>
309              Treat any characters resulting from parameter expansion as being
310              eligible for file expansion and  filename  generation,  and  any
311              characters resulting from command substitution as being eligible
312              for filename generation.  Braces (and commas in between) do  not
313              become eligible for expansion.
314
315       HIST_SUBST_PATTERN
316              Substitutions  using  the  :s  and :& history modifiers are per‐
317              formed with pattern matching instead of string  matching.   This
318              occurs  wherever  history  modifiers  are  valid, including glob
319              qualifiers and parameters.  See the section  Modifiers  in  zsh‐
320              expn(1).
321
322       IGNORE_BRACES (-I) <S>
323              Do  not  perform  brace  expansion.  For historical reasons this
324              also includes the effect of the IGNORE_CLOSE_BRACES option.
325
326       IGNORE_CLOSE_BRACES
327              When neither this option nor IGNORE_BRACES is set, a sole  close
328              brace character `}' is syntactically significant at any point on
329              a command line.  This has the effect that no semicolon  or  new‐
330              line  is  necessary  before  the brace terminating a function or
331              current shell construct.  When either option is set,  a  closing
332              brace  is  syntactically  significant  only in command position.
333              Unlike IGNORE_BRACES, this option does not disable brace  expan‐
334              sion.
335
336              For  example,  with both options unset a function may be defined
337              in the following fashion:
338
339                     args() { echo $# }
340
341              while if either option is set, this does not work and  something
342              equivalent to the following is required:
343
344                     args() { echo $#; }
345
346       KSH_GLOB <K>
347              In  pattern  matching,  the  interpretation  of  parentheses  is
348              affected by a preceding `@', `*', `+', `?' or `!'.  See the sec‐
349              tion `Filename Generation'.
350
351       MAGIC_EQUAL_SUBST
352              All unquoted arguments of the form `anything=expression' appear‐
353              ing after the command name have  filename  expansion  (that  is,
354              where  expression has a leading `~' or `=') performed on expres‐
355              sion as if it were a parameter assignment.  The argument is  not
356              otherwise  treated  specially;  it is passed to the command as a
357              single argument, and not used as an actual parameter assignment.
358              For  example,  in  echo  foo=~/bar:~/rod,  both occurrences of ~
359              would be replaced.  Note that this happens anyway  with  typeset
360              and similar statements.
361
362              This  option respects the setting of the KSH_TYPESET option.  In
363              other words, if both options are in  effect,  arguments  looking
364              like assignments will not undergo word splitting.
365
366       MARK_DIRS (-8, ksh: -X)
367              Append  a  trailing  `/'  to  all directory names resulting from
368              filename generation (globbing).
369
370       MULTIBYTE <C> <K> <Z>
371              Respect multibyte characters when found in strings.   When  this
372              option  is set, strings are examined using the system library to
373              determine how many bytes form a character, depending on the cur‐
374              rent  locale.   This  affects  the way characters are counted in
375              pattern matching, parameter values and various delimiters.
376
377              The option is on by default  if  the  shell  was  compiled  with
378              MULTIBYTE_SUPPORT except in sh emulation; otherwise it is off by
379              default and has no effect if turned on.  The mode is off  in  sh
380              emulation  for compatibility but for interactive use may need to
381              be turned on if the terminal interprets multibyte characters.
382
383              If the option is off a single byte is always treated as a single
384              character.   This  setting  is  designed  purely  for  examining
385              strings known to contain raw bytes or other values that may  not
386              be  characters  in  the  current locale.  It is not necessary to
387              unset the option merely because the character set for  the  cur‐
388              rent locale does not contain multibyte characters.
389
390              The  option  does  not  affect the shell's editor,  which always
391              uses the locale to  determine  multibyte  characters.   This  is
392              because  the character set displayed by the terminal emulator is
393              independent of shell settings.
394
395       NOMATCH (+3) <C> <Z>
396              If a pattern for filename generation has no  matches,  print  an
397              error,  instead  of  leaving  it unchanged in the argument list.
398              This also applies to file expansion of an initial `~' or `='.
399
400       NULL_GLOB (-G)
401              If a pattern for filename generation has no matches, delete  the
402              pattern  from  the  argument list instead of reporting an error.
403              Overrides NOMATCH.
404
405       NUMERIC_GLOB_SORT
406              If numeric filenames are matched by a filename  generation  pat‐
407              tern,  sort  the filenames numerically rather than lexicographi‐
408              cally.
409
410       RC_EXPAND_PARAM (-P)
411              Array expansions of the form `foo${xx}bar', where the  parameter
412              xx  is  set  to  (a  b c), are substituted with `fooabar foobbar
413              foocbar' instead of the default `fooa b  cbar'.   Note  that  an
414              empty array will therefore cause all arguments to be removed.
415
416       REMATCH_PCRE <Z>
417              If  set,  regular  expression matching with the =~ operator will
418              use Perl-Compatible Regular Expressions from the  PCRE  library,
419              if  available.   If  not  set,  regular expressions will use the
420              extended regexp syntax provided by the system libraries.
421
422       SH_GLOB <K> <S>
423              Disables the special meaning of `(', `|', `)' and '<' for  glob‐
424              bing  the  result of parameter and command substitutions, and in
425              some other places where the shell accepts patterns.  If  SH_GLOB
426              is  set but KSH_GLOB is not, the shell allows the interpretation
427              of subshell expressions enclosed in parentheses  in  some  cases
428              where  there  is  no  space before the opening parenthesis, e.g.
429              !(true) is interpreted as if there were a  space  after  the  !.
430              This option is set by default if zsh is invoked as sh or ksh.
431
432       UNSET (+u, ksh: +u) <K> <S> <Z>
433              Treat  unset parameters as if they were empty when substituting.
434              Otherwise they are treated as an error.
435
436       WARN_CREATE_GLOBAL
437              Print a warning message when a global parameter is created in  a
438              function  by an assignment.  This often indicates that a parame‐
439              ter has not been  declared  local  when  it  should  have  been.
440              Parameters  explicitly  declared  global  from within a function
441              using typeset -g do not cause a warning.  Note that there is  no
442              warning  when a local parameter is assigned to in a nested func‐
443              tion, which may also indicate an error.
444
445   History
446       APPEND_HISTORY <D>
447              If this is set, zsh sessions will append their history  list  to
448              the  history file, rather than replace it. Thus, multiple paral‐
449              lel zsh sessions will all have the new entries from  their  his‐
450              tory  lists  added  to  the history file, in the order that they
451              exit.  The file will still be periodically re-written to trim it
452              when the number of lines grows 20% beyond the value specified by
453              $SAVEHIST (see also the HIST_SAVE_BY_COPY option).
454
455       BANG_HIST (+K) <C> <Z>
456              Perform textual history expansion, csh-style, treating the char‐
457              acter `!' specially.
458
459       EXTENDED_HISTORY <C>
460              Save  each  command's  beginning timestamp (in seconds since the
461              epoch) and the duration (in seconds) to the history  file.   The
462              format of this prefixed data is:
463
464              `: <beginning time>:<elapsed seconds>;<command>'.
465
466       HIST_ALLOW_CLOBBER
467              Add `|' to output redirections in the history.  This allows his‐
468              tory references to clobber files even when CLOBBER is unset.
469
470       HIST_BEEP <D>
471              Beep when an attempt is made to access  a  history  entry  which
472              isn't there.
473
474       HIST_EXPIRE_DUPS_FIRST
475              If  the  internal history needs to be trimmed to add the current
476              command line, setting this option will cause the oldest  history
477              event  that  has  a  duplicate to be lost before losing a unique
478              event from the list.  You should be sure to  set  the  value  of
479              HISTSIZE  to  a larger number than SAVEHIST in order to give you
480              some room for the duplicated events, otherwise this option  will
481              behave  just like HIST_IGNORE_ALL_DUPS once the history fills up
482              with unique events.
483
484       HIST_FCNTL_LOCK
485              When writing out the history file, by default  zsh  uses  ad-hoc
486              file  locking to avoid known problems with locking on some oper‐
487              ating systems.  With this option locking is done by means of the
488              system's  fcntl call, where this method is available.  On recent
489              operating systems this may provide better performance,  in  par‐
490              ticular  avoiding  history  corruption  when files are stored on
491              NFS.
492
493       HIST_FIND_NO_DUPS
494              When searching for history entries in the line  editor,  do  not
495              display  duplicates  of  a  line  previously  found, even if the
496              duplicates are not contiguous.
497
498       HIST_IGNORE_ALL_DUPS
499              If a new command line being added to the history list duplicates
500              an  older  one, the older command is removed from the list (even
501              if it is not the previous event).
502
503       HIST_IGNORE_DUPS (-h)
504              Do not enter command lines into the history  list  if  they  are
505              duplicates of the previous event.
506
507       HIST_IGNORE_SPACE (-g)
508              Remove  command lines from the history list when the first char‐
509              acter on the line is a  space,  or  when  one  of  the  expanded
510              aliases  contains  a  leading  space.   Only normal aliases (not
511              global or suffix aliases) have this behaviour.   Note  that  the
512              command  lingers  in the internal history until the next command
513              is entered before it vanishes, allowing you to briefly reuse  or
514              edit the line.  If you want to make it vanish right away without
515              entering another command, type a space and press return.
516
517       HIST_LEX_WORDS
518              By default, shell history that is read in from  files  is  split
519              into  words  on all white space.  This means that arguments with
520              quoted whitespace are not correctly  handled,  with  the  conse‐
521              quence  that references to words in history lines that have been
522              read from a file may be inaccurate.  When this  option  is  set,
523              words  read  in  from a history file are divided up in a similar
524              fashion to normal shell command line  handling.   Although  this
525              produces  more  accurately  delimited  words, if the size of the
526              history file is large this can be slow.  Trial and error is nec‐
527              essary to decide.
528
529       HIST_NO_FUNCTIONS
530              Remove  function  definitions  from the history list.  Note that
531              the function lingers in the internal history until the next com‐
532              mand  is entered before it vanishes, allowing you to briefly re‐
533              use or edit the definition.
534
535       HIST_NO_STORE
536              Remove the history (fc -l) command from the  history  list  when
537              invoked.   Note that the command lingers in the internal history
538              until the next command is entered before it  vanishes,  allowing
539              you to briefly reuse or edit the line.
540
541       HIST_REDUCE_BLANKS
542              Remove  superfluous blanks from each command line being added to
543              the history list.
544
545       HIST_SAVE_BY_COPY <D>
546              When the history file is re-written, we  normally  write  out  a
547              copy of the file named $HISTFILE.new and then rename it over the
548              old one.  However, if this option is unset, we instead  truncate
549              the old history file and write out the new version in-place.  If
550              one of the history-appending options  is  enabled,  this  option
551              only  has  an  effect when the enlarged history file needs to be
552              re-written to trim it down to size.  Disable this  only  if  you
553              have  special  needs, as doing so makes it possible to lose his‐
554              tory entries if zsh gets interrupted during the save.
555
556              When writing out a copy of the history file, zsh  preserves  the
557              old file's permissions and group information, but will refuse to
558              write out a new file if  it  would  change  the  history  file's
559              owner.
560
561       HIST_SAVE_NO_DUPS
562              When writing out the history file, older commands that duplicate
563              newer ones are omitted.
564
565       HIST_VERIFY
566              Whenever the user enters a line with  history  expansion,  don't
567              execute  the  line  directly; instead, perform history expansion
568              and reload the line into the editing buffer.
569
570       INC_APPEND_HISTORY
571              This options works like APPEND_HISTORY except that  new  history
572              lines  are added to the $HISTFILE incrementally (as soon as they
573              are entered), rather than waiting until the  shell  exits.   The
574              file  will  still be periodically re-written to trim it when the
575              number of lines grows 20% beyond the value specified  by  $SAVE‐
576              HIST (see also the HIST_SAVE_BY_COPY option).
577
578       SHARE_HISTORY <K>
579
580              This option both imports new commands from the history file, and
581              also causes your typed commands to be appended  to  the  history
582              file  (the  latter  is like specifying INC_APPEND_HISTORY).  The
583              history lines are also output with timestamps ala  EXTENDED_HIS‐
584              TORY  (which  makes it easier to find the spot where we left off
585              reading the file after it gets re-written).
586
587              By default, history movement commands visit the  imported  lines
588              as  well  as the local lines, but you can toggle this on and off
589              with the set-local-history zle binding.  It is also possible  to
590              create a zle widget that will make some commands ignore imported
591              commands, and some include them.
592
593              If you find that you want more control over  when  commands  get
594              imported,    you   may   wish   to   turn   SHARE_HISTORY   off,
595              INC_APPEND_HISTORY on, and then manually import  commands  when‐
596              ever you need them using `fc -RI'.
597
598   Initialisation
599       ALL_EXPORT (-a, ksh: -a)
600              All parameters subsequently defined are automatically exported.
601
602       GLOBAL_EXPORT (<Z>)
603              If  this  option  is  set,  passing  the -x flag to the builtins
604              declare, float, integer, readonly and typeset  (but  not  local)
605              will  also  set  the  -g flag;  hence parameters exported to the
606              environment will not be made local to  the  enclosing  function,
607              unless they were already or the flag +g is given explicitly.  If
608              the option is unset, exported parameters will be made  local  in
609              just the same way as any other parameter.
610
611              This  option is set by default for backward compatibility; it is
612              not recommended that its behaviour be relied  upon.   Note  that
613              the  builtin  export  always  sets both the -x and -g flags, and
614              hence its effect extends beyond the scope of the enclosing func‐
615              tion; this is the most portable way to achieve this behaviour.
616
617       GLOBAL_RCS (-d) <D>
618              If  this  option  is  unset,  the  startup  files /etc/zprofile,
619              /etc/zshrc, /etc/zlogin and /etc/zlogout will not  be  run.   It
620              can  be  disabled  and  re-enabled at any time, including inside
621              local startup files (.zshrc, etc.).
622
623       RCS (+f) <D>
624              After /etc/zshenv is sourced on  startup,  source  the  .zshenv,
625              /etc/zprofile, .zprofile, /etc/zshrc, .zshrc, /etc/zlogin, .zlo‐
626              gin, and .zlogout files, as described in  the  section  `Files'.
627              If  this option is unset, the /etc/zshenv file is still sourced,
628              but any of the others will not be; it can be set at any time  to
629              prevent  the remaining startup files after the currently execut‐
630              ing one from being sourced.
631
632   Input/Output
633       ALIASES <D>
634              Expand aliases.
635
636       CLOBBER (+C, ksh: +C) <D>
637              Allows `>' redirection to truncate existing files, and  `>>'  to
638              create files.  Otherwise `>!' or `>|' must be used to truncate a
639              file, and `>>!' or `>>|' to create a file.
640
641       CORRECT (-0)
642              Try to correct the spelling of commands.  Note  that,  when  the
643              HASH_LIST_ALL  option is not set or when some directories in the
644              path are not readable, this may falsely report  spelling  errors
645              the first time some commands are used.
646
647              The  shell  variable  CORRECT_IGNORE  may be set to a pattern to
648              match words that will never be offered as corrections.
649
650       CORRECT_ALL (-O)
651              Try to correct the spelling of all arguments in a line.
652
653       DVORAK Use the Dvorak keyboard instead of the standard qwerty  keyboard
654              as  a  basis for examining spelling mistakes for the CORRECT and
655              CORRECT_ALL options and the spell-word editor command.
656
657       FLOW_CONTROL <D>
658              If this option is unset,  output  flow  control  via  start/stop
659              characters  (usually  assigned  to  ^S/^Q)  is  disabled  in the
660              shell's editor.
661
662       IGNORE_EOF (-7)
663              Do not exit on end-of-file.  Require the use of exit  or  logout
664              instead.   However, ten consecutive EOFs will cause the shell to
665              exit anyway, to avoid the shell hanging if its tty goes away.
666
667              Also, if this option is set and the Zsh  Line  Editor  is  used,
668              widgets implemented by shell functions can be bound to EOF (nor‐
669              mally Control-D) without printing the  normal  warning  message.
670              This works only for normal widgets, not for completion widgets.
671
672       INTERACTIVE_COMMENTS (-k) <K> <S>
673              Allow comments even in interactive shells.
674
675       HASH_CMDS <D>
676              Note the location of each command the first time it is executed.
677              Subsequent invocations of the same command will  use  the  saved
678              location,  avoiding  a path search.  If this option is unset, no
679              path hashing is done at all.  However, when CORRECT is set, com‐
680              mands whose names do not appear in the functions or aliases hash
681              tables are hashed in order to avoid reporting them  as  spelling
682              errors.
683
684       HASH_DIRS <D>
685              Whenever a command name is hashed, hash the directory containing
686              it, as well as all directories that occur earlier in  the  path.
687              Has no effect if neither HASH_CMDS nor CORRECT is set.
688
689       HASH_EXECUTABLES_ONLY
690              When  hashing  commands because of HASH_COMMANDS, check that the
691              file to be hashed is actually an  executable.   This  option  is
692              unset  by default as if the path contains a large number of com‐
693              mands, or consists of many remote files,  the  additional  tests
694              can take a long time.  Trial and error is needed to show if this
695              option is beneficial.
696
697       MAIL_WARNING (-U)
698              Print a warning message if a mail file has been  accessed  since
699              the shell last checked.
700
701       PATH_DIRS (-Q)
702              Perform  a  path  search  even  on command names with slashes in
703              them.  Thus if `/usr/local/bin' is in the user's path, and he or
704              she  types  `X11/xinit',  the command `/usr/local/bin/X11/xinit'
705              will be executed  (assuming  it  exists).   Commands  explicitly
706              beginning  with  `/',  `./' or `../' are not subject to the path
707              search.  This also applies to the `.' builtin.
708
709              Note that subdirectories of the  current  directory  are  always
710              searched  for  executables  specified  in this form.  This takes
711              place before any search indicated by this option, and regardless
712              of  whether  `.'  or the current directory appear in the command
713              search path.
714
715       PATH_SCRIPT <K> <S>
716              If this option  is  not  set,  a  script  passed  as  the  first
717              non-option  argument  to  the shell must contain the name of the
718              file to open.  If this option is set, and the  script  does  not
719              specify  a directory path, the script is looked for first in the
720              current directory, then in the command path.   See  the  section
721              INVOCATION in zsh(1).
722
723       PRINT_EIGHT_BIT
724              Print  eight  bit characters literally in completion lists, etc.
725              This option is not necessary if your  system  correctly  returns
726              the printability of eight bit characters (see ctype(3)).
727
728       PRINT_EXIT_VALUE (-1)
729              Print the exit value of programs with non-zero exit status.
730
731       RC_QUOTES
732              Allow  the  character  sequence  `'''  to signify a single quote
733              within singly quoted strings.   Note  this  does  not  apply  in
734              quoted strings using the format $'...', where a backslashed sin‐
735              gle quote can be used.
736
737       RM_STAR_SILENT (-H) <K> <S>
738              Do not query the user before executing `rm *' or `rm path/*'.
739
740       RM_STAR_WAIT
741              If querying the user before executing `rm  *'  or  `rm  path/*',
742              first  wait  ten seconds and ignore anything typed in that time.
743              This avoids the problem of reflexively answering  `yes'  to  the
744              query  when  one  didn't really mean it.  The wait and query can
745              always be avoided by expanding the `*' in ZLE (with tab).
746
747       SHORT_LOOPS <C> <Z>
748              Allow the short forms of for, repeat, select, if,  and  function
749              constructs.
750
751       SUN_KEYBOARD_HACK (-L)
752              If  a line ends with a backquote, and there are an odd number of
753              backquotes on the line, ignore the trailing backquote.  This  is
754              useful  on some keyboards where the return key is too small, and
755              the backquote key lies annoyingly close to it.  As  an  alterna‐
756              tive the variable KEYBOARD_HACK lets you choose the character to
757              be removed.
758
759   Job Control
760       AUTO_CONTINUE
761              With this option set, stopped jobs that are removed from the job
762              table  with  the disown builtin command are automatically sent a
763              CONT signal to make them running.
764
765       AUTO_RESUME (-W)
766              Treat single word simple commands without redirection as  candi‐
767              dates for resumption of an existing job.
768
769       BG_NICE (-6) <C> <Z>
770              Run all background jobs at a lower priority.  This option is set
771              by default.
772
773       CHECK_JOBS <Z>
774              Report the status of background and suspended jobs before  exit‐
775              ing a shell with job control; a second attempt to exit the shell
776              will succeed.  NO_CHECK_JOBS is best used  only  in  combination
777              with NO_HUP, else such jobs will be killed automatically.
778
779              The  check is omitted if the commands run from the previous com‐
780              mand line included a `jobs' command, since  it  is  assumed  the
781              user  is  aware  that there are background or suspended jobs.  A
782              `jobs' command run from one of the hook functions defined in the
783              section  SPECIAL FUNCTIONS in zshmisc(1) is not counted for this
784              purpose.
785
786       HUP <Z>
787              Send the HUP signal to running jobs when the shell exits.
788
789       LONG_LIST_JOBS (-R)
790              List jobs in the long format by default.
791
792       MONITOR (-m, ksh: -m)
793              Allow job control.  Set by default in interactive shells.
794
795       NOTIFY (-5, ksh: -b) <Z>
796              Report the status of background jobs  immediately,  rather  than
797              waiting until just before printing a prompt.
798
799       POSIX_JOBS <K> <S>
800              This  option  makes  job  control  more compliant with the POSIX
801              standard.
802
803              When the option is not set, the MONITOR option is unset on entry
804              to subshells, so that job control is no longer active.  When the
805              option is set, the MONITOR option and job control remain  active
806              in  the  subshell,  but  note that the subshell has no access to
807              jobs in the parent shell.
808
809              When the option is not set, jobs put in the background or  fore‐
810              ground  with  bg  or  fg are displayed with the same information
811              that would be reported by jobs.  When the option  is  set,  only
812              the  text  is  printed.   The  output  from  jobs  itself is not
813              affected by the option.
814
815              When the option is not set,  job  information  from  the  parent
816              shell is saved for output within a subshell (for example, within
817              a pipeline).  When the option is set,  the  output  of  jobs  is
818              empty until a job is started within the subshell.
819
820              In  previous  versions  of the shell, it was necessary to enable
821              POSIX_JOBS in order for the builtin command wait to  return  the
822              status  of  background jobs that had already exited.  This is no
823              longer the case.
824
825   Prompting
826       PROMPT_BANG <K>
827              If set, `!' is  treated  specially  in  prompt  expansion.   See
828              EXPANSION OF PROMPT SEQUENCES in zshmisc(1).
829
830       PROMPT_CR (+V) <D>
831              Print  a  carriage  return  just before printing a prompt in the
832              line editor.  This is on by default  as  multi-line  editing  is
833              only  possible  if  the editor knows where the start of the line
834              appears.
835
836       PROMPT_SP <D>
837              Attempt to preserve a partial line (i.e. a line that did not end
838              with  a  newline) that would otherwise be covered up by the com‐
839              mand prompt due to the PROMPT_CR option.   This  works  by  out‐
840              putting  some  cursor-control  characters, including a series of
841              spaces, that should make the terminal wrap to the next line when
842              a  partial line is present (note that this is only successful if
843              your terminal has automatic margins, which is typical).
844
845              When a partial line is preserved, by default  you  will  see  an
846              inverse+bold  character  at  the end of the partial line:  a "%"
847              for a normal user or a "#" for root.  If set, the shell  parame‐
848              ter PROMPT_EOL_MARK can be used to customize how the end of par‐
849              tial lines are shown.
850
851              NOTE: if the PROMPT_CR option is not set, enabling  this  option
852              will have no effect.  This option is on by default.
853
854       PROMPT_PERCENT <C> <Z>
855              If  set,  `%'  is  treated  specially  in prompt expansion.  See
856              EXPANSION OF PROMPT SEQUENCES in zshmisc(1).
857
858       PROMPT_SUBST <K> <S>
859              If set, parameter expansion, command substitution and arithmetic
860              expansion   are  performed  in  prompts.   Substitutions  within
861              prompts do not affect the command status.
862
863       TRANSIENT_RPROMPT
864              Remove any right prompt from display when  accepting  a  command
865              line.   This  may  be useful with terminals with other cut/paste
866              methods.
867
868   Scripts and Functions
869       C_BASES
870              Output hexadecimal numbers in the standard C format, for example
871              `0xFF' instead of the usual `16#FF'.  If the option OCTAL_ZEROES
872              is also set (it is  not  by  default),  octal  numbers  will  be
873              treated  similarly  and hence appear as `077' instead of `8#77'.
874              This option has no effect on the choice of the output base,  nor
875              on  the  output of bases other than hexadecimal and octal.  Note
876              that these formats will be understood on input  irrespective  of
877              the setting of C_BASES.
878
879       C_PRECEDENCES
880              This  alters  the  precedence of arithmetic operators to be more
881              like C and other programming languages; the  section  ARITHMETIC
882              EVALUATION in zshmisc(1) has an explicit list.
883
884       DEBUG_BEFORE_CMD
885              Run  the  DEBUG  trap  before  each command; otherwise it is run
886              after each command.  Setting this option mimics the behaviour of
887              ksh 93; with the option unset the behaviour is that of ksh 88.
888
889       ERR_EXIT (-e, ksh: -e)
890              If  a command has a non-zero exit status, execute the ZERR trap,
891              if set, and exit.  This is disabled while running initialization
892              scripts.
893
894              The behaviour is also disabled inside DEBUG traps.  In this case
895              the option is handled specially: it is unset  on  entry  to  the
896              trap.   If  the  option  DEBUG_BEFORE_CMD  is  set,  as it is by
897              default, and the option ERR_EXIT is found to have  been  set  on
898              exit,  then  the  command for which the DEBUG trap is being exe‐
899              cuted is skipped.  The option is restored after the trap exits.
900
901       ERR_RETURN
902              If a command has a non-zero exit status, return immediately from
903              the  enclosing  function.   The  logic  is identical to that for
904              ERR_EXIT, except that an implicit return statement  is  executed
905              instead  of an exit.  This will trigger an exit at the outermost
906              level of a non-interactive script.
907
908       EVAL_LINENO <Z>
909              If set, line numbers of expressions evaluated using the  builtin
910              eval  are tracked separately of the enclosing environment.  This
911              applies both to the parameter LINENO and the line number  output
912              by  the  prompt  escape  %i.   If  the option is set, the prompt
913              escape %N will output the string `(eval)' instead of the  script
914              or function name as an indication.   (The two prompt escapes are
915              typically used in the parameter PS4 to be output when the option
916              XTRACE is set.)  If EVAL_LINENO is unset, the line number of the
917              surrounding script or function is retained  during  the  evalua‐
918              tion.
919
920       EXEC (+n, ksh: +n) <D>
921              Do execute commands.  Without this option, commands are read and
922              checked for syntax errors, but not executed.  This option cannot
923              be  turned off in an interactive shell, except when `-n' is sup‐
924              plied to the shell at startup.
925
926       FUNCTION_ARGZERO <C> <Z>
927              When executing a shell function or sourcing  a  script,  set  $0
928              temporarily to the name of the function/script.
929
930       LOCAL_OPTIONS <K>
931              If  this option is set at the point of return from a shell func‐
932              tion, most options (including this one) which were in force upon
933              entry  to  the  function  are  restored;  options  that  are not
934              restored are PRIVILEGED and RESTRICTED.   Otherwise,  only  this
935              option and the XTRACE and PRINT_EXIT_VALUE options are restored.
936              Hence if this is explicitly unset by a shell function the  other
937              options in force at the point of return will remain so.  A shell
938              function can also guarantee itself a known  shell  configuration
939              with  a  formulation  like  `emulate  -L  zsh'; the -L activates
940              LOCAL_OPTIONS.
941
942       LOCAL_TRAPS <K>
943              If this option is set when a signal trap is set inside  a  func‐
944              tion,  then the previous status of the trap for that signal will
945              be restored when the function exits.  Note that this option must
946              be  set  prior  to  altering  the  trap behaviour in a function;
947              unlike LOCAL_OPTIONS, the value on exit  from  the  function  is
948              irrelevant.   However,  it  does  not  need to be set before any
949              global trap for that to be correctly  restored  by  a  function.
950              For example,
951
952                     unsetopt localtraps
953                     trap - INT
954                     fn() { setopt localtraps; trap '' INT; sleep 3; }
955
956              will restore normal handling of SIGINT after the function exits.
957
958       MULTI_FUNC_DEF <Z>
959              Allow definitions of multiple functions at once in the form `fn1
960              fn2...()'; if the option is not set, this causes a parse  error.
961              Definition  of  multiple  functions with the function keyword is
962              always allowed.  Multiple function  definitions  are  not  often
963              used and can cause obscure errors.
964
965       MULTIOS <Z>
966              Perform  implicit  tees  or  cats when multiple redirections are
967              attempted (see the section `Redirection').
968
969       OCTAL_ZEROES <S>
970              Interpret any integer constant beginning with a 0 as octal,  per
971              IEEE  Std 1003.2-1992 (ISO 9945-2:1993).  This is not enabled by
972              default as it causes problems with parsing of, for example, date
973              and time strings with leading zeroes.
974
975              Sequences  of  digits indicating a numeric base such as the `08'
976              component in `08#77' are always interpreted as decimal,  regard‐
977              less of leading zeroes.
978
979       SOURCE_TRACE
980              If  set,  zsh will print an informational message announcing the
981              name of each file it loads.  The format of the output is similar
982              to  that  for the XTRACE option, with the message <sourcetrace>.
983              A file may be loaded by the shell itself when it starts  up  and
984              shuts  down  (Startup/Shutdown  Files)  or  by  the  use  of the
985              `source' and `dot' builtin commands.
986
987       TYPESET_SILENT
988              If this is unset, executing any of the `typeset' family of  com‐
989              mands with no options and a list of parameters that have no val‐
990              ues to be assigned but already exist will display the  value  of
991              the  parameter.   If  the option is set, they will only be shown
992              when parameters are selected with the `-m' option.   The  option
993              `-p' is available whether or not the option is set.
994
995       VERBOSE (-v, ksh: -v)
996              Print shell input lines as they are read.
997
998       XTRACE (-x, ksh: -x)
999              Print  commands  and  their arguments as they are executed.  The
1000              output is proceded by the value of $PS4, formatted as  described
1001              in the section EXPANSION OF PROMPT SEQUENCES in zshmisc(1).
1002
1003   Shell Emulation
1004       BASH_REMATCH
1005              When  set,  matches  performed with the =~ operator will set the
1006              BASH_REMATCH array variable, instead of the  default  MATCH  and
1007              match  variables.   The  first element of the BASH_REMATCH array
1008              will contain the entire matched  text  and  subsequent  elements
1009              will contain extracted substrings.  This option makes more sense
1010              when KSH_ARRAYS is also set, so that the entire matched  portion
1011              is  stored  at  index  0  and the first substring is at index 1.
1012              Without this option, the  MATCH  variable  contains  the  entire
1013              matched text and the match array variable contains substrings.
1014
1015       BSD_ECHO <S>
1016              Make  the  echo builtin compatible with the BSD echo(1) command.
1017              This disables  backslashed  escape  sequences  in  echo  strings
1018              unless the -e option is specified.
1019
1020       CONTINUE_ON_ERROR
1021              If  a fatal error is encountered (see the section ERRORS in zsh‐
1022              misc(1)), and the code is running in a script,  the  shell  will
1023              resume  execution at the next statement in the script at the top
1024              level, in other words outside all functions or shell  constructs
1025              such  as  loops  and  conditions.   This mimics the behaviour of
1026              interactive shells, where the shell returns to the  line  editor
1027              to  read  a new command; it was the normal behaviour in versions
1028              of zsh before 5.0.1.
1029
1030       CSH_JUNKIE_HISTORY <C>
1031              A history reference without an event specifier will always refer
1032              to  the  previous  command.  Without this option, such a history
1033              reference refers to the same event as the previous history  ref‐
1034              erence, defaulting to the previous command.
1035
1036       CSH_JUNKIE_LOOPS <C>
1037              Allow  loop  bodies  to take the form `list; end' instead of `do
1038              list; done'.
1039
1040       CSH_JUNKIE_QUOTES <C>
1041              Changes the rules for single- and double-quoted  text  to  match
1042              that  of  csh.  These require that embedded newlines be preceded
1043              by a backslash; unescaped newlines will cause an error  message.
1044              In  double-quoted  strings, it is made impossible to escape `$',
1045              ``' or `"' (and `\' itself no longer needs  escaping).   Command
1046              substitutions are only expanded once, and cannot be nested.
1047
1048       CSH_NULLCMD <C>
1049              Do  not  use  the values of NULLCMD and READNULLCMD when running
1050              redirections with no command.  This make such redirections  fail
1051              (see the section `Redirection').
1052
1053       KSH_ARRAYS <K> <S>
1054              Emulate  ksh  array  handling  as  closely as possible.  If this
1055              option is set, array elements are numbered from zero,  an  array
1056              parameter  without subscript refers to the first element instead
1057              of the whole array, and braces are required to  delimit  a  sub‐
1058              script (`${path[2]}' rather than just `$path[2]').
1059
1060       KSH_AUTOLOAD <K> <S>
1061              Emulate  ksh function autoloading.  This means that when a func‐
1062              tion is autoloaded, the corresponding file is  merely  executed,
1063              and  must define the function itself.  (By default, the function
1064              is defined to the contents of the file.  However, the most  com‐
1065              mon  ksh-style case - of the file containing only a simple defi‐
1066              nition of the function - is always handled in the ksh-compatible
1067              manner.)
1068
1069       KSH_OPTION_PRINT <K>
1070              Alters the way options settings are printed: instead of separate
1071              lists of set and unset options, all options  are  shown,  marked
1072              `on' if they are in the non-default state, `off' otherwise.
1073
1074       KSH_TYPESET <K>
1075              Alters  the  way  arguments  to  the typeset family of commands,
1076              including declare, export, float, integer, local  and  readonly,
1077              are  processed.   Without  this  option, zsh will perform normal
1078              word splitting after command and parameter  expansion  in  argu‐
1079              ments  of  an  assignment; with it, word splitting does not take
1080              place in those cases.
1081
1082       KSH_ZERO_SUBSCRIPT
1083              Treat use of a subscript  of  value  zero  in  array  or  string
1084              expressions  as  a reference to the first element, i.e. the ele‐
1085              ment that usually has the subscript 1.  Ignored if KSH_ARRAYS is
1086              also set.
1087
1088              If  neither  this  option  nor KSH_ARRAYS is set, accesses to an
1089              element of an array or string  with  subscript  zero  return  an
1090              empty  element  or string, while attempts to set element zero of
1091              an array or string are treated as an error.   However,  attempts
1092              to  set  an  otherwise  valid subscript range that includes zero
1093              will succeed.  For example, if KSH_ZERO_SUBSCRIPT is not set,
1094
1095                     array[0]=(element)
1096
1097              is an error, while
1098
1099                     array[0,1]=(element)
1100
1101              is not and will replace the first element of the array.
1102
1103              This option is for compatibility  with  older  versions  of  the
1104              shell and is not recommended in new code.
1105
1106       POSIX_ALIASES <K> <S>
1107              When  this  option is set, reserved words are not candidates for
1108              alias expansion:  it is still possible to declare any of them as
1109              an  alias, but the alias will never be expanded.  Reserved words
1110              are described in the section RESERVED WORDS in zshmisc(1).
1111
1112              Alias expansion takes place while text is being read; hence when
1113              this  option is set it does not take effect until the end of any
1114              function or other piece of shell code parsed as one unit.   Note
1115              this  may  cause  differences  from  other  shells even when the
1116              option is in effect.  For example, when running a  command  with
1117              `zsh  -c',  or even `zsh -o posixaliases -c', the entire command
1118              argument is parsed as one unit, so aliases  defined  within  the
1119              argument  are  not  available even in later lines.  If in doubt,
1120              avoid use of aliases in non-interactive code.
1121
1122       POSIX_BUILTINS <K> <S>
1123              When this option is set the command builtin can be used to  exe‐
1124              cute  shell  builtin  commands.  Parameter assignments specified
1125              before shell functions and special builtins are kept  after  the
1126              command  completes  unless  the special builtin is prefixed with
1127              the command builtin.  Special builtins are  .,  :,  break,  con‐
1128              tinue,  declare,  eval,  exit, export, integer, local, readonly,
1129              return, set, shift, source, times, trap and unset.
1130
1131              In addition, various error conditions associated with the  above
1132              builtins  or  exec  cause a non-interactive shell to exit and an
1133              interactive shell to return to its top-level processing.
1134
1135       POSIX_IDENTIFIERS <K> <S>
1136              When this option is set, only the ASCII characters a to z, A  to
1137              Z,  0  to  9  and  _  may be used in identifiers (names of shell
1138              parameters and modules).
1139
1140              When the option is unset  and  multibyte  character  support  is
1141              enabled  (i.e.  it  is  compiled  in and the option MULTIBYTE is
1142              set), then additionally any alphanumeric characters in the local
1143              character set may be used in identifiers.  Note that scripts and
1144              functions written with this feature are not portable,  and  also
1145              that  both  options must be set before the script or function is
1146              parsed; setting them during execution is not sufficient  as  the
1147              syntax  variable=value  has  already  been  parsed  as a command
1148              rather than an assignment.
1149
1150              If multibyte character support is not compiled  into  the  shell
1151              this  option  is ignored; all octets with the top bit set may be
1152              used in identifiers.  This is non-standard  but  is  the  tradi‐
1153              tional zsh behaviour.
1154
1155       POSIX_STRINGS <K> <S>
1156              This  option affects processing of quoted strings.  Currently it
1157              only affects the behaviour of null characters, i.e. character  0
1158              in the portable character set corresponding to US ASCII.
1159
1160              When  this  option  is  not set, null characters embedded within
1161              strings of the form $'...' are treated as  ordinary  characters.
1162              The  entire  string is maintained within the shell and output to
1163              files where necessary, although owing  to  restrictions  of  the
1164              library  interface the string is truncated at the null character
1165              in file names, environment variables, or in arguments to  exter‐
1166              nal programs.
1167
1168              When  this  option is set, the $'...' expression is truncated at
1169              the null character.  Note  that  remaining  parts  of  the  same
1170              string beyond the termination of the quotes are not trunctated.
1171
1172              For example, the command line argument a$'b\0c'd is treated with
1173              the option off as the characters a, b, null, c, d, and with  the
1174              option on as the characters a, b, d.
1175
1176       POSIX_TRAPS <K> <S>
1177              When  the is option is set, the usual zsh behaviour of executing
1178              traps for EXIT on exit from shell functions is  suppressed.   In
1179              that case, manipulating EXIT traps always alters the global trap
1180              for exiting the shell; the LOCAL_TRAPS option is ignored for the
1181              EXIT trap.
1182
1183       SH_FILE_EXPANSION <K> <S>
1184              Perform  filename expansion (e.g., ~ expansion) before parameter
1185              expansion, command substitution, arithmetic expansion and  brace
1186              expansion.  If this option is unset, it is performed after brace
1187              expansion, so things like `~$USERNAME' and `~{pfalstad,rc}' will
1188              work.
1189
1190       SH_NULLCMD <K> <S>
1191              Do  not  use  the  values  of NULLCMD and READNULLCMD when doing
1192              redirections, use `:' instead (see the section `Redirection').
1193
1194       SH_OPTION_LETTERS <K> <S>
1195              If this option is set the shell tries to interpret single letter
1196              options  (which  are  used  with  set and setopt) like ksh does.
1197              This also affects the value of the - special parameter.
1198
1199       SH_WORD_SPLIT (-y) <K> <S>
1200              Causes field splitting to be  performed  on  unquoted  parameter
1201              expansions.   Note  that this option has nothing to do with word
1202              splitting.  (See the section `Parameter Expansion'.)
1203
1204       TRAPS_ASYNC
1205              While waiting for a program to  exit,  handle  signals  and  run
1206              traps  immediately.   Otherwise  the  trap  is run after a child
1207              process has exited.  Note this does  not  affect  the  point  at
1208              which  traps  are  run for any case other than when the shell is
1209              waiting for a child process.
1210
1211   Shell State
1212       INTERACTIVE (-i, ksh: -i)
1213              This is an interactive shell.  This option is set upon initiali‐
1214              sation  if  the  standard  input is a tty and commands are being
1215              read from standard input.  (See the discussion  of  SHIN_STDIN.)
1216              This  heuristic may be overridden by specifying a state for this
1217              option on the command line.  The value of this option  can  only
1218              be  changed  via  flags supplied at invocation of the shell.  It
1219              cannot be changed once zsh is running.
1220
1221       LOGIN (-l, ksh: -l)
1222              This is a login shell.  If this option is  not  explicitly  set,
1223              the  shell  becomes  a login shell if the first character of the
1224              argv[0] passed to the shell is a `-'.
1225
1226       PRIVILEGED (-p, ksh: -p)
1227              Turn on  privileged  mode.  This  is  enabled  automatically  on
1228              startup  if  the  effective  user (group) ID is not equal to the
1229              real user (group) ID.  Turning this option off causes the effec‐
1230              tive  user  and  group  IDs to be set to the real user and group
1231              IDs. This option disables sourcing user startup files.   If  zsh
1232              is invoked as `sh' or `ksh' with this option set, /etc/suid_pro‐
1233              file is sourced  (after  /etc/profile  on  interactive  shells).
1234              Sourcing  ~/.profile  is  disabled  and  the contents of the ENV
1235              variable is ignored. This option cannot be changed using the  -m
1236              option of setopt and unsetopt, and changing it inside a function
1237              always changes  it  globally  regardless  of  the  LOCAL_OPTIONS
1238              option.
1239
1240       RESTRICTED (-r)
1241              Enables  restricted  mode.   This option cannot be changed using
1242              unsetopt, and setting it inside a  function  always  changes  it
1243              globally  regardless  of the LOCAL_OPTIONS option.  See the sec‐
1244              tion `Restricted Shell'.
1245
1246       SHIN_STDIN (-s, ksh: -s)
1247              Commands are being read from the standard input.   Commands  are
1248              read  from standard input if no command is specified with -c and
1249              no file of commands is specified.  If SHIN_STDIN is set  explic‐
1250              itly on the command line, any argument that would otherwise have
1251              been taken as a file to run will instead be treated as a  normal
1252              positional  parameter.   Note  that  setting  or  unsetting this
1253              option on the command line does not necessarily affect the state
1254              the option will have while the shell is running - that is purely
1255              an indicator of whether on not commands are actually being  read
1256              from  standard  input.   The  value  of  this option can only be
1257              changed via flags supplied at invocation of the shell.  It  can‐
1258              not be changed once zsh is running.
1259
1260       SINGLE_COMMAND (-t, ksh: -t)
1261              If  the  shell  is reading from standard input, it exits after a
1262              single command has been executed.  This  also  makes  the  shell
1263              non-interactive, unless the INTERACTIVE option is explicitly set
1264              on the command line.  The value  of  this  option  can  only  be
1265              changed  via flags supplied at invocation of the shell.  It can‐
1266              not be changed once zsh is running.
1267
1268   Zle
1269       BEEP (+B) <D>
1270              Beep on error in ZLE.
1271
1272       COMBINING_CHARS
1273              Assume that the  terminal  displays  combining  characters  cor‐
1274              rectly.   Specifically, if a base alphanumeric character is fol‐
1275              lowed by one or more zero-width punctuation  characters,  assume
1276              that  the  zero-width  characters will be displayed as modifica‐
1277              tions to the base character within the same width.  Not all ter‐
1278              minals handle this.  If this option is not set, zero-width char‐
1279              acters are displayed separately with special mark-up.
1280
1281              If this option is set, the pattern  test  [[:WORD:]]  matches  a
1282              zero-width  punctuation character on the assumption that it will
1283              be used as part of a word in combination with a word  character.
1284              Otherwise  the  base  shell does not handle combining characters
1285              specially.
1286
1287       EMACS  If ZLE is loaded, turning on  this  option  has  the  equivalent
1288              effect  of  `bindkey  -e'.  In addition, the VI option is unset.
1289              Turning it off has no effect.  The option setting is not guaran‐
1290              teed to reflect the current keymap.  This option is provided for
1291              compatibility; bindkey is the recommended interface.
1292
1293       OVERSTRIKE
1294              Start up the line editor in overstrike mode.
1295
1296       SINGLE_LINE_ZLE (-M) <K>
1297              Use single-line command line editing instead of multi-line.
1298
1299              Note that although this is on by default  in  ksh  emulation  it
1300              only provides superficial compatibility with the ksh line editor
1301              and reduces the effectiveness of the zsh line editor.  As it has
1302              no  effect  on shell syntax, many users may wish to disable this
1303              option when using ksh emulation interactively.
1304
1305       VI     If ZLE is loaded, turning on  this  option  has  the  equivalent
1306              effect of `bindkey -v'.  In addition, the EMACS option is unset.
1307              Turning it off has no effect.  The option setting is not guaran‐
1308              teed to reflect the current keymap.  This option is provided for
1309              compatibility; bindkey is the recommended interface.
1310
1311       ZLE (-Z)
1312              Use the zsh line editor.  Set by default in  interactive  shells
1313              connected to a terminal.
1314

OPTION ALIASES

1316       Some  options have alternative names.  These aliases are never used for
1317       output, but can be used just like normal option names  when  specifying
1318       options to the shell.
1319
1320       BRACE_EXPAND
1321              NO_IGNORE_BRACES (ksh and bash compatibility)
1322
1323       DOT_GLOB
1324              GLOB_DOTS (bash compatibility)
1325
1326       HASH_ALL
1327              HASH_CMDS (bash compatibility)
1328
1329       HIST_APPEND
1330              APPEND_HISTORY (bash compatibility)
1331
1332       HIST_EXPAND
1333              BANG_HIST (bash compatibility)
1334
1335       LOG    NO_HIST_NO_FUNCTIONS (ksh compatibility)
1336
1337       MAIL_WARN
1338              MAIL_WARNING (bash compatibility)
1339
1340       ONE_CMD
1341              SINGLE_COMMAND (bash compatibility)
1342
1343       PHYSICAL
1344              CHASE_LINKS (ksh and bash compatibility)
1345
1346       PROMPT_VARS
1347              PROMPT_SUBST (bash compatibility)
1348
1349       STDIN  SHIN_STDIN (ksh compatibility)
1350
1351       TRACK_ALL
1352              HASH_CMDS (ksh compatibility)
1353

SINGLE LETTER OPTIONS

1355   Default set
1356       -0     CORRECT
1357       -1     PRINT_EXIT_VALUE
1358       -2     NO_BAD_PATTERN
1359       -3     NO_NOMATCH
1360       -4     GLOB_DOTS
1361       -5     NOTIFY
1362       -6     BG_NICE
1363       -7     IGNORE_EOF
1364       -8     MARK_DIRS
1365       -9     AUTO_LIST
1366       -B     NO_BEEP
1367       -C     NO_CLOBBER
1368       -D     PUSHD_TO_HOME
1369       -E     PUSHD_SILENT
1370       -F     NO_GLOB
1371       -G     NULL_GLOB
1372       -H     RM_STAR_SILENT
1373       -I     IGNORE_BRACES
1374       -J     AUTO_CD
1375       -K     NO_BANG_HIST
1376       -L     SUN_KEYBOARD_HACK
1377       -M     SINGLE_LINE_ZLE
1378       -N     AUTO_PUSHD
1379       -O     CORRECT_ALL
1380       -P     RC_EXPAND_PARAM
1381       -Q     PATH_DIRS
1382       -R     LONG_LIST_JOBS
1383       -S     REC_EXACT
1384       -T     CDABLE_VARS
1385       -U     MAIL_WARNING
1386       -V     NO_PROMPT_CR
1387       -W     AUTO_RESUME
1388       -X     LIST_TYPES
1389       -Y     MENU_COMPLETE
1390       -Z     ZLE
1391       -a     ALL_EXPORT
1392       -e     ERR_EXIT
1393       -f     NO_RCS
1394       -g     HIST_IGNORE_SPACE
1395       -h     HIST_IGNORE_DUPS
1396       -i     INTERACTIVE
1397       -k     INTERACTIVE_COMMENTS
1398       -l     LOGIN
1399       -m     MONITOR
1400       -n     NO_EXEC
1401       -p     PRIVILEGED
1402       -r     RESTRICTED
1403       -s     SHIN_STDIN
1404       -t     SINGLE_COMMAND
1405       -u     NO_UNSET
1406       -v     VERBOSE
1407       -w     CHASE_LINKS
1408       -x     XTRACE
1409       -y     SH_WORD_SPLIT
1410
1411   sh/ksh emulation set
1412       -C     NO_CLOBBER
1413       -T     TRAPS_ASYNC
1414       -X     MARK_DIRS
1415       -a     ALL_EXPORT
1416       -b     NOTIFY
1417       -e     ERR_EXIT
1418       -f     NO_GLOB
1419       -i     INTERACTIVE
1420       -l     LOGIN
1421       -m     MONITOR
1422       -n     NO_EXEC
1423       -p     PRIVILEGED
1424       -r     RESTRICTED
1425       -s     SHIN_STDIN
1426       -t     SINGLE_COMMAND
1427       -u     NO_UNSET
1428       -v     VERBOSE
1429       -x     XTRACE
1430
1431   Also note
1432       -A     Used by set for setting arrays
1433       -b     Used on the command line to specify end of option processing
1434       -c     Used on the command line to specify a single command
1435       -m     Used by setopt for pattern-matching option setting
1436       -o     Used in all places to allow use of long option names
1437       -s     Used by set to sort positional parameters
1438
1439
1440
1441zsh 5.0.2                      December 21, 2012                 ZSHOPTIONS(1)
Impressum