NAME
zshoptions - zsh options
SSPPEECCIIFFYYIINNGG OOPPTTIIOONNSSOptions are primarily referred to by name. These names are case insen-
sitive and underscores are ignored. For example, `aalllleexxppoorrtt' is equiv-
alent to `AAlllleeXXPPoorrtt'. The sense of an option name may be inverted by preceding it with `nnoo', so `sseettoopptt NNooBBeeeepp' is equivalent to `uunnsseettoopptt bbeeeepp'. This inversioncan only be done once, so `nnoonnoobbeeeepp' is not a synonym for `bbeeeepp'. Sim-
ilarly, `ttiiffyy' is not a synonym for `nnoonnoottiiffyy' (the inversion of `nnoottiiffyy'). 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 sshh/kksshh (used when the SSHHOOPPTTIIOONNLLEETTTTEERRSS option is set). The single letter options can be used on the shell command line, or with the sseett, sseettoopptt and uunnsseettoopptt builtins, as normal Unix options precededby `-'.
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, `++nn' is the short name of `eexxeecc',and `-nn' is the short name of its inversion, `nnooeexxeecc'.
In strings of single letter options supplied to the shell at startup,trailing whitespace will be ignored; for example the string `-ff '
will be treated just as `-ff', but the string `-ff ii' is an error. This
is because many systems which implement the `##!!' mechanism for calling
scripts do not strip trailing whitespace.DESCRIPTION OF OPTIONS
In the following list, options set by default in all emulations aremarked
tions are marked; those set by default only in csh, ksh, sh, or zsh emula- , , ,as appropriate. When listing options (by `sseettoopptt', `uunnsseettoopptt', `sseett -oo' or `sseett ++oo'), those turned
on by default appear in the list prefixed with `nnoo'. Hence (unless KKSSHHOOPPTTIIOONNPPRRIINNTT is set), `sseettoopptt' shows all options whose settings are changed from the default. CChhaannggiinngg DDiirreeccttoorriieessAAUUTTOOCCDD (-JJ)
If a command is issued that can't be executed as a normal com-
mand, and the command is the name of a directory, perform the ccdd command to that directory.AAUUTTOOPPUUSSHHDD (-NN)
Make ccdd push the old directory onto the directory stack.CCDDAABBLLEEVVAARRSS (-TT)
If the argument to a ccdd command (or an implied ccdd with the AAUUTTOOCCDD option set) is not a directory, and does not begin with a slash, try to expand the expression as if it were preceded by a `~~' (see the section `Filename Expansion'). CCHHAASSEEDDOOTTSS When changing to a directory containing a path segment `....'which would otherwise be treated as canceling the previous seg-
ment in the path (in other words, `ffoooo//....' would be removed from the path, or if `....' is the first part of the path, the lastpart of $$PPWWDD would be deleted), instead resolve the path to the
physical directory. This option is overridden by CCHHAASSEELLIINNKKSS. For example, suppose //ffoooo//bbaarr is a link to the directory //aalltt//rroodd. Without this option set, `ccdd //ffoooo//bbaarr//....' changes to //ffoooo; with it set, it changes to //aalltt. The same applies if the current directory is //ffoooo//bbaarr and `ccdd ....' is used. Note that all other symbolic links in the path will also be resolved.CCHHAASSEELLIINNKKSS (-ww)
Resolve symbolic links to their true values when changing direc-
tory. This also has the effect of CCHHAASSEEDDOOTTSS, i.e. a `....' path segment will be treated as referring to the physical parent, even if the preceding path segment is a symbolic link. PPUUSSHHDDIIGGNNOORREEDDUUPPSSDon't push multiple copies of the same directory onto the direc-
tory stack. PPUUSSHHDDMMIINNUUSSExchanges the meanings of `++' and `-' when used with a number to
specify a directory in the stack.PPUUSSHHDDSSIILLEENNTT (-EE)
Do not print the directory stack after ppuusshhdd or ppooppdd.PPUUSSHHDDTTOOHHOOMMEE (-DD)
Have ppuusshhdd with no arguments act like `ppuusshhdd $$HHOOMMEE'.
CCoommpplleettiioonn AALLWWAAYYSSLLAASSTTPPRROOMMPPTTIf unset, key functions that list completions try to return to the last prompt if given a numeric argument. If set these func-
tions try to return to the last prompt if given no numeric argu-
ment. AALLWWAAYYSSTTOOEENNDD 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 wordif either a single match is inserted or menu completion is per-
formed.AAUUTTOOLLIISSTT (-99)
Automatically list choices on an ambiguous completion. AAUUTTOOMMEENNUUAutomatically use menu completion after the second consecutive request for completion, for example by pressing the tab key repeatedly. This option is overridden by MMEENNUUCCOOMMPPLLEETTEE. AUTONAMEDIRS
Any parameter that is set to the absolute name of a directory immediately becomes a name for that directory, that will be usedby the `%%~~' and related prompt sequences, and will be available
when completion is performed on a word starting with `~~'. (Oth-
erwise, the parameter must be used in the form `~~param' first.) AAUUTTOOPPAARRAAMMKKEEYYSSIf a parameter name was completed and a following character (normally a space) automatically inserted, and the next charac-
ter 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. AAUUTTOOPPAARRAAMMSSLLAASSHHIf a parameter is completed whose content is the name of a directory, then add a trailing slash instead of a space. AAUUTTOORREEMMOOVVEESSLLAASSHH 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 amper-
sand), remove the slash. BBAASSHHAAUUTTOOLLIISSTT On an ambiguous completion, automatically list choices when the completion function is called twice in succession. This takes precedence over AAUUTTOOLLIISSTT. The setting of LLIISSTTAAMMBBIIGGUUOOUUSS is respected. If AAUUTTOOMMEENNUU is set, the menu behaviour will then start with the third press. Note that this will not work with MMEENNUUCCOOMMPPLLEETTEE, since repeated completion calls immediately cycle through the list in that case. CCOOMMPPLLEETTEEAALLIIAASSEESSPrevents aliases on the command line from being internally sub-
stituted before completion is attempted. The effect is to make the alias a distinct command for completion purposes. CCOOMMPPLLEETTEEIINNWWOORRDD 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. GGLLOOBBCCOOMMPPLLEETTEE 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 MMEENNUUCCOOMMPPLLEETTEE. The matches are generated as if a `**' was added to the end of the word, or inserted at the cursor when CCOOMMPPLLEETTEEIINNWWOORRDD 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 con-
tains a pattern; simply turning on the GGLLOOBBCCOOMMPPLLEETTEE option does not have this effect. HHAASSHHLLIISSTTAALLLLWhenever a command completion is attempted, make sure the entire command path is hashed first. This makes the first completion slower. LLIISSTTAAMMBBIIGGUUOOUUSS This option works when AAUUTTOOLLIISSTT or BBAASSHHAAUUTTOOLLIISSTT 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 BBAASSHHAAUUTTOOLLIISSTT, this means that the list will be delayed to the third call of the function. LLIISSTTBBEEEEPPBeep on an ambiguous completion. More accurately, this forces the completion widgets to return status 1 on an ambiguous com-
pletion, which causes the shell to beep if the option BBEEEEPP is also set; this may be modified if completion is called from auser-defined widget.
LLIISSTTPPAACCKKEEDD Try to make the completion list smaller (occupying less lines) by printing the matches in columns with different widths. LLIISSTTRROOWWSSFFIIRRSSTT 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.LLIISSTTTTYYPPEESS (-XX)
When listing files that are possible completions, show the type of each file with a trailing identifying mark.MMEENNUUCCOOMMPPLLEETTEE (-YY)
On an ambiguous completion, instead of listing possibilities orbeeping, insert the first match immediately. Then when comple-
tion is requested again, remove the first match and insert the second match, etc. When there are no more matches, go back tothe first one again. rreevveerrssee-mmeennuu-ccoommpplleettee may be used to loop
through the list in the other direction. This option overrides AAUUTTOOMMEENNUU.RREECCEEXXAACCTT (-SS)
In completion, recognize exact matches even if they are ambigu-
ous. EExxppaannssiioonn aanndd GGlloobbbbiinngg BBAADDPPAATTTTEERRNN (++22)If a pattern for filename generation is badly formed, print an error message. (If this option is unset, the pattern will be left unchanged.) BBAARREEGGLLOOBBQQUUAALL In a glob pattern, treat a trailing set of parentheses as a qualifier list, if it contains no `||', `((' or (if special) `~~' characters. See the section `Filename Generation'. BBRRAACCEECCCCLL Expand expressions in braces which would not otherwise undergo brace expansion to a lexically ordered list of all the charac-
ters. See the section `Brace Expansion'. CCAASSEEGGLLOOBBMake 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 spe-
cial to filename generation will cause case-insensitive match-
ing. For example, ccvvss((//)) can match the directory CCVVSS owing to the presence of the globbing flag (unless the option BBAARREEGGLLOOBBQQUUAALL is unset). CCSSHHNNUULLLLGGLLOOBBIf 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 NNOOMMAATTCCHH. EEQQUUAALLSS Perform == filename expansion. (See the section `Filename Expan-
sion'.) EEXXTTEENNDDEEDDGGLLOOBBTreat the `##', `~~' and `^^' characters as part of patterns for
filename generation, etc. (An initial unquoted `~~' always pro-
duces named directory expansion.) GGLLOOBB (++FF, ksh: ++ff)Perform filename generation (globbing). (See the section `File-
name Generation'.) GGLLOOBBAASSSSIIGGNNIf this option is set, filename generation (globbing) is per-
formed on the right hand side of scalar parameter assignments of the form `name==pattern (e.g. `ffoooo==**'). If the result has more than one word the parameter will become an array with thosewords as arguments. This option is provided for backwards com-
patibility only: globbing is always performed on the right hand side of array assignments of the form `name==((value))' (e.g. `ffoooo==((**))') 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.GGLLOOBBDDOOTTSS (-44)
Do not require a leading `..' in a filename to be matched explic-
itly. GGLLOOBBSSUUBBSSTTTreat any characters resulting from parameter expansion as being eligible for file 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.IIGGNNOORREEBBRRAACCEESS (-II)
Do not perform brace expansion. KKSSHHGGLLOOBBIn pattern matching, the interpretation of parentheses is affected by a preceding `@@', `**', `++', `??' or `!!'. See the sec-
tion `Filename Generation'. MMAAGGIICCEEQQUUAALLSSUUBBSSTTAll unquoted arguments of the form `anything==expression' appear-
ing after the command name have filename expansion (that is,where expression has a leading `~~' or `==') performed on expres-
sion 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 eecchhoo ffoooo==~~//bbaarr::~~//rroodd, both occurrences of ~~ would be replaced. Note that this happens anyway with ttyyppeesseett and similar statements. This option respects the setting of the KKSSHHTTYYPPEESSEETT option. In other words, if both options are in effect, arguments looking like assignments will not undergo wordsplitting.MMAARRKKDDIIRRSS (-88, ksh: -XX)
Append a trailing `//' to all directory names resulting from filename generation (globbing). NNOOMMAATTCCHH (++33)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 `=='. NNUULLLLGGLLOOBB (-GG)
If a pattern for filename generation has no matches, delete the pattern from the argument list instead of reporting an error. Overrides NNOOMMAATTCCHH. NNUUMMEERRIICCGGLLOOBBSSOORRTTIf numeric filenames are matched by a filename generation pat-
tern, sort the filenames numerically rather than lexicographi-
cally.RRCCEEXXPPAANNDDPPAARRAAMM (-PP)
Array expansions of the form `foo$${{xx}}bar', where the parameter
xx is set to ((a b c)), are substituted with `fooabar foobbar foocbar' instead of the default `fooa b cbar'. SSHHGGLLOOBBDisables the special meaning of `((', `||', `))' and '<<' for glob-
bing the result of parameter and command substitutions, and in some other places where the shell accepts patterns. This option is set by default if zsh is invoked as sshh or kksshh. UUNNSSEETT (++uu, ksh: ++uu)Treat unset parameters as if they were empty when substituting. Otherwise they are treated as an error. HHiissttoorryy APPENDHISTORY D If this is set, zsh sessions will append their history list to the history file, rather than overwrite it. Thus, multiple par-
allel zsh sessions will all have their history lists added to the history file, in the order they are killed. BBAANNGGHHIISSTT (++KK)Perform textual history expansion, ccsshh-style, treating the char-
acter `!!' specially. EXTENDEDHISTORY 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: `:::: :: '. HHIISSTTAALLLLOOWWCCLLOOBBBBEERR Add `||' to output redirections in the history. This allows his-
tory references to clobber files even when CCLLOOBBBBEERR is unset. HHIISSTTBBEEEEPPBeep when an attempt is made to access a history entry which isn't there. HHIISSTTEEXXPPIIRREEDDUUPPSSFFIIRRSSTT 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 HHIISSTTSSIIZZEE to a larger number than SSAAVVEEHHIISSTT in order to give you some room for the duplicated events, otherwise this option will behave just like HHIISSTTIIGGNNOORREEAALLLLDDUUPPSS once the history fills up with unique events. HHIISSTTFFIINNDDNNOODDUUPPSS 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. HHIISSTTIIGGNNOORREEAALLLLDDUUPPSS 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). HHIISSTTIIGGNNOORREEDDUUPPSS (-hh)
Do not enter command lines into the history list if they are duplicates of the previous event.HHIISSTTIIGGNNOORREESSPPAACCEE (-gg)
Remove command lines from the history list when the first char-
acter on the line is a space, or when one of the expanded aliases contains a leading space. 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. HHIISSTTNNOOFFUUNNCCTTIIOONNSS Remove function definitions from the history list. Note thatthe function lingers in the internal history until the next com-
mand is entered before it vanishes, allowing you to briefly re-
use or edit the definition. HHIISSTTNNOOSSTTOORREERemove the hhiissttoorryy (ffcc -ll) 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. HHIISSTTRREEDDUUCCEEBBLLAANNKKSS Remove superfluous blanks from each command line being added to the history list. HHIISSTTSSAAVVEENNOODDUUPPSS When writing out the history file, older commands that duplicate newer ones are omitted. HHIISSTTVVEERRIIFFYY 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. INCAPPENDHISTORY hs pin wrs ie APPENDHISTORY xet ht e hsoylines are added to the $$HHIISSTTFFIILLEE incrementally (as soon as they
are entered), rather than waiting until the shell is killed.The file is periodically trimmed to the number of lines speci-
fied by $$SSAAVVEEHHIISSTT, but can exceed this value between trimmings.
SHAREHISTORY K This option both imports new commands from the history file, and also causes your typed commands to be appended to the history ie te atr s ie pcfig INCAPPENDHISTORY. hhistory lines are also output with timestamps ala EEXXTTEENNDDEEDDHHIISS-
TTOORRYY (which makes it easier to find the spot where we left offreading 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 offwith 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 motd yu a ws t tr SHAREHISTORY of INCAPPENDHISTORY n ad hn auly mot omns hnever you need them using `ffcc -RRII'.
IInniittiiaalliissaattiioonnAALLLLEEXXPPOORRTT (-aa, ksh: -aa)
All parameters subsequently defined are automatically exported. GGLLOOBBAALLEEXXPPOORRTT (<>) If this option is set, passing the -xx flag to the builtins
ddeeccllaarree, ffllooaatt, iinntteeggeerr, rreeaaddoonnllyy and ttyyppeesseett (but not llooccaall)will also set the -gg flag; hence parameters exported to the
environment will not be made local to the enclosing function, unless they were already or the flag ++gg 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 thatthe builtin eexxppoorrtt always sets both the -xx and -gg flags, and
hence its effect extends beyond the scope of the enclosing func-
tion; this is the most portable way to achieve this behaviour.GGLLOOBBAALLRRCCSS (-dd)
If this option is unset, the startup files //eettcc//zzpprrooffiillee, //eettcc//zzsshhrrcc, //eettcc//zzllooggiinn and //eettcc//zzllooggoouutt will not be run. Itcan be disabled and re-enabled at any time, including inside
local startup files (..zzsshhrrcc, etc.). RRCCSS (++ff)After //eettcc//zzsshheennvv is sourced on startup, source the ..zzsshheennvv, //eettcc//zzpprrooffiillee, ..zzpprrooffiillee, //eettcc//zzsshhrrcc, ..zzsshhrrcc, //eettcc//zzllooggiinn, ..zzlloo-
ggiinn, and ..zzllooggoouutt files, as described in the section `Files'. If this option is unset, the //eettcc//zzsshheennvv file is still sourced, but any of the others will not be; it can be set at any time toprevent the remaining startup files after the currently execut-
ing one from being sourced. IInnppuutt//OOuuttppuutt AALLIIAASSEESSExpand aliases. CCLLOOBBBBEERR (++CC, ksh: ++CC) Allows `>>' redirection to truncate existing files, and `>>>>' to create files. Otherwise `>>!!' or `>>||' must be used to truncate a file, and `>>>>!!' or `>>>>||' to create a file. CCOORRRREECCTT (-00)
Try to correct the spelling of commands. Note that, when the HHAASSHHLLIISSTTAALLLL 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.CCOORRRREECCTTAALLLL (-OO)
Try to correct the spelling of all arguments in a line. DDVVOORRAAKK Use the Dvorak keyboard instead of the standard qwerty keyboard as a basis for examining spelling mistakes for the CCOORRRREECCTT andCCOORRRREECCTTAALLLL options and the ssppeellll-wwoorrdd editor command.
FFLLOOWWCCOONNTTRROOLLIf this option is unset, output flow control via start/stop characters (usually assigned to ^S/^Q) is disabled in the shell's editor. IIGGNNOORREEEEOOFF (-77)
Do not exit on end-of-file. Require the use of eexxiitt or llooggoouutt
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 (nor-
mally Control-D) without printing the normal warning message.
This works only for normal widgets, not for completion widgets.IINNTTEERRAACCTTIIVVEECCOOMMMMEENNTTSS (-kk)
Allow comments even in interactive shells. HHAASSHHCCMMDDSSNote 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 CCOORRRREECCTT is set, com-
mands whose names do not appear in the functions or aliases hash tables are hashed in order to avoid reporting them as spelling errors. HHAASSHHDDIIRRSSWhenever 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 HHAASSHHCCMMDDSS nor CCOORRRREECCTT is set. MMAAIILLWWAARRNNIINNGG (-UU)
Print a warning message if a mail file has been accessed since the shell last checked.PPAATTHHDDIIRRSS (-QQ)
Perform a path search even on command names with slashes in them. Thus if `//uussrr//llooccaall//bbiinn' is in the user's path, and he or she types `XX1111//xxiinniitt', the command `//uussrr//llooccaall//bbiinn//XX1111//xxiinniitt' will be executed (assuming it exists). Commands explicitly beginning with `//', `..//' or `....//' are not subject to the path search. This also applies to the .. builtin. 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. PPRRIINNTTEEIIGGHHTTBBIITT 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 ctype(3)).PPRRIINNTTEEXXIITTVVAALLUUEE (-11)
Print the exit value of programs with non-zero exit status.
RRCCQQUUOOTTEESS Allow the character sequence `''''' to signify a single quote within singly quoted strings. Note this does not apply inquoted strings using the format $$''...'', where a backslashed sin-
gle quote can be used.RRMMSSTTAARRSSIILLEENNTT (-HH)
Do not query the user before executing `rrmm **' or `rrmm ppaatthh//**'. RRMMSSTTAARRWWAAIITT If querying the user before executing `rrmm **' or `rrmm ppaatthh//**', 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). SSHHOORRTTLLOOOOPPSSAllow the short forms of ffoorr, rreeppeeaatt, sseelleecctt, iiff, and ffuunnccttiioonn constructs. SSUUNNKKEEYYBBOOAARRDDHHAACCKK (-LL)
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. JJoobb CCoonnttrrooll AAUUTTOOCCOONNTTIINNUUEE With this option set, stopped jobs that are removed from the job table with the ddiissoowwnn builtin command are automatically sent a CCOONNTT signal to make them running.AAUUTTOORREESSUUMMEE (-WW)
Treat single word simple commands without redirection as candi-
dates for resumption of an existing job.BBGGNNIICCEE (-66)
Run all background jobs at a lower priority. This option is set by default. CCHHEECCKKJJOOBBSSReport the status of background and suspended jobs before exit-
ing a shell with job control; a second attempt to exit the shell will succeed. NNOOCCHHEECCKKJJOOBBSS is best used only in combination with NNOOHHUUPP, else such jobs will be killed automatically.The check is omitted if the commands run from the previous com-
mand line included a `jjoobbss' command, since it is assumed the user is aware that there are background or suspended jobs. A `jjoobbss' command run from the pprreeccmmdd function is not counted for this purpose. HHUUPPSend the HHUUPP signal to running jobs when the shell exits. LLOONNGGLLIISSTTJJOOBBSS (-RR)
List jobs in the long format by default.MMOONNIITTOORR (-mm, ksh: -mm)
Allow job control. Set by default in interactive shells.NNOOTTIIFFYY (-55, ksh: -bb)
Report the status of background jobs immediately, rather than waiting until just before printing a prompt. PPrroommppttiinngg PPRROOMMPPTTBBAANNGGIf set, `!!' is treated specially in prompt expansion. See the section `Prompt Expansion'. PPRROOMMPPTTCCRR (++VV) 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. PPRROOMMPPTTPPEERRCCEENNTTIf set, `%%' is treated specially in prompt expansion. See the
section `Prompt Expansion'. PPRROOMMPPTTSSUUBBSSTTIf set, parameter expansion, command substitution and arithmetic expansion are performed in prompts. Substitutions within prompts do not affect the command status. TTRRAANNSSIIEENNTTRRPPRROOMMPPTT Remove any right prompt from display when accepting a command line. This may be useful with terminals with other cut/paste methods. SSccrriippttss aanndd FFuunnccttiioonnss CCBBAASSEESS Output hexadecimal numbers in the standard C format, for example `00xxFFFF' instead of the usual `1166##FFFF'. If the option OOCCTTAALLZZEERROOEESS
is also set (it is not by default), octal numbers will betreated similarly and hence appear as `007777' instead of `88##7777'.
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 CCBBAASSEESS.EERRRREEXXIITT (-ee, ksh: -ee)
If a command has a non-zero exit status, execute the ZZEERRRR trap,
if set, and exit. This is disabled while running initialization scripts. EERRRRRREETTUURRNNIf a command has a non-zero exit status, return immediately from
the enclosing function. The logic is identical to that for EERRRREEXXIITT, except that an implicit rreettuurrnn statement is executed instead of an eexxiitt. This will trigger an exit at the outermostlevel of a non-interactive script.
EEVVAALLLLIINNEENNOOIf set, line numbers of expressions evaluated using the builtin eevvaall are tracked separately of the enclosing environment. This applies both to the parameter LLIINNEENNOO and the line number output by the prompt escape %%ii. If the option is set, the prompt
escape %%NN will output the string `((eevvaall))' instead of the script
or function name as an indication. (The two prompt escapes are typically used in the parameter PPSS44 to be output when the option XXTTRRAACCEE is set.) If EEVVAALLLLIINNEENNOO is unset, the line number of thesurrounding script or function is retained during the evalua-
tion. EEXXEECC (++nn, ksh: ++nn)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 `-nn' is sup-
plied to the shell at startup. FFUUNNCCTTIIOONNAARRGGZZEERROOWhen executing a shell function or sourcing a script, set $$00
temporarily to the name of the function/script. LLOOCCAALLOOPPTTIIOONNSSIf this option is set at the point of return from a shell func-
tion, all the options (including this one) which were in force upon entry to the function are restored. Otherwise, only this option and the XXTTRRAACCEE and PPRRIINNTTEEXXIITTVVAALLUUEE 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 configurationwith a formulation like `eemmuullaattee -LL zzsshh'; the -LL activates
LLOOCCAALLOOPPTTIIOONNSS. LLOOCCAALLTTRRAAPPSSIf this option is set when a signal trap is set inside a func-
tion, then the previous status of the trap for that signal will be restored when the function exits. Note that this option must be set prior to altering the trap behaviour in a function; unlike LLOOCCAALLOOPPTTIIOONNSS, 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, uunnsseettoopptt llooccaallttrraappssttrraapp - IINNTT
ffnn(()) {{ sseettoopptt llooccaallttrraappss;; ttrraapp '''' IINNTT;; sslleeeepp 33;; }} will restore normally handling of SSIIGGIINNTT after the function exits. MMUULLTTIIOOSSPerform implicit tteeees or ccaatts when multiple redirections are attempted (see the section `Redirection'). OOCCTTAALLZZEERROOEESS Interpret any integer constant beginning with a 0 as octal, perIEEE 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. TTYYPPEESSEETTSSIILLEENNTTIf this is unset, executing any of the `ttyyppeesseett' family of com-
mands with no options and a list of parameters that have no val-
ues to be assigned but already exist will display the value of the parameter. If the option is set, they will only be shownwhen parameters are selected with the `-mm' option. The option
`-pp' is available whether or not the option is set.
VVEERRBBOOSSEE (-vv, ksh: -vv)
Print shell input lines as they are read.XXTTRRAACCEE (-xx, ksh: -xx)
Print commands and their arguments as they are executed. SShheellll EEmmuullaattiioonn BBSSDDEECCHHOOMake the eecchhoo builtin compatible with the BSD echo(1) command. This disables backslashed escape sequences in echo stringsunless the -ee option is specified.
CSHJUNKIEHISTORY C A history reference without an event specifier will always refer to the previous command. Without this option, such a historyreference refers to the same event as the previous history ref-
erence, defaulting to the previous command. CCSSHHJJUUNNKKIIEELLOOOOPPSSAllow loop bodies to take the form `list; eenndd' instead of `ddoo list; ddoonnee'. CCSSHHJJUUNNKKIIEEQQUUOOTTEESS Changes the rules for single- and double-quoted text to match
that of ccsshh. 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. CCSSHHNNUULLLLCCMMDDDo not use the values of NNUULLLLCCMMDD and RREEAADDNNUULLLLCCMMDD when running redirections with no command. This make such redirections fail (see the section `Redirection'). KKSSHHAARRRRAAYYSS Emulate kksshh 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 insteadof the whole array, and braces are required to delimit a sub-
script (`$${{ppaatthh[[22]]}}' rather than just `$$ppaatthh[[22]]').
KKSSHHAAUUTTOOLLOOAADDEmulate kksshh function autoloading. This means that when a func-
tion is autoloaded, the corresponding file is merely executed, and must define the function itself. (By default, the functionis defined to the contents of the file. However, the most com-
mon kksshh-style case - of the file containing only a simple defi-
nition of the function - is always handled in the kksshh-compatible
manner.) KKSSHHOOPPTTIIOONNPPRRIINNTTAlters 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.
KKSSHHTTYYPPEESSEETTAlters the way arguments to the ttyyppeesseett family of commands, including ddeeccllaarree, eexxppoorrtt, ffllooaatt, iinntteeggeerr, llooccaall and rreeaaddoonnllyy, are processed. Without this option, zsh will perform normal word splitting after command and parameter expansion in argu-
ments of an assignment; with it, word splitting does not take place in those cases. PPOOSSIIXXBBUUIILLTTIINNSSWhen this option is set the ccoommmmaanndd builtin can be used to exe-
cute shell builtin commands. Parameter assignments specified before shell functions and special builtins are kept after the command completes unless the special builtin is prefixed withthe ccoommmmaanndd builtin. Special builtins are .., ::, bbrreeaakk, ccoonn-
ttiinnuuee, ddeeccllaarree, eevvaall, eexxiitt, eexxppoorrtt, iinntteeggeerr, llooccaall, rreeaaddoonnllyy, rreettuurrnn, sseett, sshhiifftt, ssoouurrccee, ttiimmeess, ttrraapp and uunnsseett. SSHHFFIILLEEEEXXPPAANNSSIIOONNPerform filename expansion (e.g., ~ expansion) before parameter expansion, command substitution, arithmetic expansion and brace expansion. If this option is unset, it is performed after bracexaso, o hns ie ~$USERNAME' n `~{pfalstad,rc} wl
work. SSHHNNUULLLLCCMMDDDo not use the values of NNUULLLLCCMMDD and RREEAADDNNUULLLLCCMMDD when doing redirections, use `::' instead (see the section `Redirection'). SSHHOOPPTTIIOONNLLEETTTTEERRSSIf this option is set the shell tries to interpret single letter options (which are used with sseett and sseettoopptt) like kksshh does.This also affects the value of the - special parameter.
SSHHWWOORRDDSSPPLLIITT (-yy)
Causes field splitting to be performed on unquoted parameter expansions. Note that this option has nothing to do with word splitting. (See the section `Parameter Expansion'.) TTRRAAPPSSAASSYYNNCC 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. SShheellll SSttaatteeIINNTTEERRAACCTTIIVVEE (-ii, ksh: -ii)
This is an interactive shell. This option is set upon initiali-
sation if the standard input is a tty and commands are being read from standard input. (See the discussion of SSHHIINNSSTTDDIINN.) This heuristic may be overridden by specifying a state for this option on the command line. The value of this option cannot be changed anywhere other than the command line.LLOOGGIINN (-ll, ksh: -ll)
This is a login shell. If this option is not explicitly set, the shell is a login shell if the first character of the aarrggvv[[00]]passed to the shell is a `-'.
PPRRIIVVIILLEEGGEEDD (-pp, ksh: -pp)
Turn on privileged mode. This is enabled automatically on startup if the effective user (group) ID is not equal to thereal user (group) ID. Turning this option off causes the effec-
tive user and group IDs to be set to the real user and group IDs. This option disables sourcing user startup files. If zshis invoked as `sshh' or `kksshh' with this option set, //eettcc//ssuuiiddpprroo-
ffiillee is sourced (after //eettcc//pprrooffiillee on interactive shells). Sourcing ~~//..pprrooffiillee is disabled and the contents of the EENNVVvariable is ignored. This option cannot be changed using the -mm
option of sseettoopptt and uunnsseettoopptt, and changing it inside a function always changes it globally regardless of the LLOOCCAALLOOPPTTIIOONNSS option.RREESSTTRRIICCTTEEDD (-rr)
Enables restricted mode. This option cannot be changed using uunnsseettoopptt, and setting it inside a function always changes itglobally regardless of the LLOOCCAALLOOPPTTIIOONNSS option. See the sec-
tion `Restricted Shell'.SSHHIINNSSTTDDIINN (-ss, ksh: -ss)
Commands are being read from the standard input. Commands areread from standard input if no command is specified with -cc and
no file of commands is specified. If SSHHIINNSSTTDDIINN is set explic-
itly 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 statethe option will have while the shell is running - that is purely
an indicator of whether on not commands are actually being read from standard input. The value of this option cannot be changed anywhere other than the command line.SSIINNGGLLEECCOOMMMMAANNDD (-tt, ksh: -tt)
If the shell is reading from standard input, it exits after a single command has been executed. This also makes the shellnon-interactive, unless the IINNTTEERRAACCTTIIVVEE option is explicitly set
on the command line. The value of this option cannot be changed anywhere other than the command line. ZZllee BBEEEEPP (++BB)Beep on error in ZLE. EEMMAACCSS If ZLE is loaded, turning on this option has the equivalent effect of `bbiinnddkkeeyy -ee'. In addition, the VI option is unset.
Turning it off has no effect. The option setting is not guaran-
teed to reflect the current keymap. This option is provided for compatibility; bbiinnddkkeeyy is the recommended interface. OOVVEERRSSTTRRIIKKEE Start up the line editor in overstrike mode.SSIINNGGLLEELLIINNEEZZLLEE (-MM)
Use single-line command line editing instead of multi-line.
VVII If ZLE is loaded, turning on this option has the equivalenteffect of `bbiinnddkkeeyy -vv'. In addition, the EMACS option is unset.
Turning it off has no effect. The option setting is not guaran-
teed to reflect the current keymap. This option is provided for compatibility; bbiinnddkkeeyy is the recommended interface.ZZLLEE (-ZZ)
Use the zsh line editor. Set by default in interactive shells connected to a terminal. OOPPTTIIOONN AALLIIAASSEESS 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. BBRRAACCEEEEXXPPAANNDD NOIIGGNNOORREEBBRRAACCEESS (ksh and bash compatibility) DDOOTTGGLLOOBB GGLLOOBBDDOOTTSS (bash compatibility) HHAASSHHAALLLL HHAASSHHCCMMDDSS (bash compatibility) HHIISSTTAAPPPPEENNDD APPENDHISTORY bs cmaiiiy HHIISSTTEEXXPPAANNDD BBAANNGGHHIISSTT (bash compatibility) LLOOGG NOHHIISSTTNNOOFFUUNNCCTTIIOONNSS (ksh compatibility) MMAAIILLWWAARRNN MMAAIILLWWAARRNNIINNGG (bash compatibility) OONNEECCMMDD SSIINNGGLLEECCOOMMMMAANNDD (bash compatibility) PPHHYYSSIICCAALL CCHHAASSEELLIINNKKSS (ksh and bash compatibility) PPRROOMMPPTTVVAARRSS PPRROOMMPPTTSSUUBBSSTT (bash compatibility) SSTTDDIINN SSHHIINNSSTTDDIINN (ksh compatibility) TTRRAACCKKAALLLL HHAASSHHCCMMDDSS (ksh compatibility) SSIINNGGLLEE LLEETTTTEERR OOPPTTIIOONNSS DDeeffaauulltt sseett-00 CORRECT
-11 PRINTEXITVALUE
-22 NOBADPATTERN
-33 NONOMATCH
-44 GLOBDOTS
-55 NOTIFY
-66 BGNICE
-77 IGNOREEOF
-88 MARKDIRS
-99 AUTOLIST
-BB NOBEEP
-CC NOCLOBBER
-DD PUSHDTOHOME
-EE PUSHDSILENT
-FF NOGLOB
-GG NULLGLOB
-HH RMSTARSILENT
-II IGNOREBRACES
-JJ AUTOCD
-KK NOBANGHIST
-LL SUNKEYBOARDHACK
-MM SINGLELINEZLE
-NN AUTOPUSHD
-OO CORRECTALL
-PP RCEXPANDPARAM
-QQ PATHDIRS
-RR LONGLISTJOBS
-SS RECEXACT
-TT CDABLEVARS
-UU MAILWARNING
-VV NOPROMPTCR
-WW AUTORESUME
-XX LISTTYPES
-YY MENUCOMPLETE
-ZZ ZLE
-aa ALLEXPORT
-ee ERREXIT
-ff NORCS
-gg HISTIGNORESPACE
-hh HISTIGNOREDUPS
-ii INTERACTIVE
-kk INTERACTIVECOMMENTS
-ll LOGIN
-mm MONITOR
-nn NOEXEC
-pp PRIVILEGED
-rr RESTRICTED
-ss SHINSTDIN
-tt SINGLECOMMAND
-uu NOUNSET
-vv VERBOSE
-ww CHASELINKS
-xx XTRACE
-yy SHWORDSPLIT
sshh//kksshh eemmuullaattiioonn sseett-CC NOCLOBBER
-TT TRAPSASYNC
-XX MARKDIRS
-aa ALLEXPORT
-bb NOTIFY
-ee ERREXIT
-ff NOGLOB
-ii INTERACTIVE
-ll LOGIN
-mm MONITOR
-nn NOEXEC
-pp PRIVILEGED
-rr RESTRICTED
-ss SHINSTDIN
-tt SINGLECOMMAND
-uu NOUNSET
-vv VERBOSE
-xx XTRACE
AAllssoo nnoottee-AA Used by sseett for setting arrays
-bb Used on the command line to specify end of option processing
-cc Used on the command line to specify a single command
-mm Used by sseettoopptt for pattern-matching option setting
-oo Used in all places to allow use of long option names
-ss Used by sseett to sort positional parameters
zsh 4.2.3 January 13, 2005 ZSHOPTIONS(1)