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

OPTION ALIASES

1269       Some  options have alternative names.  These aliases are never used for
1270       output, but can be used just like normal option names  when  specifying
1271       options to the shell.
1272
1273       BRACE_EXPAND
1274              NO_IGNORE_BRACES (ksh and bash compatibility)
1275
1276       DOT_GLOB
1277              GLOB_DOTS (bash compatibility)
1278
1279       HASH_ALL
1280              HASH_CMDS (bash compatibility)
1281
1282       HIST_APPEND
1283              APPEND_HISTORY (bash compatibility)
1284
1285       HIST_EXPAND
1286              BANG_HIST (bash compatibility)
1287
1288       LOG    NO_HIST_NO_FUNCTIONS (ksh compatibility)
1289
1290       MAIL_WARN
1291              MAIL_WARNING (bash compatibility)
1292
1293       ONE_CMD
1294              SINGLE_COMMAND (bash compatibility)
1295
1296       PHYSICAL
1297              CHASE_LINKS (ksh and bash compatibility)
1298
1299       PROMPT_VARS
1300              PROMPT_SUBST (bash compatibility)
1301
1302       STDIN  SHIN_STDIN (ksh compatibility)
1303
1304       TRACK_ALL
1305              HASH_CMDS (ksh compatibility)
1306

SINGLE LETTER OPTIONS

1308   Default set
1309       -0     CORRECT
1310       -1     PRINT_EXIT_VALUE
1311       -2     NO_BAD_PATTERN
1312       -3     NO_NOMATCH
1313       -4     GLOB_DOTS
1314       -5     NOTIFY
1315       -6     BG_NICE
1316       -7     IGNORE_EOF
1317       -8     MARK_DIRS
1318       -9     AUTO_LIST
1319       -B     NO_BEEP
1320       -C     NO_CLOBBER
1321       -D     PUSHD_TO_HOME
1322       -E     PUSHD_SILENT
1323       -F     NO_GLOB
1324       -G     NULL_GLOB
1325       -H     RM_STAR_SILENT
1326       -I     IGNORE_BRACES
1327       -J     AUTO_CD
1328       -K     NO_BANG_HIST
1329       -L     SUN_KEYBOARD_HACK
1330       -M     SINGLE_LINE_ZLE
1331       -N     AUTO_PUSHD
1332       -O     CORRECT_ALL
1333       -P     RC_EXPAND_PARAM
1334       -Q     PATH_DIRS
1335       -R     LONG_LIST_JOBS
1336       -S     REC_EXACT
1337       -T     CDABLE_VARS
1338       -U     MAIL_WARNING
1339       -V     NO_PROMPT_CR
1340       -W     AUTO_RESUME
1341       -X     LIST_TYPES
1342       -Y     MENU_COMPLETE
1343       -Z     ZLE
1344       -a     ALL_EXPORT
1345       -e     ERR_EXIT
1346       -f     NO_RCS
1347       -g     HIST_IGNORE_SPACE
1348       -h     HIST_IGNORE_DUPS
1349       -i     INTERACTIVE
1350       -k     INTERACTIVE_COMMENTS
1351       -l     LOGIN
1352       -m     MONITOR
1353       -n     NO_EXEC
1354       -p     PRIVILEGED
1355       -r     RESTRICTED
1356       -s     SHIN_STDIN
1357       -t     SINGLE_COMMAND
1358       -u     NO_UNSET
1359       -v     VERBOSE
1360       -w     CHASE_LINKS
1361       -x     XTRACE
1362       -y     SH_WORD_SPLIT
1363
1364   sh/ksh emulation set
1365       -C     NO_CLOBBER
1366       -T     TRAPS_ASYNC
1367       -X     MARK_DIRS
1368       -a     ALL_EXPORT
1369       -b     NOTIFY
1370       -e     ERR_EXIT
1371       -f     NO_GLOB
1372       -i     INTERACTIVE
1373       -l     LOGIN
1374       -m     MONITOR
1375       -n     NO_EXEC
1376       -p     PRIVILEGED
1377       -r     RESTRICTED
1378       -s     SHIN_STDIN
1379       -t     SINGLE_COMMAND
1380       -u     NO_UNSET
1381       -v     VERBOSE
1382       -x     XTRACE
1383
1384   Also note
1385       -A     Used by set for setting arrays
1386       -b     Used on the command line to specify end of option processing
1387       -c     Used on the command line to specify a single command
1388       -m     Used by setopt for pattern-matching option setting
1389       -o     Used in all places to allow use of long option names
1390       -s     Used by set to sort positional parameters
1391
1392
1393
1394zsh 4.3.11                     December 20, 2010                 ZSHOPTIONS(1)
Impressum