man pages section 1: User Commands

Exit Print View

Updated: July 2014

zshoptions (1)


zshoptions - zsh options


Please see following description for synopsis


User Commands                                       ZSHOPTIONS(1)

     zshoptions - zsh options

     Options  are primarily referred to by name.  These names are
     case insensitive and underscores are ignored.  For  example,
     `allexport' is equivalent to `A__lleXP_ort'.

     The  sense of an option name may be inverted by preceding it
     with `no', so `setopt No_Beep' is  equivalent  to  `unsetopt
     beep'.   This inversion can only be done once, so `nonobeep'
     is not a synonym for `beep'.  Similarly,  `tify'  is  not  a
     synonym for `nonotify' (the inversion of `notify').

     Some  options  also  have  one  or more single letter names.
     There are two sets of single letter  options:  one  used  by
     default,  and  another used to emulate sh/ksh (used when the
     SH_OPTION_LETTERS option is set).  The single letter options
     can  be  used  on  the  shell command line, or with the set,
     setopt and unsetopt builtins, as normal  Unix  options  pre-
     ceded by `-'.

     The  sense  of  the single letter options may be inverted by
     using `+' instead of `-'.  Some of the single letter  option
     names refer to an option being off, in which case the inver-
     sion of that name refers to the option being on.  For  exam-
     ple, `+n' is the short name of `exec', and `-n' is the short
     name of its inversion, `noexec'.

     In strings of single letter options supplied to the shell at
     startup,  trailing  whitespace  will be ignored; for example
     the string `-f    ' will be treated just as  `-f',  but  the
     string  `-f  i'  is  an error.  This is because many systems
     which implement the `#!' mechanism for  calling  scripts  do
     not strip trailing whitespace.

     In  the following list, options set by default in all emula-
     tions are marked <D>; those set by default only in csh, ksh,
     sh,  or  zsh  emulations  are  marked  <C>, <K>, <S>, <Z> as
     appropriate.  When listing options (by `setopt', `unsetopt',
     `set  -o' or `set +o'), those turned on by default appear in
     the list prefixed with `no'.  Hence (unless KSH_OPTION_PRINT
     is  set),  `setopt'  shows  all  options  whose settings are
     changed from the default.

  Changing Directories
     AUTO_CD (-J)
          If a command is issued that can't be executed as a nor-
          mal  command,  and  the command is the name of a direc-
          tory, perform the cd command to that directory.

zsh 5.0.5          Last change: January 5, 2014                 1

User Commands                                       ZSHOPTIONS(1)

     AUTO_PUSHD (-N)
          Make cd push  the  old  directory  onto  the  directory

          If  the argument to a cd command (or an implied cd with
          the AUTO_CD option set) is not a  directory,  and  does
          not begin with a slash, try to expand the expression as
          if it were preceded by a `~' (see the section `Filename

          When  changing to a directory containing a path segment
          `..' which would otherwise be treated as canceling  the
          previous  segment in the path (in other words, `foo/..'
          would be removed from the path, or if `..' is the first
          part  of the path, the last part of the current working
          directory would be removed), instead resolve  the  path
          to  the  physical directory.  This option is overridden
          by CHASE_LINKS.

          For example, suppose /foo/bar is a link to  the  direc-
          tory   /alt/rod.    Without   this   option   set,  `cd
          /foo/bar/..' changes to /foo; with it set,  it  changes
          to  /alt.  The same applies if the current directory is
          /foo/bar and `cd ..' is used.  Note that all other sym-
          bolic links in the path will also be resolved.

     CHASE_LINKS (-w)
          Resolve symbolic links to their true values when chang-
          ing directory.  This also has the effect of CHASE_DOTS,
          i.e.  a  `..' path segment will be treated as referring
          to the physical parent, even if the preceding path seg-
          ment is a symbolic link.

          Modifies  the behaviour of cd, chdir and pushd commands
          to make them more compatible with the  POSIX  standard.
          The behaviour with the option unset is described in the
          documentation for the cd builtin in zshbuiltins(1).  If
          the option is set, the shell does not test for directo-
          ries beneath the local directory (`.') until after  all
          directories in cdpath have been tested.

          Also,  if the option is set, the conditions under which
          the shell prints the new directory after changing to it
          are  modified.   It is no longer restricted to interac-
          tive shells (although printing of the  directory  stack
          with pushd is still limited to interactive shells); and
          any use of a component of CDPATH, including a  `.'  but
          excluding  an empty component that is otherwise treated
          as `.', causes the directory to be printed.

zsh 5.0.5          Last change: January 5, 2014                 2

User Commands                                       ZSHOPTIONS(1)

          Don't push multiple copies of the same  directory  onto
          the directory stack.

          Exchanges  the meanings of `+' and `-' when used with a
          number to specify a directory in the stack.

          Do not print the directory stack after pushd or popd.

          Have pushd with no arguments act like `pushd $HOME'.

          If unset, key functions that list  completions  try  to
          return  to the last prompt if given a numeric argument.
          If set these functions try to return to the last prompt
          if given no numeric argument.

          If  a  completion is performed with the cursor within a
          word, and a full completion is inserted, the cursor  is
          moved  to  the end of the word.  That is, the cursor is
          moved to the end of the word if either a  single  match
          is inserted or menu completion is performed.

     AUTO_LIST (-9) <D>
          Automatically  list choices on an ambiguous completion.

     AUTO_MENU <D>
          Automatically use menu completion after the second con-
          secutive  request for completion, for example by press-
          ing the tab key repeatedly. This option  is  overridden
          by MENU_COMPLETE.

          Any  parameter  that  is  set to the absolute name of a
          directory immediately becomes a name  for  that  direc-
          tory,  that will be used by the `%~' and related prompt
          sequences, and will be  available  when  completion  is
          performed on a word starting with `~'.  (Otherwise, the
          parameter must be used in the form `~param' first.)

          If a parameter name was completed and a following char-
          acter  (normally  a  space) automatically inserted, and
          the next character typed is one of those that  have  to
          come directly after the name (like `}', `:', etc.), the
          automatically added character is deleted, so  that  the
          character  typed  comes immediately after the parameter

zsh 5.0.5          Last change: January 5, 2014                 3

User Commands                                       ZSHOPTIONS(1)

          name.  Completion in a brace expansion is affected sim-
          ilarly:  the  added  character  is a `,', which will be
          removed if `}' is typed next.

          If a parameter is completed whose content is  the  name
          of  a directory, then add a trailing slash instead of a

          When the last character resulting from a completion  is
          a  slash  and the next character typed is a word delim-
          iter, a slash, or a character that ends a command (such
          as a semicolon or an ampersand), remove the slash.

          On  an ambiguous completion, automatically list choices
          when the completion function is called twice in succes-
          sion.   This takes precedence over AUTO_LIST.  The set-
          ting of LIST_AMBIGUOUS is respected.  If  AUTO_MENU  is
          set,  the menu behaviour will then start with the third
          press.  Note that this will  not  work  with  MENU_COM-
          PLETE,  since  repeated  completion  calls  immediately
          cycle through the list in that case.

          Prevents aliases on the command line from being  inter-
          nally  substituted before completion is attempted.  The
          effect is to make the alias a distinct command for com-
          pletion purposes.

          If  unset,  the cursor is set to the end of the word if
          completion is started. Otherwise  it  stays  there  and
          completion is done from both ends.

          When the current word has a glob pattern, do not insert
          all the words resulting from the expansion but generate
          matches  as  for completion and cycle through them like
          MENU_COMPLETE. The matches are generated as  if  a  `*'
          was  added  to  the end of the word, or inserted at the
          cursor when COMPLETE_IN_WORD  is  set.   This  actually
          uses  pattern  matching,  not globbing, so it works not
          only for files but for any completion, such as options,
          user names, etc.

          Note  that  when  the pattern matcher is used, matching
          control  (for  example,  case-insensitive  or  anchored
          matching) cannot be used.  This limitation only applies
          when the current word contains a pattern; simply  turn-
          ing  on  the  GLOB_COMPLETE  option  does not have this

zsh 5.0.5          Last change: January 5, 2014                 4

User Commands                                       ZSHOPTIONS(1)


          Whenever a command completion or spelling correction is
          attempted,  make sure the entire command path is hashed
          first.  This makes  the  first  completion  slower  but
          avoids false reports of spelling errors.

          This  option  works when AUTO_LIST or BASH_AUTO_LIST is
          also set.  If there is an unambiguous prefix to  insert
          on  the command line, that is done without a completion
          list being displayed; in other words, auto-listing  be-
          haviour   only   takes  place  when  nothing  would  be
          inserted.  In the case of  BASH_AUTO_LIST,  this  means
          that  the list will be delayed to the third call of the

     LIST_BEEP <D>
          Beep on an ambiguous completion.  More accurately, this
          forces  the completion widgets to return status 1 on an
          ambiguous completion, which causes the shell to beep if
          the  option  BEEP  is also set; this may be modified if
          completion is called from a user-defined widget.

          Try to make the completion list smaller (occupying less
          lines)  by printing the matches in columns with differ-
          ent widths.

          Lay out the matches in completion lists sorted horizon-
          tally, that is, the second match is to the right of the
          first one, not under it as usual.

     LIST_TYPES (-X) <D>
          When listing files that are possible completions,  show
          the type of each file with a trailing identifying mark.

          On an ambiguous completion, instead of  listing  possi-
          bilities  or  beeping,  insert  the first match immedi-
          ately.  Then when completion is requested again, remove
          the first match and insert the second match, etc.  When
          there are no more matches, go back  to  the  first  one
          again.   reverse-menu-complete  may  be  used  to  loop
          through the list in the other  direction.  This  option
          overrides AUTO_MENU.

     REC_EXACT (-S)
          In completion, recognize exact matches even if they are

zsh 5.0.5          Last change: January 5, 2014                 5

User Commands                                       ZSHOPTIONS(1)

  Expansion and Globbing
     BAD_PATTERN (+2) <C> <Z>
          If a pattern for filename generation is  badly  formed,
          print  an error message.  (If this option is unset, the
          pattern will be left unchanged.)

          In a glob pattern, treat a trailing set of  parentheses
          as  a qualifier list, if it contains no `|', `(' or (if
          special) `~' characters.   See  the  section  `Filename

          Expand  expressions in braces which would not otherwise
          undergo brace expansion to a lexically ordered list  of
          all the characters.  See the section `Brace Expansion'.

     CASE_GLOB <D>
          Make globbing (filename generation) sensitive to  case.
          Note  that  other uses of patterns are always sensitive
          to case.  If the option is unset, the presence  of  any
          character  which is special to filename generation will
          cause case-insensitive matching.  For  example,  cvs(/)
          can  match  the  directory CVS owing to the presence of
          the globbing flag (unless the option BARE_GLOB_QUAL  is

          Make  regular  expressions  using  the zsh/regex module
          (including matches with =~) sensitive to case.

          If a pattern for filename generation  has  no  matches,
          delete  the  pattern  from  the  argument  list; do not
          report an error unless all the patterns  in  a  command
          have no matches.  Overrides NOMATCH.

     EQUALS <Z>
          Perform  = filename expansion.  (See the section `File-
          name Expansion'.)

          Treat the `#', `~' and `^' characters as part  of  pat-
          terns   for  filename  generation,  etc.   (An  initial
          unquoted `~' always  produces  named  directory  expan-

          Constants  in  arithmetic evaluation will be treated as
          floating point even without the use of a decimal point.
          Integers in any base will be converted.

zsh 5.0.5          Last change: January 5, 2014                 6

User Commands                                       ZSHOPTIONS(1)

     GLOB (+F, ksh: +f) <D>
          Perform  filename generation (globbing).  (See the sec-
          tion `Filename Generation'.)

          If this option is set, filename  generation  (globbing)
          is performed on the right hand side of scalar parameter
          assignments of the form `name=pattern  (e.g.  `foo=*').
          If the result has more than one word the parameter will
          become an array with those  words  as  arguments.  This
          option  is  provided  for backwards compatibility only:
          globbing is always performed on the right hand side  of
          array  assignments  of  the  form  `name=(value)' (e.g.
          `foo=(*)') and this form is  recommended  for  clarity;
          with  this  option  set,  it is not possible to predict
          whether the result will be an array or a scalar.

     GLOB_DOTS (-4)
          Do not require a  leading  `.'  in  a  filename  to  be
          matched explicitly.

     GLOB_SUBST <C> <K> <S>
          Treat any characters resulting from parameter expansion
          as being eligible for file expansion and filename  gen-
          eration, and any characters resulting from command sub-
          stitution as being eligible  for  filename  generation.
          Braces  (and  commas in between) do not become eligible
          for expansion.

          Substitutions using the :s and :& history modifiers are
          performed  with  pattern  matching  instead  of  string
          matching.  This occurs wherever history  modifiers  are
          valid,  including  glob qualifiers and parameters.  See
          the section Modifiers in zshexpn(1).

          Do not perform brace expansion.  For historical reasons
          this     also    includes    the    effect    of    the
          IGNORE_CLOSE_BRACES option.

          When neither this option nor IGNORE_BRACES  is  set,  a
          sole close brace character `}' is syntactically signif-
          icant at any point on a command  line.   This  has  the
          effect that no semicolon or newline is necessary before
          the brace terminating a function or current shell  con-
          struct.   When either option is set, a closing brace is
          syntactically significant  only  in  command  position.
          Unlike  IGNORE_BRACES,  this  option  does  not disable
          brace expansion.

zsh 5.0.5          Last change: January 5, 2014                 7

User Commands                                       ZSHOPTIONS(1)

          For example, with both options unset a function may  be
          defined in the following fashion:

               args() { echo $# }

          while  if  either option is set, this does not work and
          something equivalent to the following is required:

               args() { echo $#; }

     KSH_GLOB <K>
          In pattern matching, the interpretation of  parentheses
          is  affected  by a preceding `@', `*', `+', `?' or `!'.
          See the section `Filename Generation'.

          All unquoted arguments of  the  form  `anything=expres-
          sion'  appearing  after  the command name have filename
          expansion (that is, where expression has a leading  `~'
          or `=') performed on expression as if it were a parame-
          ter assignment.  The argument is not otherwise  treated
          specially;  it  is  passed  to  the command as a single
          argument, and not used as an actual  parameter  assign-
          ment.   For  example,  in  echo  foo=~/bar:~/rod,  both
          occurrences of ~ would be  replaced.   Note  that  this
          happens anyway with typeset and similar statements.

          This  option  respects  the  setting of the KSH_TYPESET
          option.  In other words, if both options are in effect,
          arguments  looking  like  assignments  will not undergo
          word splitting.

     MARK_DIRS (-8, ksh: -X)
          Append a trailing `/' to all directory names  resulting
          from filename generation (globbing).

     MULTIBYTE <C> <K> <Z>
          Respect  multibyte  characters  when  found in strings.
          When this option is set, strings are examined using the
          system library to determine how many bytes form a char-
          acter, depending on the current locale.   This  affects
          the  way  characters  are  counted in pattern matching,
          parameter values and various delimiters.

          The option is on by default if the shell  was  compiled
          with  MULTIBYTE_SUPPORT  except in sh emulation; other-
          wise it is off by default and has no effect  if  turned
          on.   The mode is off in sh emulation for compatibility
          but for interactive use may need to be turned on if the
          terminal interprets multibyte characters.

zsh 5.0.5          Last change: January 5, 2014                 8

User Commands                                       ZSHOPTIONS(1)

          If the option is off a single byte is always treated as
          a single character.  This setting  is  designed  purely
          for  examining  strings  known  to contain raw bytes or
          other values that may not be characters in the  current
          locale.  It is not necessary to unset the option merely
          because the character set for the current  locale  does
          not contain multibyte characters.

          The  option  does not affect the shell's editor,  which
          always uses the locale to determine  multibyte  charac-
          ters.   This  is because the character set displayed by
          the terminal emulator is independent of shell settings.

     NOMATCH (+3) <C> <Z>
          If  a  pattern  for filename generation has no matches,
          print an error, instead of leaving it unchanged in  the
          argument  list.  This also applies to file expansion of
          an initial `~' or `='.

     NULL_GLOB (-G)
          If a pattern for filename generation  has  no  matches,
          delete  the  pattern  from the argument list instead of
          reporting an error.  Overrides NOMATCH.

          If numeric filenames are matched by a filename  genera-
          tion  pattern,  sort  the  filenames numerically rather
          than lexicographically.

          Array expansions of the form `foo${xx}bar',  where  the
          parameter  xx  is  set to (a b c), are substituted with
          `fooabar foobbar foocbar' instead of the default  `fooa
          b cbar'.  Note that an empty array will therefore cause
          all arguments to be removed.

          If set, regular expression matching with the =~  opera-
          tor  will  use Perl-Compatible Regular Expressions from
          the PCRE library, if available.  If  not  set,  regular
          expressions  will  use  the extended regexp syntax pro-
          vided by the system libraries.

     SH_GLOB <K> <S>
          Disables the special meaning of `(', `|', `)'  and  '<'
          for  globbing  the result of parameter and command sub-
          stitutions, and in some other places  where  the  shell
          accepts  patterns.   If  SH_GLOB is set but KSH_GLOB is
          not, the shell allows the  interpretation  of  subshell
          expressions enclosed in parentheses in some cases where
          there is no space before the opening parenthesis,  e.g.
          !(true)  is  interpreted as if there were a space after

zsh 5.0.5          Last change: January 5, 2014                 9

User Commands                                       ZSHOPTIONS(1)

          the !.  This option is set by default if zsh is invoked
          as sh or ksh.

     UNSET (+u, ksh: +u) <K> <S> <Z>
          Treat  unset parameters as if they were empty when sub-
          stituting.  Otherwise they are treated as an error.

          Print a warning message when a global parameter is cre-
          ated  in a function by an assignment.  This often indi-
          cates that a parameter has not been declared local when
          it  should  have  been.  Parameters explicitly declared
          global from within a function using typeset -g  do  not
          cause  a warning.  Note that there is no warning when a
          local parameter is assigned to in  a  nested  function,
          which may also indicate an error.

          If  this is set, zsh sessions will append their history
          list to the history file, rather than replace it. Thus,
          multiple  parallel  zsh  sessions will all have the new
          entries from their history lists added to  the  history
          file, in the order that they exit.  The file will still
          be periodically re-written to trim it when  the  number
          of lines grows 20% beyond the value specified by $SAVE-
          HIST (see also the HIST_SAVE_BY_COPY option).

     BANG_HIST (+K) <C> <Z>
          Perform textual history expansion, csh-style,  treating
          the character `!' specially.

          Save  each  command's  beginning  timestamp (in seconds
          since the epoch) and the duration (in seconds)  to  the
          history file.  The format of this prefixed data is:

          `: <beginning time>:<elapsed seconds>;<command>'.

          Add  `|'  to  output redirections in the history.  This
          allows history references to clobber  files  even  when
          CLOBBER is unset.

     HIST_BEEP <D>
          Beep  when an attempt is made to access a history entry
          which isn't there.

          If the internal history needs to be trimmed to add  the
          current  command  line,  setting this option will cause
          the oldest history event that has  a  duplicate  to  be

zsh 5.0.5          Last change: January 5, 2014                10

User Commands                                       ZSHOPTIONS(1)

          lost  before  losing a unique event from the list.  You
          should be sure to set the value of HISTSIZE to a larger
          number than SAVEHIST in order to give you some room for
          the  duplicated  events,  otherwise  this  option  will
          behave  just like HIST_IGNORE_ALL_DUPS once the history
          fills up with unique events.

          When writing out the history file, by default zsh  uses
          ad-hoc  file locking to avoid known problems with lock-
          ing on some operating systems.  With this option  lock-
          ing  is done by means of the system's fcntl call, where
          this method is available.  On recent operating  systems
          this  may  provide  better  performance,  in particular
          avoiding history corruption when files  are  stored  on

          When  searching for history entries in the line editor,
          do not display duplicates of a line  previously  found,
          even if the duplicates are not contiguous.

          If  a  new command line being added to the history list
          duplicates an older one, the older command  is  removed
          from the list (even if it is not the previous event).

          Do  not  enter  command  lines into the history list if
          they are duplicates of the previous event.

          Remove command lines from the  history  list  when  the
          first  character on the line is a space, or when one of
          the expanded aliases contains a  leading  space.   Only
          normal aliases (not global or suffix aliases) have this
          behaviour.  Note that the command lingers in the inter-
          nal history until the next command is entered before it
          vanishes, allowing you to briefly  reuse  or  edit  the
          line.  If you want to make it vanish right away without
          entering  another  command,  type  a  space  and  press

          By default, shell history that is read in from files is
          split into words on all white space.  This  means  that
          arguments with quoted whitespace are not correctly han-
          dled, with the consequence that references to words  in
          history  lines  that  have been read from a file may be
          inaccurate.  When this option is  set,  words  read  in
          from a history file are divided up in a similar fashion
          to normal shell command line handling.   Although  this

zsh 5.0.5          Last change: January 5, 2014                11

User Commands                                       ZSHOPTIONS(1)

          produces  more  accurately delimited words, if the size
          of the history file is large this can be  slow.   Trial
          and error is necessary to decide.

          Remove  function  definitions  from  the  history list.
          Note that the function lingers in the internal  history
          until  the  next command is entered before it vanishes,
          allowing you to briefly reuse or edit the definition.

          Remove the history (fc -l)  command  from  the  history
          list  when  invoked.   Note that the command lingers in
          the internal history until the next command is  entered
          before  it  vanishes,  allowing you to briefly reuse or
          edit the line.

          Remove superfluous blanks from each command line  being
          added to the history list.

          When  the history file is re-written, we normally write
          out a copy of the file  named  $  and  then
          rename it over the old one.  However, if this option is
          unset, we instead truncate the  old  history  file  and
          write out the new version in-place.  If one of the his-
          tory-appending options is enabled, this option only has
          an  effect  when  the enlarged history file needs to be
          re-written to trim it down to size.  Disable this  only
          if  you have special needs, as doing so makes it possi-
          ble to lose history entries  if  zsh  gets  interrupted
          during the save.

          When  writing  out a copy of the history file, zsh pre-
          serves the old file's permissions  and  group  informa-
          tion,  but  will  refuse  to write out a new file if it
          would change the history file's owner.

          When writing out the history file, older commands  that
          duplicate newer ones are omitted.

          Whenever the user enters a line with history expansion,
          don't execute the line directly; instead, perform  his-
          tory  expansion  and  reload  the line into the editing

          This options works like APPEND_HISTORY except that  new
          history  lines are added to the $HISTFILE incrementally

zsh 5.0.5          Last change: January 5, 2014                12

User Commands                                       ZSHOPTIONS(1)

          (as soon as they  are  entered),  rather  than  waiting
          until the shell exits.  The file will still be periodi-
          cally re-written to trim it when the  number  of  lines
          grows  20% beyond the value specified by $SAVEHIST (see
          also the HIST_SAVE_BY_COPY option).


          This option both imports new commands from the  history
          file,  and  also  causes  your  typed  commands  to  be
          appended to the history file (the latter is like speci-
          fying  INC_APPEND_HISTORY).  The history lines are also
          output  with  timestamps  ala  EXTENDED_HISTORY  (which
          makes  it  easier  to  find  the spot where we left off
          reading the file after it gets re-written).

          By  default,  history  movement  commands   visit   the
          imported  lines as well as the local lines, but you can
          toggle this on and off with the  set-local-history  zle
          binding.   It  is  also possible to create a zle widget
          that will make some commands ignore imported  commands,
          and some include them.

          If  you  find that you want more control over when com-
          mands get imported, you may wish to turn  SHARE_HISTORY
          off,  INC_APPEND_HISTORY  on,  and then manually import
          commands whenever you need them using `fc -RI'.

     ALL_EXPORT (-a, ksh: -a)
          All parameters subsequently defined  are  automatically

          If  this  option  is  set,  passing  the -x flag to the
          builtins declare, float, integer, readonly and  typeset
          (but  not  local)  will  also  set  the -g flag;  hence
          parameters exported to the environment will not be made
          local  to  the  enclosing  function,  unless  they were
          already or the flag +g is  given  explicitly.   If  the
          option is unset, exported parameters will be made local
          in just the same way as any other parameter.

          This option is set by default for backward  compatibil-
          ity; it is not recommended that its behaviour be relied
          upon.  Note that the builtin export  always  sets  both
          the  -x  and  -g  flags,  and  hence its effect extends
          beyond the scope of the enclosing function; this is the
          most portable way to achieve this behaviour.

     GLOBAL_RCS (-d) <D>
          If   this   option   is   unset,   the   startup  files

zsh 5.0.5          Last change: January 5, 2014                13

User Commands                                       ZSHOPTIONS(1)

          /etc/zprofile, /etc/zshrc, /etc/zlogin and /etc/zlogout
          will  not be run.  It can be disabled and re-enabled at
          any time, including inside local startup files (.zshrc,

     RCS (+f) <D>
          After  /etc/zshenv  is  sourced  on startup, source the
          .zshenv, /etc/zprofile, .zprofile, /etc/zshrc,  .zshrc,
          /etc/zlogin,  .zlogin, and .zlogout files, as described
          in the section `Files'.  If this option is  unset,  the
          /etc/zshenv  file is still sourced, but any of the oth-
          ers will not be; it can be set at any time  to  prevent
          the remaining startup files after the currently execut-
          ing one from being sourced.

     ALIASES <D>
          Expand aliases.

     CLOBBER (+C, ksh: +C) <D>
          Allows `>' redirection to truncate existing files,  and
          `>>'  to  create files.  Otherwise `>!' or `>|' must be
          used to truncate a file, and `>>!' or `>>|' to create a

     CORRECT (-0)
          Try  to  correct  the spelling of commands.  Note that,
          when the HASH_LIST_ALL option is not set or  when  some
          directories  in  the  path  are  not readable, this may
          falsely report spelling errors the first time some com-
          mands are used.

          The  shell variable CORRECT_IGNORE may be set to a pat-
          tern to match words that will never be offered as  cor-

          Try to correct the spelling of all arguments in a line.

          Use the Dvorak keyboard instead of the standard  qwerty
          keyboard as a basis for examining spelling mistakes for
          the CORRECT and CORRECT_ALL options and the  spell-word
          editor command.

          If  this  option  is  unset,  output  flow  control via
          start/stop characters (usually assigned  to  ^S/^Q)  is
          disabled in the shell's editor.

     IGNORE_EOF (-7)
          Do not exit on end-of-file.  Require the use of exit or

zsh 5.0.5          Last change: January 5, 2014                14

User Commands                                       ZSHOPTIONS(1)

          logout instead.  However,  ten  consecutive  EOFs  will
          cause  the  shell  to  exit  anyway, to avoid the shell
          hanging if its tty goes away.

          Also, if this option is set and the Zsh Line Editor  is
          used,  widgets  implemented  by  shell functions can be
          bound to EOF (normally Control-D) without printing  the
          normal  warning  message.   This  works only for normal
          widgets, not for completion widgets.

          Allow comments even in interactive shells.

     HASH_CMDS <D>
          Note the location of each command the first time it  is
          executed.   Subsequent  invocations of the same command
          will use the saved location, avoiding  a  path  search.
          If  this  option  is  unset, no path hashing is done at
          all.  However, when  CORRECT  is  set,  commands  whose
          names  do  not  appear in the functions or aliases hash
          tables are hashed in order to avoid reporting  them  as
          spelling errors.

     HASH_DIRS <D>
          Whenever  a  command name is hashed, hash the directory
          containing it, as well as all  directories  that  occur
          earlier   in  the  path.   Has  no  effect  if  neither
          HASH_CMDS nor CORRECT is set.

          When hashing commands because of  HASH_COMMANDS,  check
          that  the  file to be hashed is actually an executable.
          This option is unset by default as if the path contains
          a  large number of commands, or consists of many remote
          files, the additional  tests  can  take  a  long  time.
          Trial  and  error  is  needed to show if this option is

          Print a  warning  message  if  a  mail  file  has  been
          accessed since the shell last checked.

     PATH_DIRS (-Q)
          Perform  a  path  search  even  on  command  names with
          slashes in them.  Thus if `/usr/local/bin'  is  in  the
          user's  path, and he or she types `X11/xinit', the com-
          mand  `/usr/local/bin/X11/xinit'   will   be   executed
          (assuming  it  exists).   Commands explicitly beginning
          with `/', `./' or `../' are not  subject  to  the  path
          search.  This also applies to the `.' builtin.

zsh 5.0.5          Last change: January 5, 2014                15

User Commands                                       ZSHOPTIONS(1)

          Note  that  subdirectories of the current directory are
          always searched for executables specified in this form.
          This  takes  place  before any search indicated by this
          option, and regardless of whether `.'  or  the  current
          directory appear in the command search path.

     PATH_SCRIPT <K> <S>
          If this option is not set, a script passed as the first
          non-option argument to the shell must contain the  name
          of  the  file  to open.  If this option is set, and the
          script does not specify a directory path, the script is
          looked  for first in the current directory, then in the
          command path.  See the section INVOCATION in zsh(1).

          Print eight  bit  characters  literally  in  completion
          lists,  etc.  This option is not necessary if your sys-
          tem correctly returns the  printability  of  eight  bit
          characters (see ctype(3)).

          Print  the  exit  value  of programs with non-zero exit
          status.  This is only available at the command line  in
          interactive shells.

          Allow  the  character sequence `''' to signify a single
          quote within singly quoted strings.  Note this does not
          apply  in quoted strings using the format $'...', where
          a backslashed single quote can be used.

     RM_STAR_SILENT (-H) <K> <S>
          Do not query the user before executing `rm  *'  or  `rm

          If  querying  the  user  before executing `rm *' or `rm
          path/*', first wait ten  seconds  and  ignore  anything
          typed in that time.  This avoids the problem of reflex-
          ively answering `yes' to  the  query  when  one  didn't
          really  mean  it.   The  wait  and  query can always be
          avoided by expanding the `*' in ZLE (with tab).

     SHORT_LOOPS <C> <Z>
          Allow the short forms of for, repeat, select,  if,  and
          function constructs.

          If  a  line ends with a backquote, and there are an odd
          number of backquotes on the line, ignore  the  trailing
          backquote.   This is useful on some keyboards where the
          return key is too small, and  the  backquote  key  lies

zsh 5.0.5          Last change: January 5, 2014                16

User Commands                                       ZSHOPTIONS(1)

          annoyingly close to it.  As an alternative the variable
          KEYBOARD_HACK lets  you  choose  the  character  to  be

  Job Control
          With  this  option  set,  stopped jobs that are removed
          from the job table with the disown builtin command  are
          automatically  sent a CONT signal to make them running.

          Treat single word simple commands  without  redirection
          as candidates for resumption of an existing job.

     BG_NICE (-6) <C> <Z>
          Run  all  background  jobs  at  a lower priority.  This
          option is set by default.

          Report the status  of  background  and  suspended  jobs
          before  exiting  a  shell  with  job  control; a second
          attempt to exit the shell will succeed.   NO_CHECK_JOBS
          is best used only in combination with NO_HUP, else such
          jobs will be killed automatically.

          The check is omitted if the commands run from the  pre-
          vious  command line included a `jobs' command, since it
          is assumed the user is aware that there are  background
          or  suspended  jobs.   A `jobs' command run from one of
          the hook functions defined in the section SPECIAL FUNC-
          TIONS in zshmisc(1) is not counted for this purpose.

     HUP <Z>
          Send  the  HUP  signal  to  running jobs when the shell

          List jobs in the long format by default.

     MONITOR (-m, ksh: -m)
          Allow job  control.   Set  by  default  in  interactive

     NOTIFY (-5, ksh: -b) <Z>
          Report  the  status  of  background  jobs  immediately,
          rather  than  waiting  until  just  before  printing  a

     POSIX_JOBS <K> <S>
          This  option  makes job control more compliant with the
          POSIX standard.

zsh 5.0.5          Last change: January 5, 2014                17

User Commands                                       ZSHOPTIONS(1)

          When the option is not set, the MONITOR option is unset
          on entry to subshells, so that job control is no longer
          active.  When the option is set, the MONITOR option and
          job  control  remain  active  in the subshell, but note
          that the subshell has no access to jobs in  the  parent

          When  the option is not set, jobs put in the background
          or foreground with bg or fg are displayed with the same
          information  that  would be reported by jobs.  When the
          option is set, only the text is  printed.   The  output
          from jobs itself is not affected by the option.

          When  the  option  is not set, job information from the
          parent shell is saved for output within a subshell (for
          example,  within  a pipeline).  When the option is set,
          the output of jobs is empty  until  a  job  is  started
          within the subshell.

          When  the option is set, it becomes possible to use the
          wait builtin to wait for the last job  started  in  the
          background  (as  given  by  $!)  even  if  that job has
          already exited.  This  works  even  if  the  option  is
          turned  on  temporarily  around  the  use  of  the wait

          If set, `!' is treated specially in  prompt  expansion.
          See EXPANSION OF PROMPT SEQUENCES in zshmisc(1).

     PROMPT_CR (+V) <D>
          Print  a  carriage return just before printing a prompt
          in  the  line  editor.   This  is  on  by  default   as
          multi-line editing is only possible if the editor knows
          where the start of the line appears.

     PROMPT_SP <D>
          Attempt to preserve a partial line (i.e.  a  line  that
          did  not  end  with  a newline) that would otherwise be
          covered up by the command prompt due to  the  PROMPT_CR
          option.   This  works by outputting some cursor-control
          characters, including a series of spaces,  that  should
          make  the terminal wrap to the next line when a partial
          line is present (note that this is only  successful  if
          your terminal has automatic margins, which is typical).

          When a partial line is preserved, by default  you  will
          see an inverse+bold character at the end of the partial
          line:  a "%" for a normal user or a "#" for  root.   If
          set, the shell parameter PROMPT_EOL_MARK can be used to
          customize how the end of partial lines are shown.

zsh 5.0.5          Last change: January 5, 2014                18

User Commands                                       ZSHOPTIONS(1)

          NOTE: if the PROMPT_CR option is not set, enabling this
          option  will  have  no  effect.   This  option is on by

          If set, `%' is treated specially in  prompt  expansion.
          See EXPANSION OF PROMPT SEQUENCES in zshmisc(1).

          If  set,  parameter expansion, command substitution and
          arithmetic expansion are performed in prompts.  Substi-
          tutions  within  prompts do not affect the command sta-

          Remove any right prompt from display when  accepting  a
          command  line.   This may be useful with terminals with
          other cut/paste methods.

  Scripts and Functions
          Output hexadecimal numbers in the  standard  C  format,
          for  example  `0xFF'  instead of the usual `16#FF'.  If
          the option OCTAL_ZEROES is  also  set  (it  is  not  by
          default),  octal  numbers will be treated similarly and
          hence appear as `077' instead of `8#77'.   This  option
          has  no effect on the choice of the output base, nor on
          the output of bases other than hexadecimal  and  octal.
          Note  that  these  formats  will be understood on input
          irrespective of the setting of C_BASES.

          This alters the precedence of arithmetic  operators  to
          be  more  like  C  and other programming languages; the
          section ARITHMETIC  EVALUATION  in  zshmisc(1)  has  an
          explicit list.

          Run the DEBUG trap before each command; otherwise it is
          run after each command.  Setting this option mimics the
          behaviour  of  ksh 93; with the option unset the behav-
          iour is that of ksh 88.

     ERR_EXIT (-e, ksh: -e)
          If a command has a non-zero exit  status,  execute  the
          ZERR  trap,  if  set, and exit.  This is disabled while
          running initialization scripts.

          The behaviour is also disabled inside DEBUG traps.   In
          this  case the option is handled specially: it is unset
          on entry to the trap.  If the  option  DEBUG_BEFORE_CMD
          is set, as it is by default, and the option ERR_EXIT is

zsh 5.0.5          Last change: January 5, 2014                19

User Commands                                       ZSHOPTIONS(1)

          found to have been set on exit, then  the  command  for
          which the DEBUG trap is being executed is skipped.  The
          option is restored after the trap exits.

          Exiting due to ERR_EXIT has certain  interactions  with
          asynchronous  jobs noted in the section JOBS in in zsh-

          If a command has a non-zero exit status, return immedi-
          ately  from the enclosing function.  The logic is iden-
          tical to that for ERR_EXIT,  except  that  an  implicit
          return  statement is executed instead of an exit.  This
          will trigger an  exit  at  the  outermost  level  of  a
          non-interactive script.

          If set, line numbers of expressions evaluated using the
          builtin eval are tracked separately  of  the  enclosing
          environment.  This applies both to the parameter LINENO
          and the line number output by the prompt escape %i.  If
          the option is set, the prompt escape %N will output the
          string `(eval)' instead of the script or function  name
          as  an  indication.   (The two prompt escapes are typi-
          cally used in the parameter PS4 to be output  when  the
          option  XTRACE  is  set.)  If EVAL_LINENO is unset, the
          line number of the surrounding script  or  function  is
          retained during the evaluation.

     EXEC (+n, ksh: +n) <D>
          Do execute commands.  Without this option, commands are
          read and checked for syntax errors, but  not  executed.
          This  option  cannot  be  turned  off in an interactive
          shell, except when `-n' is supplied  to  the  shell  at

          When  executing  a shell function or sourcing a script,
          set $0 temporarily to the name of the  function/script.

          If  this  option  is  set at the point of return from a
          shell function, most options (including this one) which
          were  in force upon entry to the function are restored;
          options  that  are  not  restored  are  PRIVILEGED  and
          RESTRICTED.  Otherwise, only this option and the XTRACE
          and PRINT_EXIT_VALUE options are  restored.   Hence  if
          this  is explicitly unset by a shell function the other
          options in force at the point of return will remain so.
          A  shell  function  can  also  guarantee itself a known
          shell configuration with a formulation like `emulate -L
          zsh'; the -L activates LOCAL_OPTIONS.

zsh 5.0.5          Last change: January 5, 2014                20

User Commands                                       ZSHOPTIONS(1)

          If  this  option  is  set at the point of return from a
          shell function, the state of pattern disables,  as  set
          with  the  builtin command `disable -p', is restored to
          what it was when the function was entered.  The  behav-
          iour  of  this  option  is  similar  to  the  effect of
          LOCAL_OPTIONS on options; hence  `emulate  -L  sh'  (or
          indeed  any  other  emulation with the -L option) acti-
          vates LOCAL_PATTERNS.

          If this option is set when a signal trap is set  inside
          a  function,  then  the previous status of the trap for
          that signal will be restored when the  function  exits.
          Note that this option must be set prior to altering the
          trap behaviour in a function; unlike LOCAL_OPTIONS, the
          value  on  exit  from the function is irrelevant.  How-
          ever, it does not need to be set before any global trap
          for  that  to be correctly restored by a function.  For

               unsetopt localtraps
               trap - INT
               fn() { setopt localtraps; trap '' INT; sleep 3; }

          will restore normal handling of SIGINT after the  func-
          tion exits.

          Allow  definitions of multiple functions at once in the
          form `fn1 fn2...()'; if the option  is  not  set,  this
          causes a parse error.  Definition of multiple functions
          with the function keyword is always allowed.   Multiple
          function  definitions  are not often used and can cause
          obscure errors.

     MULTIOS <Z>
          Perform implicit tees or cats  when  multiple  redirec-
          tions are attempted (see the section `Redirection').

          Interpret  any  integer  constant beginning with a 0 as
          octal, per  IEEE  Std  1003.2-1992  (ISO  9945-2:1993).
          This  is  not  enabled by default as it causes problems
          with parsing of, for example,  date  and  time  strings
          with leading zeroes.

          Sequences  of  digits indicating a numeric base such as
          the `08' component in `08#77' are always interpreted as
          decimal, regardless of leading zeroes.


zsh 5.0.5          Last change: January 5, 2014                21

User Commands                                       ZSHOPTIONS(1)

          By  default,  when  a  pipeline  exits  the exit status
          recorded by the shell and returned by the  shell  vari-
          able  $?  reflects  that  of the rightmost element of a
          pipeline.  If this  option  is  set,  the  exit  status
          instead reflects the status of the rightmost element of
          the pipeline that was non-zero, or zero if all elements
          exited with zero status.

          If   set,  zsh  will  print  an  informational  message
          announcing the name of each file it loads.  The  format
          of the output is similar to that for the XTRACE option,
          with the message <sourcetrace>.  A file may  be  loaded
          by  the  shell  itself when it starts up and shuts down
          (Startup/Shutdown Files) or by the use of the  `source'
          and `dot' builtin commands.

          If this is unset, executing any of the `typeset' family
          of commands with no options and a  list  of  parameters
          that  have  no  values to be assigned but already exist
          will display the value of the parameter.  If the option
          is  set,  they  will  only be shown when parameters are
          selected with the `-m'  option.   The  option  `-p'  is
          available whether or not the option is set.

     VERBOSE (-v, ksh: -v)
          Print shell input lines as they are read.

     XTRACE (-x, ksh: -x)
          Print  commands  and  their  arguments as they are exe-
          cuted.  The output is proceded by the  value  of  $PS4,
          formatted  as  described  in  the  section EXPANSION OF
          PROMPT SEQUENCES in zshmisc(1).

  Shell Emulation
          When set, matches performed with the =~  operator  will
          set  the  BASH_REMATCH  array  variable, instead of the
          default MATCH and match variables.  The  first  element
          of  the  BASH_REMATCH  array  will  contain  the entire
          matched  text  and  subsequent  elements  will  contain
          extracted  substrings.   This  option  makes more sense
          when KSH_ARRAYS is also set, so that the entire matched
          portion is stored at index 0 and the first substring is
          at index 1.  Without this option,  the  MATCH  variable
          contains  the  entire  matched text and the match array
          variable contains substrings.

     BSD_ECHO <S>
          Make the echo builtin compatible with the  BSD  echo(1)
          command.  This disables backslashed escape sequences in

zsh 5.0.5          Last change: January 5, 2014                22

User Commands                                       ZSHOPTIONS(1)

          echo strings unless the -e option is specified.

          If a fatal error is encountered (see the section ERRORS
          in  zshmisc(1)),  and  the code is running in a script,
          the shell will resume execution at the  next  statement
          in  the script at the top level, in other words outside
          all functions or shell constructs  such  as  loops  and
          conditions.   This  mimics the behaviour of interactive
          shells, where the shell returns to the line  editor  to
          read a new command; it was the normal behaviour in ver-
          sions of zsh before 5.0.1.

          A history reference without  an  event  specifier  will
          always  refer  to  the  previous command.  Without this
          option, such a history reference  refers  to  the  same
          event  as the previous history reference, defaulting to
          the previous command.

          Allow loop bodies to take the form `list; end'  instead
          of `do list; done'.

          Changes the rules for single- and double-quoted text to
          match that of csh.  These require  that  embedded  new-
          lines  be  preceded  by a backslash; unescaped newlines
          will cause an error message.  In double-quoted strings,
          it  is  made  impossible to escape `$', ``' or `"' (and
          `\' itself no longer needs escaping).  Command  substi-
          tutions are only expanded once, and cannot be nested.

          Do  not  use the values of NULLCMD and READNULLCMD when
          running redirections with no command.  This  make  such
          redirections fail (see the section `Redirection').

     KSH_ARRAYS <K> <S>
          Emulate  ksh array handling as closely as possible.  If
          this option is set, array elements  are  numbered  from
          zero,  an  array  parameter without subscript refers to
          the first element  instead  of  the  whole  array,  and
          braces    are   required   to   delimit   a   subscript
          (`${path[2]}' rather than just `$path[2]').

          Emulate ksh function autoloading.  This means that when
          a  function  is  autoloaded,  the corresponding file is
          merely executed, and must define the  function  itself.
          (By default, the function is defined to the contents of
          the file.  However, the most common ksh-style case - of

zsh 5.0.5          Last change: January 5, 2014                23

User Commands                                       ZSHOPTIONS(1)

          the  file  containing  only  a simple definition of the
          function - is always handled in the ksh-compatible man-

          Alters the way options settings are printed: instead of
          separate lists of set and unset  options,  all  options
          are  shown,  marked `on' if they are in the non-default
          state, `off' otherwise.

          Alters the way arguments to the typeset family of  com-
          mands, including declare, export, float, integer, local
          and readonly, are processed.  Without this option,  zsh
          will  perform  normal  word splitting after command and
          parameter expansion in arguments of an assignment; with
          it,  word splitting does not take place in those cases.

          Treat use of a subscript of  value  zero  in  array  or
          string expressions as a reference to the first element,
          i.e. the element that  usually  has  the  subscript  1.
          Ignored if KSH_ARRAYS is also set.

          If  neither this option nor KSH_ARRAYS is set, accesses
          to an element of an array or string with subscript zero
          return  an  empty  element or string, while attempts to
          set element zero of an array or string are  treated  as
          an  error.  However, attempts to set an otherwise valid
          subscript range that includes zero will  succeed.   For
          example, if KSH_ZERO_SUBSCRIPT is not set,


          is an error, while


          is not and will replace the first element of the array.

          This option is for compatibility with older versions of
          the shell and is not recommended in new code.

          When  this option is set, reserved words are not candi-
          dates for alias expansion:  it  is  still  possible  to
          declare  any  of  them  as an alias, but the alias will
          never be expanded.  Reserved words are described in the
          section RESERVED WORDS in zshmisc(1).

          Alias  expansion  takes place while text is being read;
          hence when this option is set it does not  take  effect

zsh 5.0.5          Last change: January 5, 2014                24

User Commands                                       ZSHOPTIONS(1)

          until  the  end of any function or other piece of shell
          code parsed as one unit.  Note this may  cause  differ-
          ences  from  other  shells  even  when the option is in
          effect.  For example, when running a command with  `zsh
          -c',  or even `zsh -o posixaliases -c', the entire com-
          mand argument is parsed as one unit, so aliases defined
          within  the  argument  are  not available even in later
          lines.  If in doubt, avoid use of aliases in non-inter-
          active code.

          When this option is set the command builtin can be used
          to execute shell builtin commands.   Parameter  assign-
          ments  specified  before  shell  functions  and special
          builtins are kept after the  command  completes  unless
          the  special  builtin  is  prefixed  with  the  command
          builtin.  Special builtins are ., :,  break,  continue,
          declare,  eval, exit, export, integer, local, readonly,
          return, set, shift, source, times, trap and unset.

          In addition, various error conditions  associated  with
          the  above  builtins  or  exec  cause a non-interactive
          shell to exit and an interactive shell to return to its
          top-level processing.

          When this option is set, only the ASCII characters a to
          z, A to Z, 0 to 9 and _  may  be  used  in  identifiers
          (names of shell parameters and modules).

          When  the  option is unset and multibyte character sup-
          port is enabled (i.e. it is compiled in and the  option
          MULTIBYTE  is  set), then additionally any alphanumeric
          characters in the local character set may  be  used  in
          identifiers.   Note  that scripts and functions written
          with this feature are not portable, and also that  both
          options  must  be  set before the script or function is
          parsed; setting them during execution is not sufficient
          as the syntax variable=value has already been parsed as
          a command rather than an assignment.

          If multibyte character support is not compiled into the
          shell  this  option is ignored; all octets with the top
          bit set may be used in identifiers.  This is  non-stan-
          dard but is the traditional zsh behaviour.

          This option affects processing of quoted strings.  Cur-
          rently it only affects the behaviour  of  null  charac-
          ters,  i.e.  character  0 in the portable character set
          corresponding to US ASCII.

zsh 5.0.5          Last change: January 5, 2014                25

User Commands                                       ZSHOPTIONS(1)

          When this option is not set, null  characters  embedded
          within  strings of the form $'...' are treated as ordi-
          nary characters. The entire string is maintained within
          the shell and output to files where necessary, although
          owing to restrictions  of  the  library  interface  the
          string  is  truncated  at  the  null  character in file
          names, environment variables, or in arguments to exter-
          nal programs.

          When this option is set, the $'...' expression is trun-
          cated at the null character.  Note that remaining parts
          of the same string beyond the termination of the quotes
          are not trunctated.

          For example, the command  line  argument  a$'b\0c'd  is
          treated  with  the  option  off as the characters a, b,
          null, c, d, and with the option on as the characters a,
          b, d.

     POSIX_TRAPS <K> <S>
          When  the  is option is set, the usual zsh behaviour of
          executing traps for EXIT on exit from  shell  functions
          is  suppressed.   In that case, manipulating EXIT traps
          always alters the global trap for  exiting  the  shell;
          the LOCAL_TRAPS option is ignored for the EXIT trap.

          Perform  filename  expansion (e.g., ~ expansion) before
          parameter expansion, command  substitution,  arithmetic
          expansion  and  brace  expansion.   If  this  option is
          unset, it is performed after brace expansion, so things
          like `~$USERNAME' and `~{pfalstad,rc}' will work.

     SH_NULLCMD <K> <S>
          Do  not  use the values of NULLCMD and READNULLCMD when
          doing redirections, use `:' instead  (see  the  section

          If this option is set the shell tries to interpret sin-
          gle letter options (which are used with set and setopt)
          like  ksh  does.   This also affects the value of the -
          special parameter.

     SH_WORD_SPLIT (-y) <K> <S>
          Causes field splitting  to  be  performed  on  unquoted
          parameter  expansions.  Note that this option has noth-
          ing to  do  with  word  splitting.   (See  the  section
          `Parameter Expansion'.)

          While waiting for a program to exit, handle signals and

zsh 5.0.5          Last change: January 5, 2014                26

User Commands                                       ZSHOPTIONS(1)

          run traps immediately.  Otherwise the trap is run after
          a  child process has exited.  Note this does not affect
          the point at which traps are run  for  any  case  other
          than when the shell is waiting for a child process.

  Shell State
     INTERACTIVE (-i, ksh: -i)
          This  is an interactive shell.  This option is set upon
          initialisation if the standard input is a tty and  com-
          mands  are  being  read  from standard input.  (See the
          discussion of SHIN_STDIN.)  This heuristic may be over-
          ridden  by  specifying  a  state for this option on the
          command line.  The value of this  option  can  only  be
          changed  via flags supplied at invocation of the shell.
          It cannot be changed once zsh is running.

     LOGIN (-l, ksh: -l)
          This is a login shell.  If this option is  not  explic-
          itly  set, the shell becomes a login shell if the first
          character of the argv[0] passed to the shell is a  `-'.

     PRIVILEGED (-p, ksh: -p)
          Turn  on privileged mode. This is enabled automatically
          on startup if the effective  user  (group)  ID  is  not
          equal to the real user (group) ID.  Turning this option
          off causes the effective user and group IDs to  be  set
          to  the  real  user and group IDs. This option disables
          sourcing user startup files.  If zsh is invoked as `sh'
          or  `ksh'  with  this  option set, /etc/suid_profile is
          sourced (after  /etc/profile  on  interactive  shells).
          Sourcing ~/.profile is disabled and the contents of the
          ENV variable is ignored. This option cannot be  changed
          using  the -m option of setopt and unsetopt, and chang-
          ing it inside a function  always  changes  it  globally
          regardless of the LOCAL_OPTIONS option.

     RESTRICTED (-r)
          Enables restricted mode.  This option cannot be changed
          using unsetopt, and setting it inside a function always
          changes  it  globally  regardless  of the LOCAL_OPTIONS
          option.  See the section `Restricted Shell'.

     SHIN_STDIN (-s, ksh: -s)
          Commands are being read from the standard input.   Com-
          mands  are  read  from  standard input if no command is
          specified with -c and no file of commands is specified.
          If  SHIN_STDIN  is  set explicitly on the command line,
          any argument that would otherwise have been taken as  a
          file  to  run will instead be treated as a normal posi-
          tional parameter.  Note that setting or unsetting  this
          option  on the command line does not necessarily affect
          the state the option  will  have  while  the  shell  is

zsh 5.0.5          Last change: January 5, 2014                27

User Commands                                       ZSHOPTIONS(1)

          running - that is purely an indicator of whether on not
          commands are actually being read from  standard  input.
          The  value of this option can only be changed via flags
          supplied at invocation of  the  shell.   It  cannot  be
          changed once zsh is running.

     SINGLE_COMMAND (-t, ksh: -t)
          If  the  shell is reading from standard input, it exits
          after a single command has been  executed.   This  also
          makes the shell non-interactive, unless the INTERACTIVE
          option is explicitly set  on  the  command  line.   The
          value of this option can only be changed via flags sup-
          plied at invocation of the shell.  It cannot be changed
          once zsh is running.

     BEEP (+B) <D>
          Beep on error in ZLE.

          Assume  that the terminal displays combining characters
          correctly.  Specifically, if a base alphanumeric  char-
          acter is followed by one or more zero-width punctuation
          characters, assume that the zero-width characters  will
          be  displayed  as  modifications  to the base character
          within the same width.  Not all terminals handle  this.
          If  this  option  is not set, zero-width characters are
          displayed separately with special mark-up.

          If this option is  set,  the  pattern  test  [[:WORD:]]
          matches  a  zero-width  punctuation  character  on  the
          assumption that it will be used as part of  a  word  in
          combination  with a word character.  Otherwise the base
          shell does not handle combining characters specially.

          If ZLE is loaded, turning on this option has the equiv-
          alent  effect  of  `bindkey  -e'.   In addition, the VI
          option is unset.  Turning it off has  no  effect.   The
          option setting is not guaranteed to reflect the current
          keymap.  This option  is  provided  for  compatibility;
          bindkey is the recommended interface.

          Start up the line editor in overstrike mode.

          Use   single-line   command  line  editing  instead  of

          Note that although this is on by default in ksh  emula-
          tion  it  only  provides superficial compatibility with

zsh 5.0.5          Last change: January 5, 2014                28

User Commands                                       ZSHOPTIONS(1)

          the ksh line editor and reduces  the  effectiveness  of
          the zsh line editor.  As it has no effect on shell syn-
          tax, many users may wish to disable  this  option  when
          using ksh emulation interactively.

     VI   If ZLE is loaded, turning on this option has the equiv-
          alent effect of `bindkey -v'.  In addition,  the  EMACS
          option  is  unset.   Turning it off has no effect.  The
          option setting is not guaranteed to reflect the current
          keymap.   This  option  is  provided for compatibility;
          bindkey is the recommended interface.

     ZLE (-Z)
          Use the zsh line editor.  Set by default in interactive
          shells connected to a terminal.

     Some  options  have  alternative  names.   These aliases are
     never used for output, but can  be  used  just  like  normal
     option names when specifying options to the shell.

          NO_IGNORE_BRACES (ksh and bash compatibility)

          GLOB_DOTS (bash compatibility)

          HASH_CMDS (bash compatibility)

          APPEND_HISTORY (bash compatibility)

          BANG_HIST (bash compatibility)

     LOG  NO_HIST_NO_FUNCTIONS (ksh compatibility)

          MAIL_WARNING (bash compatibility)

          SINGLE_COMMAND (bash compatibility)

          CHASE_LINKS (ksh and bash compatibility)

          PROMPT_SUBST (bash compatibility)

          SHIN_STDIN (ksh compatibility)

zsh 5.0.5          Last change: January 5, 2014                29

User Commands                                       ZSHOPTIONS(1)

          HASH_CMDS (ksh compatibility)

  Default set
     -0   CORRECT
     -2   NO_BAD_PATTERN
     -3   NO_NOMATCH
     -4   GLOB_DOTS
     -5   NOTIFY
     -6   BG_NICE
     -7   IGNORE_EOF
     -8   MARK_DIRS
     -9   AUTO_LIST
     -B   NO_BEEP
     -C   NO_CLOBBER
     -F   NO_GLOB
     -G   NULL_GLOB
     -J   AUTO_CD
     -K   NO_BANG_HIST
     -N   AUTO_PUSHD
     -Q   PATH_DIRS
     -S   REC_EXACT
     -V   NO_PROMPT_CR
     -X   LIST_TYPES
     -Z   ZLE
     -a   ALL_EXPORT
     -e   ERR_EXIT
     -f   NO_RCS
     -l   LOGIN
     -m   MONITOR
     -n   NO_EXEC
     -p   PRIVILEGED
     -r   RESTRICTED

zsh 5.0.5          Last change: January 5, 2014                30

User Commands                                       ZSHOPTIONS(1)

     -s   SHIN_STDIN
     -u   NO_UNSET
     -v   VERBOSE
     -w   CHASE_LINKS
     -x   XTRACE
     -y   SH_WORD_SPLIT

  sh/ksh emulation set
     -C   NO_CLOBBER
     -X   MARK_DIRS
     -a   ALL_EXPORT
     -b   NOTIFY
     -e   ERR_EXIT
     -f   NO_GLOB
     -l   LOGIN
     -m   MONITOR
     -n   NO_EXEC
     -p   PRIVILEGED
     -r   RESTRICTED
     -s   SHIN_STDIN
     -u   NO_UNSET
     -v   VERBOSE
     -x   XTRACE

  Also note
     -A   Used by set for setting arrays
     -b   Used  on the command line to specify end of option pro-
     -c   Used on the command line to specify a single command
     -m   Used by setopt for pattern-matching option setting
     -o   Used in all places to allow use of long option names
     -s   Used by set to sort positional parameters

     See  attributes(5)  for  descriptions   of   the   following

     |Availability   | shell/zsh        |
     |Stability      | Volatile         |
     This   software   was   built   from   source  available  at

zsh 5.0.5          Last change: January 5, 2014                31

User Commands                                       ZSHOPTIONS(1)   The   original
     community   source   was   downloaded   from    http://down-

     Further  information about this software can be found on the
     open source community website at

zsh 5.0.5          Last change: January 5, 2014                32