.. historic nodename: Options

Options
================================================================================
.. index:: single: options; Command

.. historic nodename: Specifying Options

Specifying Options
--------------------------------------------------------------------------------
.. index:: single: options, specifying; Command

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 :emphasis:`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 :strong:`sh`/:strong:`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 preceded 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 inversion of that name refers to the option being on.
For example, ``+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.

It is possible for options to be set within a function scope.  See the
description of the option ``LOCAL_OPTIONS`` below.

.. historic nodename: Description of Options

Description of Options
--------------------------------------------------------------------------------
.. index:: single: options, description; Command

In the following list, options set by default in all emulations 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: AUTO_CD; Program

.. index:: single: NO_AUTO_CD; Program

.. index:: single: AUTOCD; Program

.. index:: single: NOAUTOCD; Program

.. index:: single: cd, automatic; Command

``AUTO_CD`` (``-J``)
    
    If a command is issued that can't be executed as a normal command,
    and the command is the name of a directory, perform the ``cd``
    command to that directory.
    This option is only applicable if the option ``SHIN_STDIN`` is set,
    i.e. if commands are being read from standard input.  The option
    is designed for interactive use; it is recommended that ``cd``
    be used explicitly in scripts to avoid ambiguity.
    

.. index:: single: AUTO_PUSHD; Program

.. index:: single: NO_AUTO_PUSHD; Program

.. index:: single: AUTOPUSHD; Program

.. index:: single: NOAUTOPUSHD; Program

.. index:: single: cd, behaving like pushd; Command

.. index:: single: pushd, making cd behave like; Command

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

.. index:: single: CDABLE_VARS; Program

.. index:: single: NO_CDABLE_VARS; Program

.. index:: single: CDABLEVARS; Program

.. index:: single: NOCDABLEVARS; Program

.. index:: single: cd, to parameter; Command

``CDABLE_VARS`` (``-T``)
    
    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
    :zshsectref:`Filename Expansion <zshexpn>`).
    

.. index:: single: CD_SILENT; Program

.. index:: single: NO_CD_SILENT; Program

.. index:: single: CDSILENT; Program

.. index:: single: NOCDSILENT; Program

.. index:: single: cd, silencing; Command

.. index:: single: autocd, silencing; Command

``CD_SILENT``
    
    Never print the working directory after a ``cd`` (whether explicit or
    implied with the ``AUTO_CD`` option set). ``cd`` normally prints the
    working directory when the argument given to it was ``-``, a stack entry, or
    the name of a directory found under ``CDPATH``. Note that this is distinct
    from ``pushd``'s stack-printing behaviour, which is controlled by
    ``PUSHD_SILENT``. This option overrides the printing-related effects of
    ``POSIX_CD``.
    

.. index:: single: CHASE_DOTS; Program

.. index:: single: NO_CHASE_DOTS; Program

.. index:: single: CHASEDOTS; Program

.. index:: single: NOCHASEDOTS; Program

.. index:: single: cd, with .. in argument; Command

``CHASE_DOTS``
    
    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 directory ``/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 symbolic
    links in the path will also be resolved.
    

.. index:: single: CHASE_LINKS; Program

.. index:: single: NO_CHASE_LINKS; Program

.. index:: single: CHASELINKS; Program

.. index:: single: NOCHASELINKS; Program

.. index:: single: links, symbolic; Command

.. index:: single: symbolic links; Command

``CHASE_LINKS`` (``-w``)
    
    Resolve symbolic links to their true values when changing 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 segment is a symbolic link.
    

.. index:: single: POSIX_CD; Program

.. index:: single: POSIXCD; Program

.. index:: single: NO_POSIX_CD; Program

.. index:: single: NOPOSIXCD; Program

.. index:: single: CDPATH, order of checking; Command

``POSIX_CD`` <K> <S>
    
    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 :manpage:`zshbuiltins`.
    If the option is set, the shell does not test for directories beneath
    the local directory (``.``) until after all directories in ``cdpath``
    have been tested, and the ``cd`` and ``chdir`` commands do not recognise
    arguments of the form {``+|-``}:var:`n` as directory stack entries.
    
    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 interactive 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.
    

.. index:: single: PUSHD_IGNORE_DUPS; Program

.. index:: single: NO_PUSHD_IGNORE_DUPS; Program

.. index:: single: PUSHDIGNOREDUPS; Program

.. index:: single: NOPUSHDIGNOREDUPS; Program

.. index:: single: directory stack, ignoring duplicates; Command

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

.. index:: single: PUSHD_MINUS; Program

.. index:: single: NO_PUSHD_MINUS; Program

.. index:: single: PUSHDMINUS; Program

.. index:: single: NOPUSHDMINUS; Program

.. index:: single: directory stack, controlling syntax; Command

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

.. index:: single: PUSHD_SILENT; Program

.. index:: single: NO_PUSHD_SILENT; Program

.. index:: single: PUSHDSILENT; Program

.. index:: single: NOPUSHDSILENT; Program

.. index:: single: directory stack, silencing; Command

``PUSHD_SILENT`` (``-E``)
    
    Do not print the directory stack after ``pushd`` or ``popd``.
    

.. index:: single: PUSHD_TO_HOME; Program

.. index:: single: NO_PUSHD_TO_HOME; Program

.. index:: single: PUSHDTOHOME; Program

.. index:: single: NOPUSHDTOHOME; Program

.. index:: single: pushd, to home; Command

``PUSHD_TO_HOME`` (``-D``)
    
    Have ``pushd`` with no arguments act like ``pushd $HOME``.
    

Completion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: ALWAYS_LAST_PROMPT; Program

.. index:: single: NO_ALWAYS_LAST_PROMPT; Program

.. index:: single: ALWAYSLASTPROMPT; Program

.. index:: single: NOALWAYSLASTPROMPT; Program

``ALWAYS_LAST_PROMPT`` <D>
    
    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 :emphasis:`no` numeric argument.
    

.. index:: single: ALWAYS_TO_END; Program

.. index:: single: NO_ALWAYS_TO_END; Program

.. index:: single: ALWAYSTOEND; Program

.. index:: single: NOALWAYSTOEND; Program

``ALWAYS_TO_END``
    
    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.
    

.. index:: single: AUTO_LIST; Program

.. index:: single: NO_AUTO_LIST; Program

.. index:: single: AUTOLIST; Program

.. index:: single: NOAUTOLIST; Program

.. index:: single: completion, listing choices; Command

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

.. index:: single: AUTO_MENU; Program

.. index:: single: NO_AUTO_MENU; Program

.. index:: single: AUTOMENU; Program

.. index:: single: NOAUTOMENU; Program

.. index:: single: completion, menu; Command

``AUTO_MENU`` <D>
    
    Automatically use menu completion after the second consecutive request for
    completion, for example by pressing the tab key repeatedly. This option
    is overridden by ``MENU_COMPLETE``.
    

.. index:: single: AUTO_NAME_DIRS; Program

.. index:: single: NO_AUTO_NAME_DIRS; Program

.. index:: single: AUTONAMEDIRS; Program

.. index:: single: NOAUTONAMEDIRS; Program

.. index:: single: directories, named; Command

``AUTO_NAME_DIRS``
    
    Any global parameter that is set to the absolute name of a directory
    immediately becomes a name for that directory, 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 ``~``:var:`param` first.)
    

.. index:: single: AUTO_PARAM_KEYS; Program

.. index:: single: NO_AUTO_PARAM_KEYS; Program

.. index:: single: AUTOPARAMKEYS; Program

.. index:: single: NOAUTOPARAMKEYS; Program

``AUTO_PARAM_KEYS`` <D>
    
    If a parameter name was completed and a following character
    (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 name.
    Completion in a brace expansion is affected similarly: the added character
    is a ``,``, which will be removed if ``}`` is typed next.
    

.. index:: single: AUTO_PARAM_SLASH; Program

.. index:: single: NO_AUTO_PARAM_SLASH; Program

.. index:: single: AUTOPARAMSLASH; Program

.. index:: single: NOAUTOPARAMSLASH; Program

``AUTO_PARAM_SLASH`` <D>
    
    If a parameter is completed whose content is the name of a directory,
    then add a trailing slash instead of a space.
    

.. index:: single: AUTO_REMOVE_SLASH; Program

.. index:: single: NO_AUTO_REMOVE_SLASH; Program

.. index:: single: AUTOREMOVESLASH; Program

.. index:: single: NOAUTOREMOVESLASH; Program

.. index:: single: slash, removing trailing; Command

``AUTO_REMOVE_SLASH`` <D>
    
    When the last character resulting from a completion is a slash and the next
    character typed is a word delimiter, a slash, or a character that ends 
    a command (such as a semicolon or an ampersand), remove the slash.
    

.. index:: single: BASH_AUTO_LIST; Program

.. index:: single: NO_BASH_AUTO_LIST; Program

.. index:: single: BASHAUTOLIST; Program

.. index:: single: NOBASHAUTOLIST; Program

.. index:: single: completion, listing choices, bash style; Command

``BASH_AUTO_LIST``
    
    On an ambiguous completion, automatically list choices when the
    completion function is called twice in succession.  This takes
    precedence over ``AUTO_LIST``.  The setting 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_COMPLETE``, since repeated completion calls immediately cycle
    through the list in that case.
    

.. index:: single: COMPLETE_ALIASES; Program

.. index:: single: NO_COMPLETE_ALIASES; Program

.. index:: single: COMPLETEALIASES; Program

.. index:: single: NOCOMPLETEALIASES; Program

.. index:: single: aliases, completion of; Command

``COMPLETE_ALIASES``
    
    Prevents aliases on the command line from being internally substituted
    before completion is attempted.  The effect is to make the alias a
    distinct command for completion purposes.
    

.. index:: single: COMPLETE_IN_WORD; Program

.. index:: single: NO_COMPLETE_IN_WORD; Program

.. index:: single: COMPLETEINWORD; Program

.. index:: single: NOCOMPLETEINWORD; Program

``COMPLETE_IN_WORD``
    
    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.
    

.. index:: single: GLOB_COMPLETE; Program

.. index:: single: NO_GLOB_COMPLETE; Program

.. index:: single: GLOBCOMPLETE; Program

.. index:: single: NOGLOBCOMPLETE; Program

``GLOB_COMPLETE``
    
    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 turning
    on the ``GLOB_COMPLETE`` option does not have this effect.
    

.. index:: single: HASH_LIST_ALL; Program

.. index:: single: NO_HASH_LIST_ALL; Program

.. index:: single: HASHLISTALL; Program

.. index:: single: NOHASHLISTALL; Program

``HASH_LIST_ALL`` <D>
    
    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.
    

.. index:: single: LIST_AMBIGUOUS; Program

.. index:: single: NO_LIST_AMBIGUOUS; Program

.. index:: single: LISTAMBIGUOUS; Program

.. index:: single: NOLISTAMBIGUOUS; Program

.. index:: single: ambiguous completion; Command

.. index:: single: completion, ambiguous; Command

``LIST_AMBIGUOUS`` <D>
    
    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 behaviour 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 function.
    

.. index:: single: LIST_BEEP; Program

.. index:: single: NO_LIST_BEEP; Program

.. index:: single: LISTBEEP; Program

.. index:: single: NOLISTBEEP; Program

.. index:: single: beep, ambiguous completion; Command

.. index:: single: completion, beep on ambiguous; Command

``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.
    

.. index:: single: LIST_PACKED; Program

.. index:: single: NO_LIST_PACKED; Program

.. index:: single: LISTPACKED; Program

.. index:: single: NOLISTPACKED; Program

.. index:: single: completion, listing; Command

``LIST_PACKED``
    
    Try to make the completion list smaller (occupying less lines) by
    printing the matches in columns with different widths.
    

.. index:: single: LIST_ROWS_FIRST; Program

.. index:: single: NO_LIST_ROWS_FIRST; Program

.. index:: single: LISTROWSFIRST; Program

.. index:: single: NOLISTROWSFIRST; Program

.. index:: single: completion, listing order; Command

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

.. index:: single: LIST_TYPES; Program

.. index:: single: NO_LIST_TYPES; Program

.. index:: single: LISTTYPES; Program

.. index:: single: NOLISTTYPES; Program

.. index:: single: marking file types; Command

.. index:: single: files, marking type of; Command

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

.. index:: single: MENU_COMPLETE; Program

.. index:: single: NO_MENU_COMPLETE; Program

.. index:: single: MENUCOMPLETE; Program

.. index:: single: NOMENUCOMPLETE; Program

.. index:: single: completion, menu; Command

``MENU_COMPLETE`` (``-Y``)
    
    On an ambiguous completion, instead of listing possibilities or beeping,
    insert the first match immediately.  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``.
    

.. index:: single: REC_EXACT; Program

.. index:: single: NO_REC_EXACT; Program

.. index:: single: RECEXACT; Program

.. index:: single: NORECEXACT; Program

.. index:: single: completion, exact matches; Command

``REC_EXACT`` (``-S``)
    
    If the string on the command line exactly matches one of the possible
    completions, it is accepted, even if there is another completion (i.e. that
    string with something else added) that also matches.
    

Expansion and Globbing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: BAD_PATTERN; Program

.. index:: single: NO_BAD_PATTERN; Program

.. index:: single: BADPATTERN; Program

.. index:: single: NOBADPATTERN; Program

.. index:: single: globbing, bad pattern; Command

.. index:: single: filename generation, bad pattern; Command

``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.)
    

.. index:: single: BARE_GLOB_QUAL; Program

.. index:: single: NO_BARE_GLOB_QUAL; Program

.. index:: single: BAREGLOBQUAL; Program

.. index:: single: NOBAREGLOBQUAL; Program

.. index:: single: globbing qualifiers, enable; Command

.. index:: single: enable globbing qualifiers; Command

``BARE_GLOB_QUAL`` <Z>
    
    In a glob pattern, treat a trailing set of parentheses as a qualifier
    list, if it contains no unquoted ``|``, ``(`` or (if special) ``~``
    characters.  See :zshsectref:`Filename Generation <zshexpn>`.
    

.. index:: single: BRACE_CCL; Program

.. index:: single: NO_BRACE_CCL; Program

.. index:: single: BRACECCL; Program

.. index:: single: NOBRACECCL; Program

.. index:: single: brace expansion, extending; Command

.. index:: single: expansion, brace, extending; Command

``BRACE_CCL``
    
    Expand expressions in braces which would not otherwise undergo brace
    expansion to a lexically ordered list of all the characters.  See
    :zshsectref:`Brace Expansion <zshexpn>`.
    

.. index:: single: CASE_GLOB; Program

.. index:: single: NO_CASE_GLOB; Program

.. index:: single: CASEGLOB; Program

.. index:: single: NOCASEGLOB; Program

.. index:: single: case-insensitive globbing, option; Command

``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 unset).
    

.. index:: single: CASE_MATCH; Program

.. index:: single: NO_CASE_MATCH; Program

.. index:: single: CASEMATCH; Program

.. index:: single: NOCASEMATCH; Program

.. index:: single: case-insensitive regular expression matches, option; Command

.. index:: single: regular expressions, case-insensitive matching, option; Command

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

.. index:: single: CASE_PATHS; Program

.. index:: single: NO_CASE_PATHS; Program

.. index:: single: CASEPATHS; Program

.. index:: single: NOCASEPATHS; Program

.. index:: single: case-sensitive globbing, option; Command

``CASE_PATHS``
    
    If ``CASE_PATHS`` is not set (the default), ``CASE_GLOB`` affects the
    interpretation of :emphasis:`every` path component, whenever a special
    character appears in :emphasis:`any` component.  When ``CASE_PATHS`` is set,
    file path components that do :emphasis:`not` contain special filename
    generation characters are always sensitive to case, thus restricting
    ``NO_CASE_GLOB`` to components that contain globbing characters.
    
    Note that if the filesystem itself is not sensitive to case, then
    ``CASE_PATHS`` has no effect.
    

.. index:: single: CSH_NULL_GLOB; Program

.. index:: single: NO_CSH_NULL_GLOB; Program

.. index:: single: CSHNULLGLOB; Program

.. index:: single: NOCSHNULLGLOB; Program

.. index:: single: csh, null globbing style; Command

.. index:: single: null globbing style, csh; Command

.. index:: single: globbing, null, style, csh; Command

``CSH_NULL_GLOB`` <C>
    
    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``.
    

.. index:: single: EQUALS; Program

.. index:: single: NO_EQUALS; Program

.. index:: single: NOEQUALS; Program

.. index:: single: filename expansion, =; Command

``EQUALS`` <Z>
    
    Perform ``=`` filename expansion.
    (See :zshsectref:`Filename Expansion <zshexpn>`.)
    

.. index:: single: EXTENDED_GLOB; Program

.. index:: single: NO_EXTENDED_GLOB; Program

.. index:: single: EXTENDEDGLOB; Program

.. index:: single: NOEXTENDEDGLOB; Program

.. index:: single: globbing, extended; Command

``EXTENDED_GLOB``
    
    Treat the ``#``, ``~`` and ``^`` characters as part of patterns
    for filename generation, etc.  (An initial unquoted ``~``
    always produces named directory expansion.)
    

.. index:: single: FORCE_FLOAT; Program

.. index:: single: NO_FORCE_FLOAT; Program

.. index:: single: FORCEFLOAT; Program

.. index:: single: NOFORCEFLOAT; Program

.. index:: single: floating point, forcing use of; Command

.. index:: single: forcing use of floating point; Command

``FORCE_FLOAT``
    
    Constants in arithmetic evaluation will be treated as
    floating point even without the use of a decimal point; the
    values of integer variables will be converted to floating point when
    used in arithmetic expressions.  Integers in any base will be converted.
    

.. index:: single: GLOB; Program

.. index:: single: NO_GLOB; Program

.. index:: single: NOGLOB; Program

.. index:: single: globbing, enabling; Command

.. index:: single: enabling globbing; Command

``GLOB`` (``+F``, ksh: ``+f``) <D>
    
    Perform filename generation (globbing).
    (See :zshsectref:`Filename Generation <zshexpn>`.)
    

.. index:: single: GLOB_ASSIGN; Program

.. index:: single: NO_GLOB_ASSIGN; Program

.. index:: single: GLOBASSIGN; Program

.. index:: single: NOGLOBASSIGN; Program

``GLOB_ASSIGN`` <C>
    
    If this option is set, filename generation (globbing) is
    performed on the right hand side of scalar parameter assignments of
    the form `:var:`name`\ ``=``:var:`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 :var:`name`\ ``=(``:var:`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.
    

.. index:: single: GLOB_DOTS; Program

.. index:: single: NO_GLOB_DOTS; Program

.. index:: single: GLOBDOTS; Program

.. index:: single: NOGLOBDOTS; Program

.. index:: single: globbing, of . files; Command

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

.. index:: single: GLOB_STAR_SHORT; Program

.. index:: single: NO_GLOB_STAR_SHORT; Program

.. index:: single: GLOBSTARSHORT; Program

.. index:: single: NOGLOBSTARSHORT; Program

.. index:: single: globbing, short forms; Command

.. index:: single: globbing, ** special; Command

``GLOB_STAR_SHORT``
    
    When this option is set and the default zsh-style globbing is in
    effect, the pattern ``**/*`` can be abbreviated to ``**`` and the
    pattern ``***/*`` can be abbreviated to ``***``.  Hence ``**.c``
    finds a file ending in ``.c`` in any subdirectory, and ``***.c`` does
    the same while also following symbolic links.  A ``/`` immediately
    after the ``**`` or ``***`` forces the pattern to be treated as the
    unabbreviated form.
    

.. index:: single: GLOB_SUBST; Program

.. index:: single: NO_GLOB_SUBST; Program

.. index:: single: GLOBSUBST; Program

.. index:: single: NOGLOBSUBST; Program

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

.. index:: single: HIST_SUBST_PATTERN; Program

.. index:: single: NO_HIST_SUBST_PATTERN; Program

.. index:: single: HISTSUBSTPATTERN; Program

.. index:: single: NOHISTSUBSTPATTERN; Program

``HIST_SUBST_PATTERN``
    
    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 :zshsectref:`Modifiers <zshexpn>`.
    

.. index:: single: IGNORE_BRACES; Program

.. index:: single: NO_IGNORE_BRACES; Program

.. index:: single: IGNOREBRACES; Program

.. index:: single: NOIGNOREBRACES; Program

.. index:: single: disabling brace expansion; Command

.. index:: single: brace expansion, disabling; Command

.. index:: single: expansion, brace, disabling; Command

``IGNORE_BRACES`` (``-I``) <S>
    
    Do not perform brace expansion.  For historical reasons this
    also includes the effect of the ``IGNORE_CLOSE_BRACES`` option.
    

.. index:: single: IGNORE_CLOSE_BRACES; Program

.. index:: single: NO_IGNORE_CLOSE_BRACES; Program

.. index:: single: IGNORECLOSEBRACES; Program

.. index:: single: NOIGNORECLOSEBRACES; Program

``IGNORE_CLOSE_BRACES``
    
    When neither this option nor ``IGNORE_BRACES`` is set, a sole
    close brace character ``}`` is syntactically significant 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 construct.  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.
    
    For example, with both options unset a function may be defined
    in the following fashion:
    
    
    .. code-block:: zsh
       :class: example

        args() { echo $# }
    
    
    while if either option is set, this does not work and something
    equivalent to the following is required:
    
    
    .. code-block:: zsh
       :class: example

        args() { echo $#; }
    
    
    

.. index:: single: KSH_GLOB; Program

.. index:: single: NO_KSH_GLOB; Program

.. index:: single: KSHGLOB; Program

.. index:: single: NOKSHGLOB; Program

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

.. index:: single: MAGIC_EQUAL_SUBST; Program

.. index:: single: NO_MAGIC_EQUAL_SUBST; Program

.. index:: single: MAGICEQUALSUBST; Program

.. index:: single: NOMAGICEQUALSUBST; Program

``MAGIC_EQUAL_SUBST``
    
    All unquoted arguments of the form :var:`anything`\ ``=``:var:`expression`
    appearing after the command name have filename expansion (that is,
    where :var:`expression` has a leading ``~`` or ``=``) performed on
    :var:`expression` as if it were a parameter 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 assignment.  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.
    

.. index:: single: MARK_DIRS; Program

.. index:: single: NO_MARK_DIRS; Program

.. index:: single: MARKDIRS; Program

.. index:: single: NOMARKDIRS; Program

.. index:: single: directories, marking; Command

.. index:: single: marking directories; Command

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

.. index:: single: MULTIBYTE; Program

.. index:: single: NO_MULTIBYTE; Program

.. index:: single: NOMULTIBYTE; Program

.. index:: single: characters, multibyte, in expansion and globbing; Command

.. index:: single: multibyte characters, in expansion and globbing; Command

``MULTIBYTE`` <D>
    
    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 character, 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``; otherwise it is off by default and has no effect
    if turned on.
    
    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 characters.  This is because
    the character set displayed by the terminal emulator is independent of
    shell settings.
    

.. index:: single: NOMATCH; Program

.. index:: single: NO_NOMATCH; Program

.. index:: single: NONOMATCH; Program

.. index:: single: globbing, no matches; Command

``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 ``=``.
    

.. index:: single: NULL_GLOB; Program

.. index:: single: NO_NULL_GLOB; Program

.. index:: single: NULLGLOB; Program

.. index:: single: NONULLGLOB; Program

.. index:: single: globbing, no matches; Command

``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``.
    

.. index:: single: NUMERIC_GLOB_SORT; Program

.. index:: single: NO_NUMERIC_GLOB_SORT; Program

.. index:: single: NUMERICGLOBSORT; Program

.. index:: single: NONUMERICGLOBSORT; Program

.. index:: single: globbing, sorting numerically; Command

``NUMERIC_GLOB_SORT``
    
    If numeric filenames are matched by a filename generation pattern,
    sort the filenames numerically rather than lexicographically.
    

.. index:: single: RC_EXPAND_PARAM; Program

.. index:: single: NO_RC_EXPAND_PARAM; Program

.. index:: single: RCEXPANDPARAM; Program

.. index:: single: NORCEXPANDPARAM; Program

.. index:: single: rc, parameter expansion style; Command

.. index:: single: parameter expansion style, rc; Command

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

.. index:: single: REMATCH_PCRE; Program

.. index:: single: NO_REMATCH_PCRE; Program

.. index:: single: REMATCHPCRE; Program

.. index:: single: NOREMATCHPCRE; Program

.. index:: single: regexp, PCRE; Command

.. index:: single: PCRE, regexp; Command

``REMATCH_PCRE``
    
    If set, regular expression matching with the ``=~`` operator will use
    Perl-Compatible Regular Expressions from the PCRE library.
    (The ``zsh/pcre`` module must be available.)
    If not set, regular expressions will use the extended regexp syntax
    provided by the system libraries.
    

.. index:: single: SH_GLOB; Program

.. index:: single: NO_SH_GLOB; Program

.. index:: single: SHGLOB; Program

.. index:: single: NOSHGLOB; Program

.. index:: single: sh, globbing style; Command

.. index:: single: globbing style, sh; Command

``SH_GLOB`` <K> <S>
    
    Disables the special meaning of ``(``, ``|``, ``)``
    and '``<``' for globbing the result of parameter and command substitutions,
    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 the ``!``.  This option is
    set by default if zsh is invoked as ``sh`` or ``ksh``.
    

.. index:: single: UNSET; Program

.. index:: single: NO_UNSET; Program

.. index:: single: NOUNSET; Program

.. index:: single: parameters, substituting unset; Command

.. index:: single: unset parameters, substituting; Command

``UNSET`` (``+u``, ksh: ``+u``) <K> <S> <Z>
    
    Treat unset parameters as if they were empty when substituting, and as if
    they were zero when reading their values in arithmetic expansion and
    arithmetic commands.
    Otherwise they are treated as an error.
    

.. index:: single: WARN_CREATE_GLOBAL; Program

.. index:: single: NO_WARN_CREATE_GLOBAL; Program

.. index:: single: WARNCREATEGLOBAL; Program

.. index:: single: NOWARNCREATEGLOBAL; Program

.. index:: single: parameters, warning when created globally; Command

``WARN_CREATE_GLOBAL``
    
    Print a warning message when a global parameter is created in a function
    by an assignment or in math context.
    This often indicates 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.
    

.. index:: single: WARN_NESTED_VAR; Program

.. index:: single: NO_WARN_NESTED_VAR; Program

.. index:: single: WARNNESTEDVAR; Program

.. index:: single: NO_WARNNESTEDVAR; Program

.. index:: single: parameters, warning when setting in enclosing scope; Command

``WARN_NESTED_VAR``
    
    Print a warning message when an existing parameter from an
    enclosing function scope, or global, is set in a function
    by an assignment or in math context.  Assignment to shell
    special parameters does not cause a warning.  This is the companion
    to ``WARN_CREATE_GLOBAL`` as in this case the warning is only
    printed when a parameter is :emphasis:`not` created.  Where possible,
    use of ``typeset -g`` to set the parameter suppresses the error,
    but note that this needs to be used every time the parameter is set.
    To restrict the effect of this option to a single function scope,
    use ``functions -W``.
    
    For example, the following code produces a warning for the assignment
    inside the function ``nested`` as that overrides the value within
    ``toplevel``
    
    
    .. code-block:: zsh
       :class: example

        toplevel() {
          local foo="in fn"
          nested
        }
        nested() {
             foo="in nested"
        }
        setopt warn_nested_var
        toplevel
    
    

History
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: APPEND_HISTORY; Program

.. index:: single: NO_APPEND_HISTORY; Program

.. index:: single: APPENDHISTORY; Program

.. index:: single: NOAPPENDHISTORY; Program

.. index:: single: history, appending to a file; Command

``APPEND_HISTORY`` <D>
    
    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
    ``$SAVEHIST`` (see also the ``HIST_SAVE_BY_COPY`` option).
    

.. index:: single: BANG_HIST; Program

.. index:: single: NO_BANG_HIST; Program

.. index:: single: BANGHIST; Program

.. index:: single: NOBANGHIST; Program

.. index:: single: history, enable substitution; Command

.. index:: single: enable history substitution; Command

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

.. index:: single: EXTENDED_HISTORY; Program

.. index:: single: NO_EXTENDED_HISTORY; Program

.. index:: single: EXTENDEDHISTORY; Program

.. index:: single: NOEXTENDEDHISTORY; Program

.. index:: single: history, timestamping; Command

``EXTENDED_HISTORY`` <C>
    
    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:
    
    ``:`` :var:`<beginning time>`\ ``:``:var:`<elapsed seconds>`\ ``;``:var:`<command>`.
    

.. index:: single: HIST_ALLOW_CLOBBER; Program

.. index:: single: NO_HIST_ALLOW_CLOBBER; Program

.. index:: single: HISTALLOWCLOBBER; Program

.. index:: single: NOHISTALLOWCLOBBER; Program

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

.. index:: single: HIST_BEEP; Program

.. index:: single: NO_HIST_BEEP; Program

.. index:: single: HISTBEEP; Program

.. index:: single: NOHISTBEEP; Program

.. index:: single: history beeping; Command

.. index:: single: beep, history; Command

``HIST_BEEP`` <D>
    
    Beep in ZLE when a widget attempts to access a history entry which
    isn't there.
    

.. index:: single: HIST_EXPIRE_DUPS_FIRST; Program

.. index:: single: NO_HIST_EXPIRE_DUPS_FIRST; Program

.. index:: single: HISTEXPIREDUPSFIRST; Program

.. index:: single: NOHISTEXPIREDUPSFIRST; Program

.. index:: single: history, expiring duplicates; Command

``HIST_EXPIRE_DUPS_FIRST``
    
    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 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.
    

.. index:: single: HIST_FCNTL_LOCK; Program

.. index:: single: NO_HIST_FCNTL_LOCK; Program

.. index:: single: HISTFCNTLLOCK; Program

.. index:: single: NOHISTFCNTLLOCK; Program

``HIST_FCNTL_LOCK``
    
    When writing out the history file, by default zsh uses ad-hoc file locking
    to avoid known problems with locking on some operating systems.  With this
    option locking 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 NFS.
    

.. index:: single: HIST_FIND_NO_DUPS; Program

.. index:: single: NO_HIST_FIND_NO_DUPS; Program

.. index:: single: HISTFINDNODUPS; Program

.. index:: single: NOHISTFINDNODUPS; Program

.. index:: single: history, ignoring duplicates in search; Command

``HIST_FIND_NO_DUPS``
    
    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.
    

.. index:: single: HIST_IGNORE_ALL_DUPS; Program

.. index:: single: NO_HIST_IGNORE_ALL_DUPS; Program

.. index:: single: HISTIGNOREALLDUPS; Program

.. index:: single: NOHISTIGNOREALLDUPS; Program

.. index:: single: history, ignoring all duplicates; Command

``HIST_IGNORE_ALL_DUPS``
    
    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).
    

.. index:: single: HIST_IGNORE_DUPS; Program

.. index:: single: NO_HIST_IGNORE_DUPS; Program

.. index:: single: HISTIGNOREDUPS; Program

.. index:: single: NOHISTIGNOREDUPS; Program

.. index:: single: history, ignoring duplicates; Command

``HIST_IGNORE_DUPS`` (``-h``)
    
    Do not enter command lines into the history list
    if they are duplicates of the previous event.
    

.. index:: single: HIST_IGNORE_SPACE; Program

.. index:: single: NO_HIST_IGNORE_SPACE; Program

.. index:: single: HISTIGNORESPACE; Program

.. index:: single: NOHISTIGNORESPACE; Program

.. index:: single: history, ignoring spaces; Command

``HIST_IGNORE_SPACE`` (``-g``)
    
    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 internal 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 return.
    

.. index:: single: HIST_LEX_WORDS; Program

.. index:: single: NO_HIST_LEX_WORDS; Program

.. index:: single: HISTLEXWORDS; Program

.. index:: single: NOHISTLEXWORDS; Program

``HIST_LEX_WORDS``
    
    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 handled, 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 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.
    

.. index:: single: HIST_NO_FUNCTIONS; Program

.. index:: single: NO_HIST_NO_FUNCTIONS; Program

.. index:: single: HISTNOFUNCTIONS; Program

.. index:: single: NOHISTNOFUNCTIONS; Program

``HIST_NO_FUNCTIONS``
    
    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.
    

.. index:: single: HIST_NO_STORE; Program

.. index:: single: NO_HIST_NO_STORE; Program

.. index:: single: HISTNOSTORE; Program

.. index:: single: NOHISTNOSTORE; Program

``HIST_NO_STORE``
    
    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.
    

.. index:: single: HIST_REDUCE_BLANKS; Program

.. index:: single: NO_HIST_REDUCE_BLANKS; Program

.. index:: single: HISTREDUCEBLANKS; Program

.. index:: single: NOHISTREDUCEBLANKS; Program

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

.. index:: single: HIST_SAVE_BY_COPY; Program

.. index:: single: NO_HIST_SAVE_BY_COPY; Program

.. index:: single: HISTSAVEBYCOPY; Program

.. index:: single: NOHISTSAVEBYCOPY; Program

``HIST_SAVE_BY_COPY`` <D>
    
    When the history file is re-written, we normally write out a copy of
    the file named ``$HISTFILE.new`` 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
    history-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 possible to lose history entries if zsh gets interrupted
    during the save.
    
    When writing out a copy of the history file, zsh preserves the old
    file's permissions and group information, but will refuse to write
    out a new file if it would change the history file's owner.
    

.. index:: single: HIST_SAVE_NO_DUPS; Program

.. index:: single: NO_HIST_SAVE_NO_DUPS; Program

.. index:: single: HISTSAVENODUPS; Program

.. index:: single: NOHISTSAVENODUPS; Program

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

.. index:: single: HIST_VERIFY; Program

.. index:: single: NO_HIST_VERIFY; Program

.. index:: single: HISTVERIFY; Program

.. index:: single: NOHISTVERIFY; Program

.. index:: single: history, verifying substitution; Command

``HIST_VERIFY``
    
    Whenever the user enters a line with history expansion,
    don't execute the line directly; instead, perform
    history expansion and reload the line into the editing buffer.
    

.. index:: single: INC_APPEND_HISTORY; Program

.. index:: single: NO_INC_APPEND_HISTORY; Program

.. index:: single: INCAPPENDHISTORY; Program

.. index:: single: NOINCAPPENDHISTORY; Program

.. index:: single: history, incremental appending to a file; Command

``INC_APPEND_HISTORY``
    
    This option works like ``APPEND_HISTORY`` except that new history lines
    are added to the ``$HISTFILE`` incrementally (as soon as they are
    entered), rather than waiting until the shell exits.
    The file will still be periodically 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).
    

.. index:: single: INC_APPEND_HISTORY_TIME; Program

.. index:: single: NO_INC_APPEND_HISTORY_TIME; Program

.. index:: single: INCAPPENDHISTORYTIME; Program

.. index:: single: NOINCAPPENDHISTORYTIME; Program

.. index:: single: history, incremental appending to a file with time; Command

``INC_APPEND_HISTORY_TIME``
    
    This option is a variant of ``INC_APPEND_HISTORY`` in which, where
    possible, the history entry is written out to the file after the
    command is finished, so that the time taken by the command is recorded
    correctly in the history file in ``EXTENDED_HISTORY`` format.  This
    means that the history entry will not be available immediately from
    other instances of the shell that are using the same history file.
    
    This option is only useful if ``INC_APPEND_HISTORY`` and
    ``SHARE_HISTORY`` are turned off.  The three options should be
    considered mutually exclusive.
    

.. index:: single: SHARE_HISTORY; Program

.. index:: single: NO_SHARE_HISTORY; Program

.. index:: single: SHAREHISTORY; Program

.. index:: single: NOSHAREHISTORY; Program

.. index:: single: share history; Command

.. index:: single: history, sharing; Command

``SHARE_HISTORY`` <K>
    
    
    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 specifying ``INC_APPEND_HISTORY``, which should be turned
    off if this option is in effect).  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 commands
    get imported, you may wish to turn ``SHARE_HISTORY`` off,
    ``INC_APPEND_HISTORY`` or ``INC_APPEND_HISTORY_TIME`` (see above) on,
    and then manually import commands whenever you need them using ``fc
    -RI``.
    

Initialisation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: ALL_EXPORT; Program

.. index:: single: NO_ALL_EXPORT; Program

.. index:: single: ALLEXPORT; Program

.. index:: single: NOALLEXPORT; Program

.. index:: single: export, automatic; Command

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

.. index:: single: GLOBAL_EXPORT; Program

.. index:: single: NO_GLOBAL_EXPORT; Program

.. index:: single: GLOBALEXPORT; Program

.. index:: single: NOGLOBALEXPORT; Program

.. index:: single: environment, and local parameters; Command

``GLOBAL_EXPORT`` <Z>
    
    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 compatibility; 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.
    

.. index:: single: exporting, and local parameters; Command

.. index:: single: GLOBAL_RCS; Program

.. index:: single: NO_GLOBAL_RCS; Program

.. index:: single: GLOBALRCS; Program

.. index:: single: NOGLOBALRCS; Program

.. index:: single: startup files, global, inhibiting; Command

.. index:: single: files, global startup, inhibiting; Command

``GLOBAL_RCS`` (``+d``) <D>
    
    If this option is unset, the startup files ``/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``, etc.).
    

.. index:: single: RCS; Program

.. index:: single: NO_RCS; Program

.. index:: single: NORCS; Program

.. index:: single: startup files, sourcing; Command

``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 :zshsectref:`Startup/Shutdown Files <zsh>`.
    If this option is unset, the ``/etc/zshenv`` file is still sourced, but any
    of the others will not be; it can be set at any time to prevent the
    remaining startup files after the currently executing one from
    being sourced.
    

Input/Output
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: ALIASES; Program

.. index:: single: NO_ALIASES; Program

.. index:: single: NOALIASES; Program

.. index:: single: aliases, expansion; Command

``ALIASES`` <D>
    
    Expand aliases.
    

.. index:: single: CLOBBER; Program

.. index:: single: NO_CLOBBER; Program

.. index:: single: NOCLOBBER; Program

.. index:: single: clobbering, of files; Command

.. index:: single: file clobbering, allowing; Command

``CLOBBER`` (``+C``, ksh: ``+C``) <D>
    
    Allows ``>`` redirection to truncate existing files.
    Otherwise ``>!`` or ``>|`` must be used to truncate a file.
    
    If the option is not set, and the option ``APPEND_CREATE`` is also
    not set, ``>>!`` or ``>>|`` must be used to create a file.
    If either option is set, ``>>`` may be used.
    

.. index:: single: CLOBBER_EMPTY; Program

.. index:: single: NO_CLOBBER_EMPTY; Program

.. index:: single: CLOBBEREMPTY; Program

.. index:: single: NOCLOBBEREMPTY; Program

.. index:: single: clobbering, of empty files; Command

.. index:: single: file clobbering, of empty files; Command

``CLOBBER_EMPTY``
    
    This option is only used if the option ``CLOBBER`` is not set: note that
    it is set by default.
    
    If this option is set, then regular files of zero length may be
    overwritten (\`clobbered').  Note that it is possible another process
    has written to the file between this test and use of the file by
    the current process.  This option should therefore not be used in
    cases where files to be clobbered may be written to asynchronously.
    

.. index:: single: CORRECT; Program

.. index:: single: NO_CORRECT; Program

.. index:: single: NOCORRECT; Program

.. index:: single: correction, spelling; Command

.. index:: single: spelling correction; Command

``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 commands are used.
    
    Refer to the shell variable ``SPROMPT`` for an explanation of the
    ``[nyae]`` (no/yes/abort/edit) prompt that is offered.
    
    The shell variable ``CORRECT_IGNORE`` may be set to a pattern to
    match words that will never be offered as corrections.
    

.. index:: single: CORRECT_ALL; Program

.. index:: single: NO_CORRECT_ALL; Program

.. index:: single: CORRECTALL; Program

.. index:: single: NOCORRECTALL; Program

``CORRECT_ALL`` (``-O``)
    
    Try to correct the spelling of all arguments in a line, in order from
    left to right, treating each as a file name.  Answering ``a`` or
    ``e`` at any prompt stops all corrections, otherwise every correction
    is prompted for.
    
    The shell variable ``CORRECT_IGNORE_FILE`` may be set to a pattern to
    match file names that will never be offered as corrections.
    

.. index:: single: DVORAK; Program

.. index:: single: NO_DVORAK; Program

.. index:: single: NODVORAK; Program

``DVORAK``
    
    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.
    

.. index:: single: FLOW_CONTROL; Program

.. index:: single: NO_FLOW_CONTROL; Program

.. index:: single: FLOWCONTROL; Program

.. index:: single: NOFLOWCONTROL; Program

.. index:: single: flow control; Command

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

.. index:: single: IGNORE_EOF; Program

.. index:: single: NO_IGNORE_EOF; Program

.. index:: single: IGNOREEOF; Program

.. index:: single: NOIGNOREEOF; Program

.. index:: single: EOF, ignoring; Command

``IGNORE_EOF`` (``-7``)
    
    Do not exit on end-of-file.  Require the use
    of ``exit`` or ``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.
    

.. index:: single: INTERACTIVE_COMMENTS; Program

.. index:: single: NO_INTERACTIVE_COMMENTS; Program

.. index:: single: INTERACTIVECOMMENTS; Program

.. index:: single: NOINTERACTIVECOMMENTS; Program

.. index:: single: comments, in interactive shells; Command

``INTERACTIVE_COMMENTS`` (``-k``) <K> <S>
    
    Allow comments even in interactive shells.
    

.. index:: single: HASH_CMDS; Program

.. index:: single: NO_HASH_CMDS; Program

.. index:: single: HASHCMDS; Program

.. index:: single: NOHASHCMDS; Program

.. index:: single: hashing, of commands; Command

.. index:: single: command hashing; Command

``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.
    

.. index:: single: HASH_DIRS; Program

.. index:: single: NO_HASH_DIRS; Program

.. index:: single: HASHDIRS; Program

.. index:: single: NOHASHDIRS; Program

.. index:: single: hashing, of directories; Command

.. index:: single: directories, hashing; Command

``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.
    

.. index:: single: HASH_EXECUTABLES_ONLY; Program

.. index:: single: NO_HASH_EXECUTABLES_ONLY; Program

.. index:: single: HASHEXECUTABLESONLY; Program

.. index:: single: NOHASHEXECUTABLESONLY; Program

.. index:: single: hashing, of executables; Command

.. index:: single: executables, hashing; Command

``HASH_EXECUTABLES_ONLY``
    
    When hashing commands because of ``HASH_CMDS``, 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
    beneficial.
    

.. index:: single: MAIL_WARNING; Program

.. index:: single: NO_MAIL_WARNING; Program

.. index:: single: MAILWARNING; Program

.. index:: single: NOMAILWARNING; Program

.. index:: single: mail, warning of reading; Command

``MAIL_WARNING`` (``-U``)
    
    Print a warning message if a mail file has been
    accessed since the shell last checked.
    

.. index:: single: PATH_DIRS; Program

.. index:: single: NO_PATH_DIRS; Program

.. index:: single: PATHDIRS; Program

.. index:: single: NOPATHDIRS; Program

.. index:: single: path search, extended; Command

``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 command ``/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 ``.`` and ``source`` builtins.
    
    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.
    

.. index:: single: PATH_SCRIPT; Program

.. index:: single: NO_PATH_SCRIPT; Program

.. index:: single: PATHSCRIPT; Program

.. index:: single: NOPATHSCRIPT; Program

.. index:: single: path search, for script argument to shell; Command

``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 :zshsectref:`Invocation <zsh>`.
    

.. index:: single: PRINT_EIGHT_BIT; Program

.. index:: single: NO_PRINT_EIGHT_BIT; Program

.. index:: single: PRINTEIGHTBIT; Program

.. index:: single: NOPRINTEIGHTBIT; Program

.. index:: single: eight bit characters, printing; Command

``PRINT_EIGHT_BIT``
    
    Print eight bit characters literally in completion lists, etc.
    This option is not necessary if your system correctly returns the
    printability of eight bit characters (see :manpage:`ctype(3)`).
    

.. index:: single: PRINT_EXIT_VALUE; Program

.. index:: single: NO_PRINT_EXIT_VALUE; Program

.. index:: single: PRINTEXITVALUE; Program

.. index:: single: NOPRINTEXITVALUE; Program

.. index:: single: exit status, printing; Command

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

.. index:: single: RC_QUOTES; Program

.. index:: single: NO_RC_QUOTES; Program

.. index:: single: RCQUOTES; Program

.. index:: single: NORCQUOTES; Program

.. index:: single: rc, quoting style; Command

.. index:: single: quoting style, rc; Command

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

.. index:: single: RM_STAR_SILENT; Program

.. index:: single: NO_RM_STAR_SILENT; Program

.. index:: single: RMSTARSILENT; Program

.. index:: single: NORMSTARSILENT; Program

.. index:: single: rm *, querying before; Command

.. index:: single: querying before rm *; Command

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

.. index:: single: RM_STAR_WAIT; Program

.. index:: single: NO_RM_STAR_WAIT; Program

.. index:: single: RMSTARWAIT; Program

.. index:: single: NORMSTARWAIT; Program

.. index:: single: rm *, waiting before; Command

.. index:: single: waiting before rm *; Command

``RM_STAR_WAIT``
    
    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 reflexively 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).
    

.. index:: single: SHORT_LOOPS; Program

.. index:: single: NO_SHORT_LOOPS; Program

.. index:: single: SHORTLOOPS; Program

.. index:: single: NOSHORTLOOPS; Program

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

.. index:: single: SHORT_REPEAT; Program

.. index:: single: NO_SHORT_REPEAT; Program

.. index:: single: SHORTREPEAT; Program

.. index:: single: NOSHORTREPEAT; Program

``SHORT_REPEAT``
    
    Allow the short form ``repeat`` as ``SHORT_LOOPS`` but without enabling
    it for the other constructs.
    

.. index:: single: SUN_KEYBOARD_HACK; Program

.. index:: single: NO_SUN_KEYBOARD_HACK; Program

.. index:: single: SUNKEYBOARDHACK; Program

.. index:: single: NOSUNKEYBOARDHACK; Program

.. index:: single: sun keyboard, annoying; Command

.. index:: single: annoying keyboard, sun; Command

``SUN_KEYBOARD_HACK`` (``-L``)
    
    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 annoyingly close to it.
    As an alternative the variable ``KEYBOARD_HACK`` lets you choose the
    character to be removed.
    

Job Control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: AUTO_CONTINUE; Program

.. index:: single: NO_AUTO_CONTINUE; Program

.. index:: single: AUTOCONTINUE; Program

.. index:: single: NOAUTOCONTINUE; Program

.. index:: single: jobs, continuing automatically; Command

.. index:: single: continuing jobs automatically; Command

``AUTO_CONTINUE``
    
    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.
    

.. index:: single: AUTO_RESUME; Program

.. index:: single: NO_AUTO_RESUME; Program

.. index:: single: AUTORESUME; Program

.. index:: single: NOAUTORESUME; Program

.. index:: single: jobs, resuming automatically; Command

.. index:: single: resuming jobs automatically; Command

``AUTO_RESUME`` (``-W``)
    
    Treat single word simple commands without redirection
    as candidates for resumption of an existing job.
    

.. index:: single: BG_NICE; Program

.. index:: single: NO_BG_NICE; Program

.. index:: single: BGNICE; Program

.. index:: single: NOBGNICE; Program

.. index:: single: jobs, background priority; Command

.. index:: single: background jobs, priority of; Command

.. index:: single: priority of background jobs; Command

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

.. index:: single: CHECK_JOBS; Program

.. index:: single: NO_CHECK_JOBS; Program

.. index:: single: CHECKJOBS; Program

.. index:: single: NOCHECKJOBS; Program

.. index:: single: exiting, checking jobs when; Command

.. index:: single: logging out, checking jobs when; Command

``CHECK_JOBS`` <Z>
    
    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 previous 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 :zshsectref:`Special Functions <zshmisc>`
    is not counted for this purpose.
    

.. index:: single: CHECK_RUNNING_JOBS; Program

.. index:: single: NO_CHECK_RUNNING_JOBS; Program

.. index:: single: CHECKRUNNINGJOBS; Program

.. index:: single: NOCHECKRUNNINGJOBS; Program

.. index:: single: exiting, checking running jobs when; Command

.. index:: single: logging out, checking running jobs when; Command

``CHECK_RUNNING_JOBS`` <Z>
    
    Check for both running and suspended jobs when ``CHECK_JOBS`` is enabled.
    When this option is disabled, zsh checks only for suspended jobs, which
    matches the default behavior of bash.
    
    This option has no effect unless ``CHECK_JOBS`` is set.
    

.. index:: single: HUP; Program

.. index:: single: NO_HUP; Program

.. index:: single: NOHUP; Program

.. index:: single: jobs, HUP; Command

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

.. index:: single: LONG_LIST_JOBS; Program

.. index:: single: NO_LONG_LIST_JOBS; Program

.. index:: single: LONGLISTJOBS; Program

.. index:: single: NOLONGLISTJOBS; Program

.. index:: single: jobs, list format; Command

``LONG_LIST_JOBS`` (``-R``)
    
    Print job notifications in the long format by default.
    

.. index:: single: MONITOR; Program

.. index:: single: NO_MONITOR; Program

.. index:: single: NOMONITOR; Program

.. index:: single: job control, allowing; Command

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

.. index:: single: NOTIFY; Program

.. index:: single: NO_NOTIFY; Program

.. index:: single: NONOTIFY; Program

.. index:: single: background jobs, notification; Command

.. index:: single: notification of background jobs; Command

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

.. index:: single: POSIX_JOBS; Program

.. index:: single: POSIXJOBS; Program

.. index:: single: NO_POSIX_JOBS; Program

.. index:: single: NOPOSIXJOBS; Program

.. index:: single: bg, output in POSIX format; Command

.. index:: single: fg, output in POSIX format; Command

.. index:: single: job control, in subshell; Command

.. index:: single: jobs, output in subshell; Command

``POSIX_JOBS`` <K> <S>
    
    This option makes job control more compliant with the POSIX standard.
    
    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
    shell.
    
    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.
    
    In previous versions of the shell, it was necessary to enable
    ``POSIX_JOBS`` in order for the builtin command ``wait`` to return the
    status of background jobs that had already exited.  This is no longer
    the case.
    

Prompting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: PROMPT_BANG; Program

.. index:: single: NO_PROMPT_BANG; Program

.. index:: single: PROMPTBANG; Program

.. index:: single: NOPROMPTBANG; Program

.. index:: single: prompt, ! expansion; Command

``PROMPT_BANG`` <K>
    
    If set, ``!`` is treated specially in prompt expansion.
    See :zshsectref:`Expansion of Prompt Sequences <zshmisc>`.
    

.. index:: single: PROMPT_CR; Program

.. index:: single: NO_PROMPT_CR; Program

.. index:: single: PROMPTCR; Program

.. index:: single: NOPROMPTCR; Program

.. index:: single: prompt, with CR; Command

``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.
    

.. index:: single: PROMPT_SP; Program

.. index:: single: NO_PROMPT_SP; Program

.. index:: single: PROMPTSP; Program

.. index:: single: NOPROMPTSP; Program

.. index:: single: prompt, save partial lines; Command

``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.
    
    NOTE: if the ``PROMPT_CR`` option is not set, enabling this option will
    have no effect.  This option is on by default.
    

.. index:: single: PROMPT_PERCENT; Program

.. index:: single: NO_PROMPT_PERCENT; Program

.. index:: single: PROMPTPERCENT; Program

.. index:: single: NOPROMPTPERCENT; Program

.. index:: single: prompt, % expansion; Command

``PROMPT_PERCENT`` <C> <Z>
    
    If set, ``%`` is treated specially in prompt expansion.
    See :zshsectref:`Expansion of Prompt Sequences <zshmisc>`.
    

.. index:: single: PROMPT_SUBST; Program

.. index:: single: NO_PROMPT_SUBST; Program

.. index:: single: PROMPTSUBST; Program

.. index:: single: NOPROMPTSUBST; Program

.. index:: single: prompt, parameter expansion; Command

``PROMPT_SUBST`` <K> <S>
    
    If set, :emphasis:`parameter expansion`, :emphasis:`command substitution` and
    :emphasis:`arithmetic expansion` are performed in prompts.  Substitutions
    within prompts do not affect the command status.
    

.. index:: single: TRANSIENT_RPROMPT; Program

.. index:: single: NO_TRANSIENT_RPROMPT; Program

.. index:: single: TRANSIENTRPROMPT; Program

.. index:: single: NOTRANSIENTRPROMPT; Program

``TRANSIENT_RPROMPT``
    
    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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: ALIAS_FUNC_DEF; Program

.. index:: single: NO_ALIAS_FUNC_DEF; Program

.. index:: single: ALIASFUNCDEF; Program

.. index:: single: NOALIASFUNCDEF; Program

.. index:: single: functions, defining with expanded aliases; Command

.. index:: single: aliases, expanding in function definition; Command

``ALIAS_FUNC_DEF`` <S>
    
    By default, zsh does not allow the definition of functions using
    the :var:`name` ``()`` syntax if :var:`name` was expanded as an
    alias: this causes an error.  This is usually the desired behaviour, as
    otherwise the combination of an alias and a function based on the same
    definition can easily cause problems.
    
    When this option is set, aliases can be used for defining functions.
    
    For example, consider the following definitions as they might
    occur in a startup file.
    
    
    .. code-block:: zsh
       :class: example

        alias foo=bar
        foo() {
          print This probably does not do what you expect.
        }
    
    
    Here, ``foo`` is expanded as an alias to ``bar`` before the
    ``()`` is encountered, so the function defined would be named
    ``bar``.  By default this is instead an error in native mode.  Note that
    quoting any part of the function name, or using the keyword
    ``function``, avoids the problem, so is recommended when the function
    name can also be an alias.
    

.. index:: single: C_BASES; Program

.. index:: single: NO_C_BASES; Program

.. index:: single: CBASES; Program

.. index:: single: NOCBASES; Program

.. index:: single: bases, output in C format; Command

.. index:: single: hexadecimal, output in C format; Command

.. index:: single: octal, output in C format; Command

``C_BASES``
    
    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``.
    

.. index:: single: C_PRECEDENCES; Program

.. index:: single: NO_C_PRECEDENCES; Program

.. index:: single: CPRECEDENCES; Program

.. index:: single: NOCPRECEDENCES; Program

.. index:: single: precedence, operator; Command

.. index:: single: operator precedence; Command

``C_PRECEDENCES``
    
    This alters the precedence of arithmetic operators to be more
    like C and other programming languages;
    :zshsectref:`Arithmetic Evaluation <zshmisc>`
    has an explicit list.
    

.. index:: single: DEBUG_BEFORE_CMD; Program

.. index:: single: NO_DEBUG_BEFORE_CMD; Program

.. index:: single: DEBUGBEFORECMD; Program

.. index:: single: NODEBUGBEFORECMD; Program

.. index:: single: traps, DEBUG, before or after command; Command

.. index:: single: DEBUG trap, before or after command; Command

``DEBUG_BEFORE_CMD`` <D>
    
    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 behaviour is that of ksh 88.
    

.. index:: single: ERR_EXIT; Program

.. index:: single: NO_ERR_EXIT; Program

.. index:: single: ERREXIT; Program

.. index:: single: NOERREXIT; Program

.. index:: single: exit status, trapping; Command

``ERR_EXIT`` (``-e``, ksh: ``-e``)
    
    If a command has a non-zero exit status, execute the ``ZERR``
    trap, if set, and exit.
    
    The option is ignored when executing the commands following ``while``,
    ``until``, ``if``, or ``elif``, a pipeline beginning with ``!``, or
    any command other than the last in command list containing ``&&`` or
    ``||``.  Hence neither ``if foo; then true; fi``, nor ``foo &&
    true ``trigger exit when`` foo`` returns with a non-zero exit status.
    Note that if ``foo`` is a function, the option is also ignored during
    its whole execution.
    
    The option is also ignored when executing a complex command (``if``,
    ``for``, ``while``, ``until``, ``repeat``, ``case``, ``select``,
    ``always``, or a list in braces) if its exit status comes from a
    command executed while the option is ignored. Hence, the ``if``
    command in ``if true; then false && true; fi`` does not trigger
    exit.
    
    Finally, the option is also ignored while running initialization
    scripts and inside ``DEBUG`` traps.  In the latter 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 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 :zshsectref:`Signals <zshmisc>`.
    
    Note this behaviour is not disabled in interactive shells ---
    a non-zero status on the command line causes the shell to exit.
    

.. index:: single: ERR_RETURN; Program

.. index:: single: NO_ERR_RETURN; Program

.. index:: single: ERRRETURN; Program

.. index:: single: NOERRRETURN; Program

.. index:: single: function return, on error; Command

.. index:: single: return from function, on error; Command

``ERR_RETURN``
    
    If a command has a non-zero exit status, return immediately from the
    enclosing function. Except as explained below, an implicit ``return``
    statement is executed following the same logic described for
    ``ERR_EXIT``. This will trigger an exit at the outermost level of a
    non-interactive script.  At the top level of an interactive shell, it
    will trigger a return to the command prompt; in other words, the
    sequence of commands typed by the user may be thought of as a function
    for this purpose.
    
    Unlike for ``ERR_EXIT``, when a function is called while the option is
    being ignored, the option is NOT ignored during the execution of the
    function.  Hence, if ``foo`` in ``foo && true`` is a function, code
    inside it is considered separately: it may force a return from ``foo``
    (assuming the option remains set within ``foo``).
    
    Like for ``ERR_EXIT``, the option is ignored inside ``DEBUG`` traps
    but it's not unset on entry to the trap and setting or unsetting it
    inside the trap has no special effect.
    
    If ``ERR_RETURN`` and ``ERR_EXIT`` are both set, it may happen that
    both exit and return should be triggered. In that case only exit is
    triggered.
    

.. index:: single: EVAL_LINENO; Program

.. index:: single: NO_EVAL_LINENO; Program

.. index:: single: EVALLINENO; Program

.. index:: single: NOEVALLINENO; Program

.. index:: single: line number, in evaluated expression; Command

``EVAL_LINENO`` <Z>
    
    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 typically 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.
    

.. index:: single: EXEC; Program

.. index:: single: NO_EXEC; Program

.. index:: single: NOEXEC; Program

.. index:: single: command execution, enabling; Command

``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 startup.
    

.. index:: single: FUNCTION_ARGZERO; Program

.. index:: single: NO_FUNCTION_ARGZERO; Program

.. index:: single: FUNCTIONARGZERO; Program

.. index:: single: NOFUNCTIONARGZERO; Program

.. index:: single: $0, setting; Command

``FUNCTION_ARGZERO`` <C> <Z>
    
    When executing a shell function or sourcing a script, set ``$0``
    temporarily to the name of the function/script.  Note that toggling
    ``FUNCTION_ARGZERO`` from on to off (or off to on) does not change the
    current value of ``$0``.  Only the state upon entry to the function or
    script has an effect.  Compare ``POSIX_ARGZERO``.
    

.. index:: single: LOCAL_LOOPS; Program

.. index:: single: NO_LOCAL_LOOPS; Program

.. index:: single: LOCALLOOPS; Program

.. index:: single: NOLOCALLOOPS; Program

.. index:: single: break, inside function; Command

.. index:: single: continue, inside function; Command

.. index:: single: function, scope of break and continue; Command

``LOCAL_LOOPS``
    
    When this option is not set, the effect of ``break`` and ``continue``
    commands may propagate outside function scope, affecting loops in
    calling functions.  When the option is set in a calling function, a
    ``break`` or a ``continue`` that is not caught within a called function
    (regardless of the setting of the option within that function)
    produces a warning and the effect is cancelled.
    

.. index:: single: LOCAL_OPTIONS; Program

.. index:: single: NO_LOCAL_OPTIONS; Program

.. index:: single: LOCALOPTIONS; Program

.. index:: single: NOLOCALOPTIONS; Program

``LOCAL_OPTIONS`` <K>
    
    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; the ``PRIVILEGED`` option is not restored.
    Otherwise, only this option,
    and the ``LOCAL_LOOPS``, ``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``.
    

.. index:: single: LOCAL_PATTERNS; Program

.. index:: single: NO_LOCAL_PATTERNS; Program

.. index:: single: LOCALPATTERNS; Program

.. index:: single: NOLOCALPATTERNS; Program

``LOCAL_PATTERNS``
    
    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 behaviour 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) activates
    ``LOCAL_PATTERNS``.
    

.. index:: single: LOCAL_TRAPS; Program

.. index:: single: NO_LOCAL_TRAPS; Program

.. index:: single: LOCALTRAPS; Program

.. index:: single: NOLOCALTRAPS; Program

``LOCAL_TRAPS`` <K>
    
    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 :emphasis:`prior` to altering the
    trap behaviour in a function; unlike ``LOCAL_OPTIONS``, the value on exit
    from the function is irrelevant.  However, it does not need to be set
    before any global trap for that to be correctly restored by a function.
    For example,
    
    
    .. code-block:: zsh
       :class: example

        unsetopt localtraps
        trap - INT
        fn() { setopt localtraps; trap '' INT; sleep 3; }
    
    
    will restore normal handling of ``SIGINT`` after the function exits.
    

.. index:: single: MULTI_FUNC_DEF; Program

.. index:: single: NO_MULTI_FUNC_DEF; Program

.. index:: single: MULTIFUNCDEF; Program

.. index:: single: NOMULTIFUNCDEF; Program

``MULTI_FUNC_DEF`` <Z>
    
    Allow definitions of multiple functions at once in the form ``fn1
    fn2``:var:`...``\`()``; 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.
    
    Note that no error is raised if multiple functions are defined as a
    result of a set of names that were originally read as a single word on
    the command line, for example ``TRAP{INT,QUIT}``.  Although there are
    no plans to change this behaviour at present, it is not guaranteed.
    

.. index:: single: MULTIOS; Program

.. index:: single: NO_MULTIOS; Program

.. index:: single: NOMULTIOS; Program

``MULTIOS`` <Z>
    
    Perform implicit :strong:`tee`\s or :strong:`cat`\s when multiple
    redirections are attempted (see :zshsectref:`Redirection <zshmisc>`).
    

.. index:: single: OCTAL_ZEROES; Program

.. index:: single: NO_OCTAL_ZEROES; Program

.. index:: single: OCTALZEROES; Program

.. index:: single: NOOCTALZEROES; Program

.. index:: single: octal, arithmetic expressions; Command

``OCTAL_ZEROES`` <S>
    
    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.
    

.. index:: single: PIPE_FAIL; Program

.. index:: single: NO_PIPE_FAIL; Program

.. index:: single: PIPEFAIL; Program

.. index:: single: NOPIPEFAIL; Program

.. index:: single: exit status from pipeline; Command

.. index:: single: status, on exit from pipeline; Command

.. index:: single: pipeline, exit status from; Command

``PIPE_FAIL``
    
    By default, when a pipeline exits the exit status recorded by the shell
    and returned by the shell variable ``$?`` 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.
    

.. index:: single: SOURCE_TRACE; Program

.. index:: single: NO_SOURCE_TRACE; Program

.. index:: single: SOURCETRACE; Program

.. index:: single: NOSOURCETRACE; Program

``SOURCE_TRACE``
    
    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.
    

.. index:: single: TYPESET_SILENT; Program

.. index:: single: NO_TYPESET_SILENT; Program

.. index:: single: TYPESETSILENT; Program

.. index:: single: NOTYPESETSILENT; Program

``TYPESET_SILENT``
    
    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.
    

.. index:: single: TYPESET_TO_UNSET; Program

.. index:: single: NO_TYPESET_TO_UNSET; Program

.. index:: single: TYPESETTOUNSET; Program

.. index:: single: NOTYPESETTOUNSET; Program

``TYPESET_TO_UNSET`` <K> <S>
    
    When declaring a new parameter with any of the ``typeset`` family of
    related commands, the parameter remains unset unless and until a
    value is explicitly assigned to it, either in the ``typeset`` command
    itself or as a later assignment statement.
    

.. index:: single: VERBOSE; Program

.. index:: single: NO_VERBOSE; Program

.. index:: single: NOVERBOSE; Program

.. index:: single: tracing, of input lines; Command

.. index:: single: input, tracing; Command

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

.. index:: single: XTRACE; Program

.. index:: single: NO_XTRACE; Program

.. index:: single: NOXTRACE; Program

.. index:: single: tracing, of commands; Command

.. index:: single: commands, tracing; Command

``XTRACE`` (``-x``, ksh: ``-x``)
    
    Print commands and their arguments as they are executed.  The
    output is preceded by the value of ``$PS4``, formatted as described
    in :zshsectref:`Expansion of Prompt Sequences <zshmisc>`.
    

Shell Emulation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: APPEND_CREATE; Program

.. index:: single: NO_APPEND_CREATE; Program

.. index:: single: APPENDCREATE; Program

.. index:: single: NOAPPENDCREATE; Program

.. index:: single: clobbering, POSIX compatibility; Command

.. index:: single: file clobbering, POSIX compatibility; Command

.. index:: single: no clobber, POSIX compatible; Command

``APPEND_CREATE`` <K> <S>
    
    This option only applies when ``NO_CLOBBER`` (-``C``) is in effect.
    
    If this option is not set, the shell will report an error when a
    append redirection (``>>``) is used on a file that does not already
    exists (the traditional zsh behaviour of ``NO_CLOBBER``).  If the option
    is set, no error is reported (POSIX behaviour).
    

.. index:: single: BASH_REMATCH; Program

.. index:: single: NO_BASH_REMATCH; Program

.. index:: single: BASHREMATCH; Program

.. index:: single: NOBASHREMATCH; Program

.. index:: single: bash, BASH_REMATCH variable; Command

.. index:: single: regexp, bash BASH_REMATCH variable; Command

``BASH_REMATCH``
    
    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.
    

.. index:: single: BSD_ECHO; Program

.. index:: single: NO_BSD_ECHO; Program

.. index:: single: BSDECHO; Program

.. index:: single: NOBSDECHO; Program

.. index:: single: echo, BSD compatible; Command

``BSD_ECHO`` <S>
    
    Make the ``echo`` builtin compatible with the BSD :manpage:`echo(1)` command.
    This disables backslashed escape sequences in echo strings unless the
    ``-e`` option is specified.
    

.. index:: single: CONTINUE_ON_ERROR; Program

.. index:: single: NO_CONTINUE_ON_ERROR; Program

.. index:: single: CONTINUEONERROR; Program

.. index:: single: NOCONTINUEONERROR; Program

.. index:: single: error, option to continue script on; Command

``CONTINUE_ON_ERROR``
    
    If a fatal error is encountered (see :zshsectref:`Errors <zshmisc>`),
    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 versions
    of zsh before 5.0.1.
    

.. index:: single: CSH_JUNKIE_HISTORY; Program

.. index:: single: NO_CSH_JUNKIE_HISTORY; Program

.. index:: single: CSHJUNKIEHISTORY; Program

.. index:: single: NOCSHJUNKIEHISTORY; Program

.. index:: single: csh, history style; Command

.. index:: single: history style, csh; Command

``CSH_JUNKIE_HISTORY`` <C>
    
    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 on the current 
    command line, defaulting to the previous command.
    

.. index:: single: CSH_JUNKIE_LOOPS; Program

.. index:: single: NO_CSH_JUNKIE_LOOPS; Program

.. index:: single: CSHJUNKIELOOPS; Program

.. index:: single: NOCSHJUNKIELOOPS; Program

.. index:: single: csh, loop style; Command

.. index:: single: loop style, csh; Command

``CSH_JUNKIE_LOOPS`` <C>
    
    Allow loop bodies to take the form :var:`list`\ ``; end`` instead of
    ``do`` :var:`list`\ ``; done``.
    

.. index:: single: CSH_JUNKIE_QUOTES; Program

.. index:: single: NO_CSH_JUNKIE_QUOTES; Program

.. index:: single: CSHJUNKIEQUOTES; Program

.. index:: single: NOCSHJUNKIEQUOTES; Program

.. index:: single: csh, quoting style; Command

.. index:: single: quoting style, csh; Command

``CSH_JUNKIE_QUOTES`` <C>
    
    Changes the rules for single- and double-quoted text to match that of
    :strong:`csh`.  These require that embedded newlines 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 substitutions are only expanded once, and cannot be nested.
    

.. index:: single: CSH_NULLCMD; Program

.. index:: single: NO_CSH_NULLCMD; Program

.. index:: single: CSHNULLCMD; Program

.. index:: single: NOCSHNULLCMD; Program

.. index:: single: NULLCMD, ignoring; Variable

.. index:: single: READNULLCMD, ignoring; Variable

.. index:: single: redirections with no command, csh; Command

.. index:: single: csh, redirections with no command; Command

``CSH_NULLCMD`` <C>
    
    Do not use the values of ``NULLCMD`` and ``READNULLCMD`` 
    when running redirections with no command.  This make 
    such redirections fail (see :zshsectref:`Redirection <zshmisc>`).
    

.. index:: single: KSH_ARRAYS; Program

.. index:: single: NO_KSH_ARRAYS; Program

.. index:: single: KSHARRAYS; Program

.. index:: single: NOKSHARRAYS; Program

.. index:: single: arrays, ksh style; Command

.. index:: single: array style, ksh; Command

.. index:: single: ksh, array style; Command

``KSH_ARRAYS`` <K> <S>
    
    Emulate :strong:`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]``) or to apply modifiers to any parameter
    (``${PWD:h}`` rather than ``$PWD:h``).
    

.. index:: single: KSH_AUTOLOAD; Program

.. index:: single: NO_KSH_AUTOLOAD; Program

.. index:: single: KSHAUTOLOAD; Program

.. index:: single: NOKSHAUTOLOAD; Program

``KSH_AUTOLOAD`` <K> <S>
    
    Emulate :strong:`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 :strong:`ksh`-style case - of the file
    containing only a simple definition of the function - is always handled
    in the :strong:`ksh`-compatible manner.)
    

.. index:: single: KSH_OPTION_PRINT; Program

.. index:: single: NO_KSH_OPTION_PRINT; Program

.. index:: single: KSHOPTIONPRINT; Program

.. index:: single: NOKSHOPTIONPRINT; Program

.. index:: single: option printing, ksh style; Command

.. index:: single: option printing style, ksh; Command

.. index:: single: ksh, option printing style; Command

``KSH_OPTION_PRINT`` <K>
    
    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.
    

.. index:: single: KSH_TYPESET; Program

.. index:: single: NO_KSH_TYPESET; Program

.. index:: single: KSHTYPESET; Program

.. index:: single: NOKSHTYPESET; Program

.. index:: single: argument splitting, in typeset etc.; Command

.. index:: single: ksh, argument splitting in typeset; Command

``KSH_TYPESET``
    
    This option is now obsolete: a better approximation to the behaviour of
    other shells is obtained with the reserved word interface to
    ``declare``, ``export``, ``float``, ``integer``, ``local``, ``readonly``
    and ``typeset``.  Note that the option is only applied when the reserved
    word interface is :emphasis:`not` in use.
    
    Alters the way arguments to the ``typeset`` family of commands, 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.
    

.. index:: single: KSH_ZERO_SUBSCRIPT; Program

.. index:: single: NO_KSH_ZERO_SUBSCRIPT; Program

.. index:: single: KSHZEROSUBSCRIPT; Program

.. index:: single: NOKSHZEROSUBSCRIPT; Program

.. index:: single: arrays, behaviour of index zero; Command

``KSH_ZERO_SUBSCRIPT``
    
    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,
    
    
    .. code-block:: zsh
       :class: example

        array[0]=(element)
    
    
    is an error, while
    
    
    .. code-block:: zsh
       :class: example

        array[0,1]=(element)
    
    
    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.
    

.. index:: single: POSIX_ALIASES; Program

.. index:: single: NO_POSIX_ALIASES; Program

.. index:: single: POSIXALIASES; Program

.. index:: single: NOPOSIXALIASES; Program

``POSIX_ALIASES`` <K> <S>
    
    When this option is set, reserved words are not candidates 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
    :zshsectref:`Reserved Words <zshmisc>`.
    
    Alias expansion takes place while text is being read; hence when this
    option is set it does not take effect until the end of any function or
    other piece of shell code parsed as one unit.  Note this may
    cause differences 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 command 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-interactive
    code.
    

.. index:: single: POSIX_ARGZERO; Program

.. index:: single: NO_POSIX_ARGZERO; Program

.. index:: single: POSIXARGZERO; Program

.. index:: single: NOPOSIXARGZERO; Program

.. index:: single: $0, using; Command

``POSIX_ARGZERO``
    
    This option may be used to temporarily disable ``FUNCTION_ARGZERO`` and
    thereby restore the value of ``$0`` to the name used to invoke the shell
    (or as set by the ``-c`` command line option).  For compatibility with
    previous versions of the shell, emulations use ``NO_FUNCTION_ARGZERO``
    instead of ``POSIX_ARGZERO``, which may result in unexpected scoping of
    ``$0`` if the emulation mode is changed inside a function or script.
    To avoid this, explicitly enable ``POSIX_ARGZERO`` in the ``emulate``
    command:
    
    
    .. code-block:: zsh
       :class: example

        emulate sh -o POSIX_ARGZERO
    
    
    Note that ``NO_POSIX_ARGZERO`` has no effect unless ``FUNCTION_ARGZERO``
    was already enabled upon entry to the function or script.
    

.. index:: single: POSIX_BUILTINS; Program

.. index:: single: NO_POSIX_BUILTINS; Program

.. index:: single: POSIXBUILTINS; Program

.. index:: single: NOPOSIXBUILTINS; Program

``POSIX_BUILTINS`` <K> <S>
    
    When this option is set the ``command`` builtin can be used to execute
    shell builtin commands.  Parameter assignments 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.
    
    Furthermore, functions and shell builtins are not executed after
    an ``exec`` prefix; the command to be executed must be an external
    command found in the path.
    
    Moreover, the warning and special exit code from
    ``[[ -o`` :var:`non_existent_option` ``]]`` are suppressed.
    
    Other builtins may be affected as described in
    
    .. only:: man

        :manpage:`zshbuiltins(1)`

    
    .. only:: not man

        :ref:`Shell Builtin Commands`

    .
    

.. index:: single: POSIX_IDENTIFIERS; Program

.. index:: single: NO_POSIX_IDENTIFIERS; Program

.. index:: single: POSIXIDENTIFIERS; Program

.. index:: single: NOPOSIXIDENTIFIERS; Program

.. index:: single: identifiers, non-portable characters in; Command

.. index:: single: parameter names, non-portable characters in; Command

``POSIX_IDENTIFIERS`` <K> <S>
    
    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).
    
    In addition, setting this option limits the effect of parameter
    substitution with no braces, so that the expression ``$#`` is treated as
    the parameter ``$#`` even if followed by a valid parameter name.
    When it is unset, zsh allows expressions of the form ``$#``:var:`name`
    to refer to the length of ``$``:var:`name`, even for special variables,
    for example in expressions such as ``$#-`` and ``$#*``.
    
    Another difference is that with the option set assignment to an
    unset variable in arithmetic context causes the variable to be created
    as a scalar rather than a numeric type.  So after ``unset t; (( t = 3
    ))``, without`` POSIX_IDENTIFIERS ``set`` t`` has integer type, while with
    it set it has scalar type.
    
    When the option is unset and multibyte character support 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 :var:`variable`\ ``=``:var:`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-standard but is the traditional zsh behaviour.
    

.. index:: single: POSIX_STRINGS; Program

.. index:: single: NO_POSIX_STRINGS; Program

.. index:: single: POSIXSTRINGS; Program

.. index:: single: NOPOSIXSTRINGS; Program

.. index:: single: discarding embedded nulls in $'...'; Command

.. index:: single: embedded nulls, in $'...'; Command

.. index:: single: nulls, embedded in $'...'; Command

``POSIX_STRINGS`` <K> <S>
    
    This option affects processing of quoted strings.  Currently it only
    affects the behaviour of null characters, i.e. character 0 in the
    portable character set corresponding to US ASCII.
    
    When this option is not set, null characters embedded within strings
    of the form ``$'``:var:`...`\ ``'`` are treated as ordinary 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 external programs.
    
    When this option is set, the ``$'``:var:`...`\ ``'`` expression is truncated at
    the null character.  Note that remaining parts of the same string
    beyond the termination of the quotes are not truncated.
    
    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``.
    

.. index:: single: POSIX_TRAPS; Program

.. index:: single: NO_POSIX_TRAPS; Program

.. index:: single: POSIXTRAPS; Program

.. index:: single: NOPOSIXTRAPS; Program

.. index:: single: traps, on function exit; Command

.. index:: single: traps, POSIX compatibility; Command

``POSIX_TRAPS`` <K> <S>
    
    When this 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.
    
    Also, a ``return`` statement executed in a trap with no argument passes
    back from the function the value from the surrounding context, not from
    code executed within the trap.
    
    Furthermore, if a trap is set to be ignored, this state persists when
    a subshell is entered.  Without the option, the trap would be reset to
    its default state at this point.
    

.. index:: single: SH_FILE_EXPANSION; Program

.. index:: single: NO_SH_FILE_EXPANSION; Program

.. index:: single: SHFILEEXPANSION; Program

.. index:: single: NOSHFILEEXPANSION; Program

.. index:: single: sh, expansion style; Command

.. index:: single: expansion style, sh; Command

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

.. index:: single: SH_NULLCMD; Program

.. index:: single: NO_SH_NULLCMD; Program

.. index:: single: SHNULLCMD; Program

.. index:: single: NOSHNULLCMD; Program

.. index:: single: NULLCMD, ignoring; Variable

.. index:: single: READNULLCMD, ignoring; Variable

.. index:: single: sh, redirections with no command; Command

.. index:: single: ksh, redirections with no command; Command

.. index:: single: redirections with no command, sh; Command

.. index:: single: redirections with no command, ksh; Command

``SH_NULLCMD`` <K> <S>
    
    Do not use the values of ``NULLCMD`` and ``READNULLCMD`` 
    when doing redirections, use ``:`` instead (see :zshsectref:`Redirection <zshmisc>`).
    

.. index:: single: SH_OPTION_LETTERS; Program

.. index:: single: NO_SH_OPTION_LETTERS; Program

.. index:: single: SHOPTIONLETTERS; Program

.. index:: single: NOSHOPTIONLETTERS; Program

.. index:: single: sh, single letter options style; Command

.. index:: single: ksh, single letter options style; Command

.. index:: single: single letter options, ksh style; Command

.. index:: single: options, single letter, ksh style; Command

``SH_OPTION_LETTERS`` <K> <S>
    
    If this option is set the shell tries to interpret single letter options
    (which are used with ``set`` and ``setopt``) like :strong:`ksh` does.
    This also affects the value of the ``-`` special parameter.
    

.. index:: single: SH_WORD_SPLIT; Program

.. index:: single: NO_SH_WORD_SPLIT; Program

.. index:: single: SHWORDSPLIT; Program

.. index:: single: NOSHWORDSPLIT; Program

.. index:: single: field splitting, sh style; Command

.. index:: single: sh, field splitting style; Command

``SH_WORD_SPLIT`` (``-y``) <K> <S>
    
    Causes field splitting to be performed on unquoted parameter expansions.
    Note that this option has nothing to do with word splitting.
    (See :zshsectref:`Parameter Expansion <zshexpn>`.)
    

.. index:: single: TRAPS_ASYNC; Program

.. index:: single: NO_TRAPS_ASYNC; Program

.. index:: single: TRAPSASYNC; Program

.. index:: single: NOTRAPSASYNC; Program

.. index:: single: traps, asynchronous; Command

``TRAPS_ASYNC``
    
    While waiting for a program to exit, handle signals and 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: INTERACTIVE; Program

.. index:: single: NO_INTERACTIVE; Program

.. index:: single: NOINTERACTIVE; Program

``INTERACTIVE`` (``-i``, ksh: ``-i``)
    
    This is an interactive shell.  This option is set upon initialisation if
    the standard input is a tty and commands are being read from standard input.
    (See the discussion of ``SHIN_STDIN``.)
    This heuristic may be overridden 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.
    

.. index:: single: LOGIN; Program

.. index:: single: NO_LOGIN; Program

.. index:: single: NOLOGIN; Program

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

.. index:: single: PRIVILEGED; Program

.. index:: single: NO_PRIVILEGED; Program

.. index:: single: NOPRIVILEGED; Program

.. index:: single: privileged mode; Command

.. index:: single: mode, privileged; Command

``PRIVILEGED`` (``-p``, ksh: ``-p``)
    
    Turn on privileged mode. Typically this is used when script is to be run
    with elevated privileges. This should be done as follows directly with
    the ``-p`` option to zsh so that it takes effect during startup.
    
    
    .. code-block:: zsh
       :class: example

        #!/bin/zsh -p
    
    
    The option is enabled automatically on startup if the effective user
    (group) ID is not equal to the real user (group) ID. In this case,
    turning the option off causes the effective user and group IDs to be set
    to the real user and group IDs. Be aware that if that fails the shell may
    be running with different IDs than was intended so a script should check
    for failure and act accordingly, for example:
    
    
    .. code-block:: zsh
       :class: example

        unsetopt privileged || exit
    
    
    The ``PRIVILEGED`` 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 changing it inside a
    function always changes it globally regardless of the ``LOCAL_OPTIONS``
    option.
    

.. index:: single: SHIN_STDIN; Program

.. index:: single: NO_SHIN_STDIN; Program

.. index:: single: SHINSTDIN; Program

.. index:: single: NOSHINSTDIN; Program

``SHIN_STDIN`` (``-s``, ksh: ``-s``)
    
    Commands are being read from the standard input.
    Commands 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 positional
    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
    running - that is purely an indicator of whether or not commands are
    :emphasis:`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.
    

.. index:: single: SINGLE_COMMAND; Program

.. index:: single: NO_SINGLE_COMMAND; Program

.. index:: single: SINGLECOMMAND; Program

.. index:: single: NOSINGLECOMMAND; Program

.. index:: single: single command; Command

.. index:: single: INTERACTIVE, use of; Program

``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 supplied at
    invocation of the shell.
    It cannot be changed once zsh is running.
    

Zle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. index:: single: BEEP; Program

.. index:: single: NO_BEEP; Program

.. index:: single: NOBEEP; Program

.. index:: single: beep, enabling; Command

.. index:: single: enabling the beep; Command

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

.. index:: single: COMBINING_CHARS; Program

.. index:: single: NO_COMBINING_CHARS; Program

.. index:: single: COMBININGCHARS; Program

.. index:: single: NOCOMBININGCHARS; Program

.. index:: single: characters, (Unicode) combining; Command

.. index:: single: combining characters (Unicode); Command

.. index:: single: Unicode combining characters; Command

``COMBINING_CHARS``
    
    Assume that the terminal displays combining characters correctly.
    Specifically, if a base alphanumeric character 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.
    

.. index:: single: EMACS; Program

.. index:: single: NO_EMACS; Program

.. index:: single: NOEMACS; Program

``EMACS``
    
    If ZLE is loaded, turning on this option has the equivalent 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, and the ``LOCALOPTIONS``
    option does not work correctly. This option is provided only for
    compatibility, and its use is highly discouraged.  ``bindkey`` is the
    recommended interface.
    

.. index:: single: OVERSTRIKE; Program

.. index:: single: NO_OVERSTRIKE; Program

.. index:: single: NOOVERSTRIKE; Program

.. index:: single: editor, overstrike mode; Command

.. index:: single: overstrike mode, of editor; Command

``OVERSTRIKE``
    
    Start up the line editor in overstrike mode.
    

.. index:: single: SINGLE_LINE_ZLE; Program

.. index:: single: NO_SINGLE_LINE_ZLE; Program

.. index:: single: SINGLELINEZLE; Program

.. index:: single: NOSINGLELINEZLE; Program

.. index:: single: editor, single line mode; Command

``SINGLE_LINE_ZLE`` (``-M``) <K>
    
    Use single-line command line editing instead of multi-line.
    
    Note that although this is on by default in ksh emulation it only
    provides superficial compatibility with the ksh line editor and
    reduces the effectiveness of the zsh line editor.  As it has no
    effect on shell syntax, many users may wish to disable this option
    when using ksh emulation interactively.
    

.. index:: single: VI; Program

.. index:: single: NO_VI; Program

.. index:: single: NOVI; Program

``VI``
    
    If ZLE is loaded, turning on this option has the equivalent 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, and the ``LOCALOPTIONS``
    option does not work correctly. This option is provided only for
    compatibility, and its use is highly discouraged.  ``bindkey`` is the
    recommended interface.
    

.. index:: single: ZLE; Program

.. index:: single: NO_ZLE; Program

.. index:: single: NOZLE; Program

.. index:: single: editor, enabling; Command

.. index:: single: enabling the editor; Command

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

.. historic nodename: Option Aliases

Option Aliases
--------------------------------------------------------------------------------
.. index:: single: options, aliases; Command

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.

.. index:: single: BRACE_EXPAND; Program

.. index:: single: NO_BRACE_EXPAND; Program

.. index:: single: BRACEEXPAND; Program

.. index:: single: NOBRACEEXPAND; Program

``BRACE_EXPAND``
    
    :emphasis:`NO_`\ ``IGNORE_BRACES``
    (ksh and bash compatibility)
    

.. index:: single: DOT_GLOB; Program

.. index:: single: NO_DOT_GLOB; Program

.. index:: single: DOTGLOB; Program

.. index:: single: NODOTGLOB; Program

``DOT_GLOB``
    
    ``GLOB_DOTS``
    (bash compatibility)
    

.. index:: single: HASH_ALL; Program

.. index:: single: NO_HASH_ALL; Program

.. index:: single: HASHALL; Program

.. index:: single: NOHASHALL; Program

``HASH_ALL``
    
    ``HASH_CMDS``
    (bash compatibility)
    

.. index:: single: HIST_APPEND; Program

.. index:: single: NO_HIST_APPEND; Program

.. index:: single: HISTAPPEND; Program

.. index:: single: NOHISTAPPEND; Program

``HIST_APPEND``
    
    ``APPEND_HISTORY``
    (bash compatibility)
    

.. index:: single: HIST_EXPAND; Program

.. index:: single: NO_HIST_EXPAND; Program

.. index:: single: HISTEXPAND; Program

.. index:: single: NOHISTEXPAND; Program

``HIST_EXPAND``
    
    ``BANG_HIST``
    (bash compatibility)
    

.. index:: single: LOG; Program

.. index:: single: NO_LOG; Program

.. index:: single: NOLOG; Program

``LOG``
    
    :emphasis:`NO_`\ ``HIST_NO_FUNCTIONS``
    (ksh compatibility)
    

.. index:: single: MAIL_WARN; Program

.. index:: single: NO_MAIL_WARN; Program

.. index:: single: MAILWARN; Program

.. index:: single: NOMAILWARN; Program

``MAIL_WARN``
    
    ``MAIL_WARNING``
    (bash compatibility)
    

.. index:: single: ONE_CMD; Program

.. index:: single: NO_ONE_CMD; Program

.. index:: single: ONECMD; Program

.. index:: single: NOONECMD; Program

``ONE_CMD``
    
    ``SINGLE_COMMAND``
    (bash compatibility)
    

.. index:: single: PHYSICAL; Program

.. index:: single: NO_PHYSICAL; Program

.. index:: single: NOPHYSICAL; Program

``PHYSICAL``
    
    ``CHASE_LINKS``
    (ksh and bash compatibility)
    

.. index:: single: PROMPT_VARS; Program

.. index:: single: NO_PROMPT_VARS; Program

.. index:: single: PROMPTVARS; Program

.. index:: single: NOPROMPTVARS; Program

``PROMPT_VARS``
    
    ``PROMPT_SUBST``
    (bash compatibility)
    

.. index:: single: STDIN; Program

.. index:: single: NO_STDIN; Program

.. index:: single: NOSTDIN; Program

``STDIN``
    
    ``SHIN_STDIN``
    (ksh compatibility)
    

.. index:: single: TRACK_ALL; Program

.. index:: single: NO_TRACK_ALL; Program

.. index:: single: TRACKALL; Program

.. index:: single: NOTRACKALL; Program

``TRACK_ALL``
    
    ``HASH_CMDS``
    (ksh compatibility)
    

.. historic nodename: Single Letter Options

Single Letter Options
--------------------------------------------------------------------------------
.. index:: single: options, single letter; Command

.. index:: single: single letter options; Command

Default Set
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``-0``
    CORRECT

``-1``
    PRINT_EXIT_VALUE

``-2``
    :emphasis:`NO_`\BAD_PATTERN

``-3``
    :emphasis:`NO_`\NOMATCH

``-4``
    GLOB_DOTS

``-5``
    NOTIFY

``-6``
    BG_NICE

``-7``
    IGNORE_EOF

``-8``
    MARK_DIRS

``-9``
    AUTO_LIST

``-B``
    :emphasis:`NO_`\BEEP

``-C``
    :emphasis:`NO_`\CLOBBER

``-D``
    PUSHD_TO_HOME

``-E``
    PUSHD_SILENT

``-F``
    :emphasis:`NO_`\GLOB

``-G``
    NULL_GLOB

``-H``
    RM_STAR_SILENT

``-I``
    IGNORE_BRACES

``-J``
    AUTO_CD

``-K``
    :emphasis:`NO_`\BANG_HIST

``-L``
    SUN_KEYBOARD_HACK

``-M``
    SINGLE_LINE_ZLE

``-N``
    AUTO_PUSHD

``-O``
    CORRECT_ALL

``-P``
    RC_EXPAND_PARAM

``-Q``
    PATH_DIRS

``-R``
    LONG_LIST_JOBS

``-S``
    REC_EXACT

``-T``
    CDABLE_VARS

``-U``
    MAIL_WARNING

``-V``
    :emphasis:`NO_`\PROMPT_CR

``-W``
    AUTO_RESUME

``-X``
    LIST_TYPES

``-Y``
    MENU_COMPLETE

``-Z``
    ZLE

``-a``
    ALL_EXPORT

``-e``
    ERR_EXIT

``-f``
    :emphasis:`NO_`\RCS

``-g``
    HIST_IGNORE_SPACE

``-h``
    HIST_IGNORE_DUPS

``-i``
    INTERACTIVE

``-k``
    INTERACTIVE_COMMENTS

``-l``
    LOGIN

``-m``
    MONITOR

``-n``
    :emphasis:`NO_`\EXEC

``-p``
    PRIVILEGED

``-r``
    RESTRICTED

``-s``
    SHIN_STDIN

``-t``
    SINGLE_COMMAND

``-u``
    :emphasis:`NO_`\UNSET

``-v``
    VERBOSE

``-w``
    CHASE_LINKS

``-x``
    XTRACE

``-y``
    SH_WORD_SPLIT

sh/ksh Emulation Set
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``-C``
    :emphasis:`NO_`\CLOBBER

``-T``
    TRAPS_ASYNC

``-X``
    MARK_DIRS

``-a``
    ALL_EXPORT

``-b``
    NOTIFY

``-e``
    ERR_EXIT

``-f``
    :emphasis:`NO_`\GLOB

``-i``
    INTERACTIVE

``-l``
    LOGIN

``-m``
    MONITOR

``-n``
    :emphasis:`NO_`\EXEC

``-p``
    PRIVILEGED

``-r``
    RESTRICTED

``-s``
    SHIN_STDIN

``-t``
    SINGLE_COMMAND

``-u``
    :emphasis:`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 processing

``-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

