{
    "mode": "man",
    "parameter": "zshparam",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/zshparam/1/json",
    "generated": "2026-11-09T19:09:20Z",
    "sections": {
        "NAME": {
            "content": "zshparam - zsh parameters\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A  parameter  has a name, a value, and a number of attributes.  A name may be any sequence of\nalphanumeric characters and underscores, or the single characters `*', `@',  `#',  `?',  `-',\n`$',  or  `!'.   A parameter whose name begins with an alphanumeric or underscore is also re‐\nferred to as a variable.\n\nThe attributes of a parameter determine the type of its value, often referred to as the para‐\nmeter type or variable type, and also control other processing that may  be  applied  to  the\nvalue  when  it  is  referenced.   The value type may be a scalar (a string, an integer, or a\nfloating point number), an array (indexed numerically), or an associative array (an unordered\nset of name-value pairs, indexed by name, also referred to as a hash).\n\nNamed scalar parameters may have the exported, -x, attribute, to copy them into  the  process\nenvironment,  which  is  then passed from the shell to any new processes that it starts.  Ex‐\nported parameters are called environment variables. The shell also imports environment  vari‐\nables at startup time and automatically marks the corresponding parameters as exported.  Some\nenvironment  variables  are not imported for reasons of security or because they would inter‐\nfere with the correct operation of other shell features.\n\nParameters may also be special, that is, they have a  predetermined  meaning  to  the  shell.\nSpecial parameters cannot have their type changed or their readonly attribute turned off, and\nif  a  special  parameter  is unset, then later recreated, the special properties will be re‐\ntained.\n\nTo declare the type of a parameter, or to assign a string or numeric value to a scalar  para‐\nmeter, use the typeset builtin.\n\nThe value of a scalar parameter may also be assigned by writing:\n\nname=value\n\nIn  scalar  assignment, value is expanded as a single string, in which the elements of arrays\nare joined together; filename expansion is not performed unless  the  option  GLOBASSIGN  is\nset.\n\nWhen the integer attribute, -i, or a floating point attribute, -E or -F, is set for name, the\nvalue  is subject to arithmetic evaluation.  Furthermore, by replacing `=' with `+=', a para‐\nmeter can be incremented or appended to.  See the section `Array Parameters'  and  Arithmetic\nEvaluation (in zshmisc(1)) for additional forms of assignment.\n\nNote  that  assignment may implicitly change the attributes of a parameter.  For example, as‐\nsigning a number to a variable in arithmetic evaluation may change its  type  to  integer  or\nfloat,  and  with GLOBASSIGN assigning a pattern to a variable may change its type to an ar‐\nray.\n\nTo reference the value of a parameter, write `$name' or `${name}'.  See  Parameter  Expansion\nin  zshexpn(1) for complete details.  That section also explains the effect of the difference\nbetween scalar and array assignment on parameter expansion.\n",
            "subsections": []
        },
        "ARRAY PARAMETERS": {
            "content": "To assign an array value, write one of:\n\nset -A name value ...\nname=(value ...)\nname=([key]=value ...)\n\nIf no parameter name exists, an ordinary array parameter is created.  If the  parameter  name\nexists and is a scalar, it is replaced by a new array.\n\nIn  the third form, key is an expression that will be evaluated in arithmetic context (in its\nsimplest form, an integer) that gives the index of the element to be assigned with value.  In\nthis form any elements not explicitly mentioned that come before the largest index to which a\nvalue is assigned are assigned an empty string.  The indices may be in any order.  Note  that\nthis  syntax  is strict: [ and ]= must not be quoted, and key may not consist of the unquoted\nstring ]=, but is otherwise treated as a simple string.  The enhanced forms of subscript  ex‐\npression  that  may be used when directly subscripting a variable name, described in the sec‐\ntion `Array Subscripts' below, are not available.\n\nThe syntaxes with and without the explicit key may be mixed.  An implicit key is  deduced  by\nincrementing  the index from the previously assigned element.  Note that it is not treated as\nan error if latter assignments in this form overwrite earlier assignments.\n\nFor example, assuming the option KSHARRAYS is not set, the following:\n\narray=(one [3]=three four)\n\ncauses the array variable array to contain four elements one,  an  empty  string,  three  and\nfour, in that order.\n\nIn the forms where only value is specified, full command line expansion is performed.\n\nIn the [key]=value form, both key and value undergo all forms of expansion allowed for single\nword  shell expansions (this does not include filename generation); these are as performed by\nthe parameter expansion flag (e) as described in zshexpn(1).  Nested parentheses may surround\nvalue and are included as part of the value, which is joined into a plain string;  this  dif‐\nfers  from  ksh which allows the values themselves to be arrays.  A future version of zsh may\nsupport that.  To cause the brackets to be interpreted as a character class for filename gen‐\neration, and therefore to treat the resulting list of files as a set  of  values,  quote  the\nequal sign using any form of quoting.  Example:\n\nname=([a-z]'='*)\n\nTo append to an array without changing the existing values, use one of the following:\n\nname+=(value ...)\nname+=([key]=value ...)\n\nIn  the  second form key may specify an existing index as well as an index off the end of the\nold array; any existing value  is  overwritten  by  value.   Also,  it  is  possible  to  use\n[key]+=value to append to the existing value at that index.\n\nWithin  the parentheses on the right hand side of either form of the assignment, newlines and\nsemicolons are treated the same as white space, separating individual values.   Any  consecu‐\ntive sequence of such characters has the same effect.\n\nOrdinary array parameters may also be explicitly declared with:\n\ntypeset -a name\n\nAssociative arrays must be declared before assignment, by using:\n\ntypeset -A name\n\nWhen  name refers to an associative array, the list in an assignment is interpreted as alter‐\nnating keys and values:\n\nset -A name key value ...\nname=(key value ...)\nname=([key]=value ...)\n\nNote that only one of the two syntaxes above may be used in any given assignment;  the  forms\nmay not be mixed.  This is unlike the case of numerically indexed arrays.\n\nEvery key must have a value in this case.  Note that this assigns to the entire array, delet‐\ning  any elements that do not appear in the list.  The append syntax may also be used with an\nassociative array:\n\nname+=(key value ...)\nname+=([key]=value ...)\n\nThis adds a new key/value pair if the key is not already present, and replaces the value  for\nthe existing key if it is.  In the second form it is also possible to use [key]+=value to ap‐\npend  to  the  existing  value at that key.  Expansion is performed identically to the corre‐\nsponding forms for normal arrays, as described above.\n\nTo create an empty array (including associative arrays), use one of:\n\nset -A name\nname=()\n",
            "subsections": [
                {
                    "name": "Array Subscripts",
                    "content": "Individual elements of an array may be selected using a subscript.  A subscript of  the  form\n`[exp]'  selects  the single element exp, where exp is an arithmetic expression which will be\nsubject to arithmetic expansion as if it were surrounded by  `$((...))'.   The  elements  are\nnumbered  beginning  with  1, unless the KSHARRAYS option is set in which case they are num‐\nbered from zero.\n\nSubscripts may be used inside braces used to delimit a parameter name,  thus  `${foo[2]}'  is\nequivalent  to  `$foo[2]'.   If the KSHARRAYS option is set, the braced form is the only one\nthat works, as bracketed expressions otherwise are not treated as subscripts.\n\nIf the KSHARRAYS option is not set, then by default accesses to an array element with a sub‐\nscript that evaluates to zero return an empty string, while an attempt to write such an  ele‐\nment is treated as an error.  For backward compatibility the KSHZEROSUBSCRIPT option can be\nset  to cause subscript values 0 and 1 to be equivalent; see the description of the option in\nzshoptions(1).\n\nThe same subscripting syntax is used for associative arrays, except that no arithmetic expan‐\nsion is applied to exp.  However, the parsing rules for arithmetic expressions  still  apply,\nwhich  affects the way that certain special characters must be protected from interpretation.\nSee Subscript Parsing below for details.\n\nA subscript of the form `[*]' or `[@]' evaluates to all elements of an  array;  there  is  no\ndifference  between the two except when they appear within double quotes.  `\"$foo[*]\"' evalu‐\nates to `\"$foo[1] $foo[2] ...\"', whereas `\"$foo[@]\"' evaluates to `\"$foo[1]\" \"$foo[2]\"  ...'.\nFor  associative  arrays,  `[*]' or `[@]' evaluate to all the values, in no particular order.\nNote that this does not substitute the keys; see the documentation for the `k' flag under Pa‐\nrameter Expansion Flags in zshexpn(1) for complete details.  When an array parameter is  ref‐\nerenced  as `$name' (with no subscript) it evaluates to `$name[*]', unless the KSHARRAYS op‐\ntion is set in which case it evaluates to `${name[0]}' (for an associative array, this  means\nthe value of the key `0', which may not exist even if there are values for other keys).\n\nA  subscript of the form `[exp1,exp2]' selects all elements in the range exp1 to exp2, inclu‐\nsive. (Associative arrays are unordered, and so do not support ranges.) If one  of  the  sub‐\nscripts  evaluates to a negative number, say -n, then the nth element from the end of the ar‐\nray is used.  Thus `$foo[-3]' is the third element  from  the  end  of  the  array  foo,  and\n`$foo[1,-1]' is the same as `$foo[*]'.\n\nSubscripting  may also be performed on non-array values, in which case the subscripts specify\na substring to be extracted.  For example, if FOO is set to `foobar', then  `echo  $FOO[2,5]'\nprints  `ooba'.   Note that some forms of subscripting described below perform pattern match‐\ning, and in that case the substring extends from the start of the match  of  the  first  sub‐\nscript to the end of the match of the second subscript.  For example,\n\nstring=\"abcdefghijklm\"\nprint ${string[(r)d?,(r)h?]}\n\nprints `defghi'.  This is an obvious generalisation of the rule for single-character matches.\nFor  a  single  subscript, only a single character is referenced (not the range of characters\ncovered by the match).\n\nNote that in substring operations the second subscript is handled differently by the r and  R\nsubscript flags: the former takes the shortest match as the length and the latter the longest\nmatch.   Hence  in  the  former  case a * at the end is redundant while in the latter case it\nmatches the whole remainder of the string.  This does not affect the  result  of  the  single\nsubscript case as here the length of the match is irrelevant.\n"
                },
                {
                    "name": "Array Element Assignment",
                    "content": "A subscript may be used on the left side of an assignment like so:\n\nname[exp]=value\n\nIn  this  form of assignment the element or range specified by exp is replaced by the expres‐\nsion on the right side.  An array (but not an associative array) may be created by assignment\nto a range or element.  Arrays do not nest, so assigning a parenthesized list of values to an\nelement or range changes the number of elements in the array, shifting the other elements  to\naccommodate the new values.  (This is not supported for associative arrays.)\n\nThis syntax also works as an argument to the typeset command:\n\ntypeset \"name[exp]\"=value\n\nThe  value  may not be a parenthesized list in this case; only single-element assignments may\nbe made with typeset.  Note that quotes are necessary in this case to  prevent  the  brackets\nfrom  being  interpreted  as  filename  generation operators.  The noglob precommand modifier\ncould be used instead.\n\nTo delete an element of an ordinary array, assign `()' to that element.  To delete an element\nof an associative array, use the unset command:\n\nunset \"name[exp]\"\n"
                },
                {
                    "name": "Subscript Flags",
                    "content": "If the opening bracket, or the comma in a range, in any subscript expression is directly fol‐\nlowed by an opening parenthesis, the string up to the matching closing one is  considered  to\nbe a list of flags, as in `name[(flags)exp]'.\n\nThe  flags  s, n and b take an argument; the delimiter is shown below as `:', but any charac‐\nter, or the matching pairs `(...)', `{...}', `[...]', or `<...>', may be used, but note  that\n`<...>' can only be used if the subscript is inside a double quoted expression or a parameter\nsubstitution enclosed in braces as otherwise the expression is interpreted as a redirection.\n\nThe flags currently understood are:\n\nw      If  the  parameter  subscripted  is a scalar then this flag makes subscripting work on\nwords instead of characters.  The default word separator is whitespace.  When combined\nwith the i or I flag, the effect is to produce the index of the first character of the\nfirst/last word which matches the given pattern; note that a failed match in this case\nalways yields 0.\n\ns:string:\nThis gives the string that separates words (for use with the w flag).   The  delimiter\ncharacter : is arbitrary; see above.\n\np      Recognize  the  same escape sequences as the print builtin in the string argument of a\nsubsequent `s' flag.\n\nf      If the parameter subscripted is a scalar then this flag  makes  subscripting  work  on\nlines  instead  of  characters,  i.e.  with elements separated by newlines.  This is a\nshorthand for `pws:\\n:'.\n\nr      Reverse subscripting: if this flag is given, the exp is taken as a pattern and the re‐\nsult is the first matching array element, substring or word (if the  parameter  is  an\narray,  if  it  is  a  scalar, or if it is a scalar and the `w' flag is given, respec‐\ntively).  The subscript used is the number of the matching element, so that  pairs  of\nsubscripts such as `$foo[(r)??,3]' and `$foo[(r)??,(r)f*]' are possible if the parame‐\nter  is  not an associative array.  If the parameter is an associative array, only the\nvalue part of each pair is compared to the pattern, and the result is that value.\n\nIf a search through an ordinary array failed, the search sets  the  subscript  to  one\npast  the  end  of the array, and hence ${array[(r)pattern]} will substitute the empty\nstring.  Thus the success of a search can be tested by using the (i) flag, for example\n(assuming the option KSHARRAYS is not in effect):\n\n[[ ${array[(i)pattern]} -le ${#array} ]]\n\nIf KSHARRAYS is in effect, the -le should be replaced by -lt.\n\nR      Like `r', but gives the last  match.   For  associative  arrays,  gives  all  possible\nmatches.  May  be used for assigning to ordinary array elements, but not for assigning\nto associative arrays.  On failure, for normal arrays this has the effect of returning\nthe element corresponding to subscript 0; this is empty  unless  one  of  the  options\nKSHARRAYS or KSHZEROSUBSCRIPT is in effect.\n\nNote  that  in  subscripts with both `r' and `R' pattern characters are active even if\nthey were substituted for a parameter (regardless of the setting of  GLOBSUBST  which\ncontrols  this  feature in normal pattern matching).  The flag `e' can be added to in‐\nhibit pattern matching.  As this flag does not inhibit other  forms  of  substitution,\ncare is still required; using a parameter to hold the key has the desired effect:\n\nkey2='original key'\nprint ${array[(Re)$key2]}\n\ni      Like  `r',  but  gives the index of the match instead; this may not be combined with a\nsecond argument.  On the left side of an assignment, behaves like `r'.   For  associa‐\ntive  arrays,  the  key  part  of  each pair is compared to the pattern, and the first\nmatching key found is the result.  On failure substitutes the length of the array plus\none, as discussed under the description of `r', or the empty string for an associative\narray.\n\nNote: Although `i' may be applied to a scalar substitution to find  the  offset  of  a\nsubstring, the results are likely to be misleading when searching within substitutions\nthat yield an empty string, or when searching for the empty substring.\n\nI      Like  `i',  but gives the index of the last match, or all possible matching keys in an\nassociative array.  On failure substitutes 0, or the empty string for  an  associative\narray.  This flag is best when testing for values or keys that do not exist.\n\nNote:  If  the option KSHARRAYS is in effect and no match is found, the result is in‐\ndistinguishable from the case when the first element of the array matches.\n\nk      If used in a subscript on an associative array, this flag causes the keys to be inter‐\npreted as patterns, and returns the value for the first key found where exp is matched\nby the key.  Note this could be any such key as no ordering of associative  arrays  is\ndefined.   This flag does not work on the left side of an assignment to an associative\narray element.  If used on another type of parameter, this behaves like `r'.\n\nK      On an associative array this is like `k' but returns all values where exp  is  matched\nby the keys.  On other types of parameters this has the same effect as `R'.\n\nn:expr:\nIf  combined  with `r', `R', `i' or `I', makes them give the nth or nth last match (if\nexpr evaluates to n).  This flag is ignored when the array is associative.  The delim‐\niter character : is arbitrary; see above.\n\nb:expr:\nIf combined with `r', `R', `i' or `I', makes them begin at the nth or  nth  last  ele‐\nment,  word, or character (if expr evaluates to n).  This flag is ignored when the ar‐\nray is associative.  The delimiter character : is arbitrary; see above.\n\ne      This flag causes any pattern matching that would be performed on the subscript to  use\nplain string matching instead.  Hence `${array[(re)*]}' matches only the array element\nwhose  value  is *.  Note that other forms of substitution such as parameter substitu‐\ntion are not inhibited.\n\nThis flag can also be used to force * or @ to be interpreted as a  single  key  rather\nthan as a reference to all values.  It may be used for either purpose on the left side\nof an assignment.\n\nSee  Parameter  Expansion Flags (zshexpn(1)) for additional ways to manipulate the results of\narray subscripting.\n"
                },
                {
                    "name": "Subscript Parsing",
                    "content": "This discussion applies mainly to associative array key strings and to patterns used for  re‐\nverse  subscripting (the `r', `R', `i', etc. flags), but it may also affect parameter substi‐\ntutions that appear as part of an arithmetic expression in an ordinary subscript.\n\nTo avoid subscript parsing limitations in assignments to associative array elements, use  the\nappend syntax:\n\naa+=('key with \"*strange*\" characters' 'value string')\n\nThe  basic  rule to remember when writing a subscript expression is that all text between the\nopening `[' and the closing `]' is interpreted as if it  were  in  double  quotes  (see  zsh‐\nmisc(1)).   However,  unlike  double quotes which normally cannot nest, subscript expressions\nmay appear inside double-quoted strings or inside other subscript expressions (or both!),  so\nthe rules have two important differences.\n\nThe  first  difference is that brackets (`[' and `]') must appear as balanced pairs in a sub‐\nscript expression unless they are preceded by a backslash (`\\').  Therefore,  within  a  sub‐\nscript  expression  (and unlike true double-quoting) the sequence `\\[' becomes `[', and simi‐\nlarly `\\]' becomes `]'.  This applies even in cases where a backslash  is  not  normally  re‐\nquired;  for  example, the pattern `[^[]' (to match any character other than an open bracket)\nshould be written `[^\\[]' in a reverse-subscript pattern.  However, note that  `\\[^\\[\\]'  and\neven  `\\[^[]'  mean  the same thing, because backslashes are always stripped when they appear\nbefore brackets!\n\nThe same rule applies to parentheses (`(' and `)') and braces (`{' and `}'): they must appear\neither in balanced pairs or preceded by a backslash, and backslashes that protect parentheses\nor braces are removed during parsing.  This is because parameter expansions may be surrounded\nby balanced braces, and subscript flags are introduced by balanced parentheses.\n\nThe second difference is that a double-quote (`\"') may appear as part of a subscript  expres‐\nsion without being preceded by a backslash, and therefore that the two characters `\\\"' remain\nas  two characters in the subscript (in true double-quoting, `\\\"' becomes `\"').  However, be‐\ncause of the standard shell quoting rules, any double-quotes that appear must occur  in  bal‐\nanced  pairs  unless  preceded  by a backslash.  This makes it more difficult to write a sub‐\nscript expression that contains an odd number of double-quote characters, but the reason  for\nthis difference is so that when a subscript expression appears inside true double-quotes, one\ncan still write `\\\"' (rather than `\\\\\\\"') for `\"'.\n\nTo  use an odd number of double quotes as a key in an assignment, use the typeset builtin and\nan enclosing pair of double quotes; to refer to the value  of  that  key,  again  use  double\nquotes:\n\ntypeset -A aa\ntypeset \"aa[one\\\"two\\\"three\\\"quotes]\"=QQQ\nprint \"$aa[one\\\"two\\\"three\\\"quotes]\"\n\nIt  is important to note that the quoting rules do not change when a parameter expansion with\na subscript is nested inside another subscript expression.  That is, it is not  necessary  to\nuse additional backslashes within the inner subscript expression; they are removed only once,\nfrom  the innermost subscript outwards.  Parameters are also expanded from the innermost sub‐\nscript first, as each expansion is encountered left to right in the outer expression.\n\nA further complication arises from a way in which subscript parsing  is  not  different  from\ndouble  quote parsing.  As in true double-quoting, the sequences `\\*', and `\\@' remain as two\ncharacters when they appear in a subscript expression.  To use a literal `*' or `@' as an as‐\nsociative array key, the `e' flag must be used:\n\ntypeset -A aa\naa[(e)*]=star\nprint $aa[(e)*]\n\nA last detail must be considered when reverse subscripting is performed.  Parameters  appear‐\ning in the subscript expression are first expanded and then the complete expression is inter‐\npreted as a pattern.  This has two effects: first, parameters behave as if GLOBSUBST were on\n(and  it  cannot be turned off); second, backslashes are interpreted twice, once when parsing\nthe array subscript and again when parsing the pattern.  In a reverse subscript, it's  neces‐\nsary  to  use four backslashes to cause a single backslash to match literally in the pattern.\nFor complex patterns, it is often easiest to assign the desired pattern to  a  parameter  and\nthen refer to that parameter in the subscript, because then the backslashes, brackets, paren‐\ntheses, etc., are seen only when the complete expression is converted to a pattern.  To match\nthe  value  of  a  parameter  literally in a reverse subscript, rather than as a pattern, use\n`${(q)name}' (see zshexpn(1)) to quote the expanded value.\n\nNote that the `k' and `K' flags are reverse subscripting for an ordinary array, but  are  not\nreverse  subscripting  for  an associative array!  (For an associative array, the keys in the\narray itself are interpreted as patterns by those flags; the subscript is a plain  string  in\nthat case.)\n\nOne final note, not directly related to subscripting: the numeric names of positional parame‐\nters  (described  below)  are  parsed  specially,  so  for  example  `$2foo' is equivalent to\n`${2}foo'.  Therefore, to use subscript syntax to extract a substring from a positional para‐\nmeter, the expansion must be surrounded by braces; for example, `${2[3,5]}' evaluates to  the\nthird  through  fifth characters of the second positional parameter, but `$2[3,5]' is the en‐\ntire second parameter concatenated with the filename generation pattern `[3,5]'.\n"
                }
            ]
        },
        "POSITIONAL PARAMETERS": {
            "content": "The positional parameters provide access to the command-line arguments of a  shell  function,\nshell  script, or the shell itself; see the section `Invocation', and also the section `Func‐\ntions'.  The parameter n, where n is a number, is the nth positional parameter.  The  parame‐\nter `$0' is a special case, see the section `Parameters Set By The Shell'.\n\nThe  parameters  *,  @  and  argv  are  arrays containing all the positional parameters; thus\n`$argv[n]', etc., is equivalent  to  simply  `$n'.   Note  that  the  options  KSHARRAYS  or\nKSHZEROSUBSCRIPT  apply  to  these  arrays  as  well,  so with either of those options set,\n`${argv[0]}' is equivalent to `$1' and so on.\n\nPositional parameters may be changed after the shell or function  starts  by  using  the  set\nbuiltin,  by assigning to the argv array, or by direct assignment of the form `n=value' where\nn is the number of the positional parameter to be changed.  This  also  creates  (with  empty\nvalues) any of the positions from 1 to n that do not already have values.  Note that, because\nthe  positional  parameters form an array, an array assignment of the form `n=(value ...)' is\nallowed, and has the effect of shifting all the values at positions greater than n by as many\npositions as necessary to accommodate the new values.\n",
            "subsections": []
        },
        "LOCAL PARAMETERS": {
            "content": "Shell function executions delimit scopes for shell parameters.  (Parameters  are  dynamically\nscoped.)  The typeset builtin, and its alternative forms declare, integer, local and readonly\n(but not export), can be used to declare a parameter as being local to the innermost scope.\n\nWhen  a  parameter  is  read or assigned to, the innermost existing parameter of that name is\nused.  (That is, the local parameter hides any less-local parameter.)  However, assigning  to\na  non-existent  parameter, or declaring a new parameter with export, causes it to be created\nin the outermost scope.\n\nLocal parameters disappear when their scope ends.  unset can be used to  delete  a  parameter\nwhile it is still in scope; any outer parameter of the same name remains hidden.\n\nSpecial parameters may also be made local; they retain their special attributes unless either\nthe existing or the newly-created parameter has the -h (hide) attribute.  This may have unex‐\npected  effects:  there  is  no  default value, so if there is no assignment at the point the\nvariable is made local, it will be set to an empty value (or zero in the case  of  integers).\nThe following:\n\ntypeset PATH=/new/directory:$PATH\n\nis valid for temporarily allowing the shell or programmes called from it to find the programs\nin /new/directory inside a function.\n\nNote  that the restriction in older versions of zsh that local parameters were never exported\nhas been removed.\n",
            "subsections": []
        },
        "PARAMETERS SET BY THE SHELL": {
            "content": "In the parameter lists that follow, the mark `<S>' indicates that the parameter  is  special.\n`<Z>' indicates that the parameter does not exist when the shell initializes in sh or ksh em‐\nulation mode.\n\nThe  parameters `!', `#', `*', `-', `?', `@', `$', `ARGC', `HISTCMD', `LINENO', `PPID', `sta‐\ntus', `TTYIDLE', `zshevalcontext', `ZSHEVALCONTEXT', and `ZSHSUBSHELL' are read-only and\nthus cannot be restored by the user, so they are not output by `typeset -p'.  This  also  ap‐\nplies to many read-only parameters loaded from modules.\n\nThe following parameters are automatically set by the shell:\n\n! <S>  The  process  ID  of  the  last command started in the background with &, put into the\nbackground with the bg builtin, or spawned with coproc.\n\n# <S>  The number of positional parameters in decimal.  Note that some  confusion  may  occur\nwith  the  syntax  $#param which substitutes the length of param.  Use ${#} to resolve\nambiguities.  In particular, the sequence `$#-...' in an arithmetic expression is  in‐\nterpreted as the length of the parameter -, q.v.\n\nARGC <S> <Z>\nSame as #.\n\n$ <S>  The  process  ID of this shell, set when the shell initializes.  Processes forked from\nthe shell without executing a new program, such as command substitutions and  commands\ngrouped  with  (...), are subshells that duplicate the current shell, and thus substi‐\ntute the same value for $$ as their parent shell.\n\n- <S>  Flags supplied to the shell on invocation or by the set or setopt commands.\n\n* <S>  An array containing the positional parameters.\n\nargv <S> <Z>\nSame as *.  Assigning to argv changes the local positional parameters, but argv is not\nitself a local parameter.  Deleting argv with unset in any function deletes it  every‐\nwhere,  although  only the innermost positional parameter array is deleted (so * and @\nin other scopes are not affected).\n\n@ <S>  Same as argv[@], even when argv is not set.\n\n? <S>  The exit status returned by the last command.\n\n0 <S>  The name used to invoke the current shell, or as set by the  -c  command  line  option\nupon  invocation.   If  the  FUNCTIONARGZERO option is set, $0 is set upon entry to a\nshell function to the name of the function, and upon entry to a sourced script to  the\nname  of  the  script, and reset to its previous value when the function or script re‐\nturns.\n\nstatus <S> <Z>\nSame as ?.\n\npipestatus <S> <Z>\nAn array containing the exit statuses returned by all commands in the last pipeline.\n\n<S>  The last argument of the previous command.  Also, this parameter is set in  the  envi‐\nronment of every command executed to the full pathname of the command.\n\nCPUTYPE\nThe machine type (microprocessor class or machine model), as determined at run time.\n\nEGID <S>\nThe  effective  group ID of the shell process.  If you have sufficient privileges, you\nmay change the effective group ID of the shell process by assigning to this parameter.\nAlso (assuming sufficient privileges), you may start a single command with a different\neffective group ID by `(EGID=gid; command)'\n\nIf this is made local, it is not implicitly set to 0, but may be  explicitly  set  lo‐\ncally.\n\nEUID <S>\nThe  effective  user  ID of the shell process.  If you have sufficient privileges, you\nmay change the effective user ID of the shell process by assigning to this  parameter.\nAlso (assuming sufficient privileges), you may start a single command with a different\neffective user ID by `(EUID=uid; command)'\n\nIf  this  is  made local, it is not implicitly set to 0, but may be explicitly set lo‐\ncally.\n\nERRNO <S>\nThe value of errno (see errno(3)) as set by the  most  recently  failed  system  call.\nThis  value  is  system  dependent and is intended for debugging purposes.  It is also\nuseful with the zsh/system module which allows the number to be turned into a name  or\nmessage.\n\nTo  use this parameter, it must first be assigned a value (typically 0 (zero)).  It is\ninitially unset for scripting compatibility.\n\nFUNCNEST <S>\nInteger.  If greater than or equal to zero, the maximum nesting depth of  shell  func‐\ntions.   When  it  is  exceeded,  an  error is raised at the point where a function is\ncalled.  The default value is determined when the shell is configured,  but  is  typi‐\ncally  500.  Increasing the value increases the danger of a runaway function recursion\ncausing the shell to crash.  Setting a negative value turns off the check.\n\nGID <S>\nThe real group ID of the shell process.  If you have sufficient  privileges,  you  may\nchange the group ID of the shell process by assigning to this parameter.  Also (assum‐\ning  sufficient privileges), you may start a single command under a different group ID\nby `(GID=gid; command)'\n\nIf this is made local, it is not implicitly set to 0, but may be  explicitly  set  lo‐\ncally.\n\nHISTCMD\nThe  current  history  event  number in an interactive shell, in other words the event\nnumber for the command that caused $HISTCMD to be read.  If the current history  event\nmodifies the history, HISTCMD changes to the new maximum history event number.\n\nHOST   The current hostname.\n\nLINENO <S>\nThe  line number of the current line within the current script, sourced file, or shell\nfunction being executed, whichever was started most recently.  Note that in  the  case\nof shell functions the line number refers to the function as it appeared in the origi‐\nnal definition, not necessarily as displayed by the functions builtin.\n\nLOGNAME\nIf  the  corresponding variable is not set in the environment of the shell, it is ini‐\ntialized to the login name corresponding to the current login session. This  parameter\nis  exported by default but this can be disabled using the typeset builtin.  The value\nis set to the string returned by the getlogin(3) system call if that is available.\n\nMACHTYPE\nThe machine type (microprocessor class or machine model),  as  determined  at  compile\ntime.\n\nOLDPWD The  previous  working directory.  This is set when the shell initializes and whenever\nthe directory changes.\n\nOPTARG <S>\nThe value of the last option argument processed by the getopts command.\n\nOPTIND <S>\nThe index of the last option argument processed by the getopts command.\n\nOSTYPE The operating system, as determined at compile time.\n\nPPID <S>\nThe process ID of the parent of the shell, set when the shell  initializes.   As  with\n$$,  the  value  does  not  change  in subshells created as a duplicate of the current\nshell.\n\nPWD    The present working directory.  This is set when the shell  initializes  and  whenever\nthe directory changes.\n\nRANDOM <S>\nA  pseudo-random  integer from 0 to 32767, newly generated each time this parameter is\nreferenced.  The random number generator can be seeded by assigning a numeric value to\nRANDOM.\n\nThe values of RANDOM form an  intentionally-repeatable  pseudo-random  sequence;  sub‐\nshells  that reference RANDOM will result in identical pseudo-random values unless the\nvalue of RANDOM is referenced or seeded in the parent shell in between subshell  invo‐\ncations.\n\nSECONDS <S>\nThe  number of seconds since shell invocation.  If this parameter is assigned a value,\nthen the value returned upon reference will be the value that was  assigned  plus  the\nnumber of seconds since the assignment.\n\nUnlike  other special parameters, the type of the SECONDS parameter can be changed us‐\ning the typeset command.  The type may be changed only to one of  the  floating  point\ntypes  or  back  to integer.  For example, `typeset -F SECONDS' causes the value to be\nreported as a floating point number.  The value is available to microsecond  accuracy,\nalthough the shell may show more or fewer digits depending on the use of typeset.  See\nthe documentation for the builtin typeset in zshbuiltins(1) for more details.\n\nSHLVL <S>\nIncremented by one each time a new shell is started.\n",
            "subsections": [
                {
                    "name": "signals",
                    "content": "An array containing the names of the signals.  Note that with the standard zsh number‐\ning of array indices, where the first element has index 1, the signals are offset by 1\nfrom  the  signal  number  used  by  the  operating  system.   For example, on typical\nUnix-like systems HUP is signal number 1, but is referred to as $signals[2].  This  is\nbecause of EXIT at position 1 in the array, which is used internally by zsh but is not\nknown to the operating system.\n\nTRYBLOCKERROR <S>\nIn an always block, indicates whether the preceding list of code caused an error.  The\nvalue  is  1  to  indicate an error, 0 otherwise.  It may be reset, clearing the error\ncondition.  See Complex Commands in zshmisc(1)\n\nTRYBLOCKINTERRUPT <S>\nThis variable works in a similar way to TRYBLOCKERROR, but represents the status  of\nan  interrupt from the signal SIGINT, which typically comes from the keyboard when the\nuser types ^C.  If set to 0, any such interrupt will be reset; otherwise,  the  inter‐\nrupt is propagated after the always block.\n\nNote  that it is possible that an interrupt arrives during the execution of the always\nblock; this interrupt is also propagated.\n\nTTY    The name of the tty associated with the shell, if any.\n\nTTYIDLE <S>\nThe idle time of the tty associated with the shell in seconds or -1  if  there  is  no\nsuch tty.\n\nUID <S>\nThe  real  user  ID  of the shell process.  If you have sufficient privileges, you may\nchange the user ID of the shell by assigning to this parameter.  Also (assuming suffi‐\ncient privileges), you may start a  single  command  under  a  different  user  ID  by\n`(UID=uid; command)'\n\nIf  this  is  made local, it is not implicitly set to 0, but may be explicitly set lo‐\ncally.\n\nUSERNAME <S>\nThe username corresponding to the real user ID of the shell process.  If you have suf‐\nficient privileges, you may change the username (and also the user ID and group ID) of\nthe shell by assigning to this parameter.  Also (assuming sufficient privileges),  you\nmay  start  a  single command under a different username (and user ID and group ID) by\n`(USERNAME=username; command)'\n\nVENDOR The vendor, as determined at compile time.\n\nzshevalcontext <S> <Z> (ZSHEVALCONTEXT <S>)\nAn array (colon-separated list) indicating the context of shell  code  that  is  being\nrun.   Each  time  a piece of shell code that is stored within the shell is executed a\nstring is temporarily appended to the array to indicate the type of operation that  is\nbeing  performed.   Read in order the array gives an indication of the stack of opera‐\ntions being performed with the most immediate context last.\n\nNote that the variable  does  not  give  information  on  syntactic  context  such  as\npipelines or subshells.  Use $ZSHSUBSHELL to detect subshells.\n\nThe context is one of the following:\ncmdarg Code specified by the -c option to the command line that invoked the shell.\n\ncmdsubst\nCommand substitution using the `...` or $(...) construct.\n\nequalsubst\nFile substitution using the =(...) construct.\n\neval   Code executed by the eval builtin.\n\nevalautofunc\nCode  executed with the KSHAUTOLOAD mechanism in order to define an autoloaded\nfunction.\n\nfc     Code from the shell history executed by the -e option to the fc builtin.\n\nfile   Lines of code being read directly from  a  file,  for  example  by  the  source\nbuiltin.\n\nfilecode\nLines  of  code being read from a .zwc file instead of directly from the source\nfile.\n\nglobqual\nCode executed by the e or + glob qualifier.\n\nglobsort\nCode executed to order files by the o glob qualifier.\n\ninsubst\nFile substitution using the <(...) construct.\n\nloadautofunc\nCode read directly from a file to define an autoloaded function.\n\noutsubst\nFile substitution using the >(...) construct.\n\nsched  Code executed by the sched builtin.\n\nshfunc A shell function.\n\nstty   Code passed to stty by the STTY environment variable.  Normally this is  passed\ndirectly  to the system's stty command, so this value is unlikely to be seen in\npractice.\n\nstyle  Code executed as part of a style retrieved  by  the  zstyle  builtin  from  the\nzsh/zutil module.\n\ntoplevel\nThe highest execution level of a script or interactive shell.\n\ntrap   Code  executed  as  a trap defined by the trap builtin.  Traps defined as func‐\ntions have the context shfunc.  As traps are asynchronous they may have a  dif‐\nferent hierarchy from other code.\n\nzpty   Code executed by the zpty builtin from the zsh/zpty module.\n\nzregexparse-guard\nCode executed as a guard by the zregexparse command from the zsh/zutil module.\n\nzregexparse-action\nCode  executed  as an action by the zregexparse command from the zsh/zutil mod‐\nule.\n\nZSHARGZERO\nIf zsh was invoked to run a script, this is the name of the script.  Otherwise, it  is\nthe  name  used to invoke the current shell.  This is the same as the value of $0 when\nthe POSIXARGZERO option is set, but is always available.\n\nZSHEXECUTIONSTRING\nIf the shell was started with the option -c, this contains the argument passed to  the\noption.  Otherwise it is not set.\n\nZSHNAME\nExpands to the basename of the command used to invoke this instance of zsh.\n\nZSHPATCHLEVEL\nThe  output  of  `git describe --tags --long' for the zsh repository used to build the\nshell.  This is most useful in order to keep track of versions of the shell during de‐\nvelopment between releases; hence most users should not use it and should instead rely\non $ZSHVERSION.\n"
                },
                {
                    "name": "zsh_scheduled_events",
                    "content": "See the section `The zsh/sched Module' in zshmodules(1).\n\nZSHSCRIPT\nIf zsh was invoked to run a script, this is the name of the script,  otherwise  it  is\nunset.\n\nZSHSUBSHELL\nReadonly  integer.   Initially zero, incremented each time the shell forks to create a\nsubshell for  executing  code.   Hence  `(print  $ZSHSUBSHELL)'  and  `print  $(print\n$ZSHSUBSHELL)' output 1, while `( (print $ZSHSUBSHELL) )' outputs 2.\n\nZSHVERSION\nThe version number of the release of zsh.\n"
                }
            ]
        },
        "PARAMETERS USED BY THE SHELL": {
            "content": "The following parameters are used by the shell.  Again, `<S>' indicates that the parameter is\nspecial  and  `<Z>' indicates that the parameter does not exist when the shell initializes in\nsh or ksh emulation mode.\n\nIn cases where there are two parameters with an upper- and lowercase form of the  same  name,\nsuch as path and PATH, the lowercase form is an array and the uppercase form is a scalar with\nthe  elements  of  the array joined together by colons.  These are similar to tied parameters\ncreated via `typeset -T'.  The normal use for the colon-separated form is  for  exporting  to\nthe  environment,  while  the array form is easier to manipulate within the shell.  Note that\nunsetting either of the pair will unset the other; they retain their special properties  when\nrecreated, and recreating one of the pair will recreate the other.\n\nARGV0  If  exported,  its value is used as the argv[0] of external commands.  Usually used in\nconstructs like `ARGV0=emacs nethack'.\n\nBAUD   The rate in bits per second at which data reaches the terminal.  The line editor  will\nuse  this  value in order to compensate for a slow terminal by delaying updates to the\ndisplay until necessary.  If the parameter is unset or the value is zero the compensa‐\ntion mechanism is turned off.  The parameter is not set by default.\n\nThis parameter may be profitably set in some circumstances, e.g.  for slow modems  di‐\naling  into a communications server, or on a slow wide area network.  It should be set\nto the baud rate of the slowest part of the link for best performance.\n\ncdpath <S> <Z> (CDPATH <S>)\nAn array (colon-separated list) of directories specifying the search path for  the  cd\ncommand.\n\nCOLUMNS <S>\nThe  number  of columns for this terminal session.  Used for printing select lists and\nfor the line editor.\n\nCORRECTIGNORE\nIf set, is treated as a pattern during spelling correction.  Any potential  correction\nthat  matches  the pattern is ignored.  For example, if the value is `*' then comple‐\ntion functions (which, by convention, have names beginning with `') will never be of‐\nfered as spelling corrections.  The pattern does not apply to the correction  of  file\nnames,  as applied by the CORRECTALL option (so with the example just given files be‐\nginning with `' in the current directory would still be completed).\n\nCORRECTIGNOREFILE\nIf set, is treated as a pattern during spelling correction of file  names.   Any  file\nname  that  matches the pattern is never offered as a correction.  For example, if the\nvalue is `.*' then dot file names will never be offered as spelling corrections.  This\nis useful with the CORRECTALL option.\n\nDIRSTACKSIZE\nThe maximum size of the directory stack, by default there is no limit.  If  the  stack\ngets  larger  than  this, it will be truncated automatically.  This is useful with the\nAUTOPUSHD option.\n\nENV    If the ENV environment variable is set when zsh is invoked  as  sh  or  ksh,  $ENV  is\nsourced  after the profile scripts.  The value of ENV is subjected to parameter expan‐\nsion, command substitution, and arithmetic expansion before  being  interpreted  as  a\npathname.   Note  that ENV is not used unless the shell is interactive and zsh is emu‐\nlating sh or ksh.\n\nFCEDIT The default editor for the fc builtin.  If FCEDIT is not set, the parameter EDITOR  is\nused; if that is not set either, a builtin default, usually vi, is used.\n\nfignore <S> <Z> (FIGNORE <S>)\nAn  array (colon separated list) containing the suffixes of files to be ignored during\nfilename completion.  However, if completion only generates  files  with  suffixes  in\nthis list, then these files are completed anyway.\n\nfpath <S> <Z> (FPATH <S>)\nAn array (colon separated list) of directories specifying the search path for function\ndefinitions.   This  path  is searched when a function with the -u attribute is refer‐\nenced.  If an executable file is found, then it is read and executed  in  the  current\nenvironment.\n\nhistchars <S>\nThree  characters  used  by  the  shell's history and lexical analysis mechanism.  The\nfirst character signals the start of a history expansion (default  `!').   The  second\ncharacter  signals the start of a quick history substitution (default `^').  The third\ncharacter is the comment character (default `#').\n\nThe characters must be in the ASCII character set; any attempt  to  set  histchars  to\ncharacters with a locale-dependent meaning will be rejected with an error message.\n\nHISTCHARS <S> <Z>\nSame as histchars.  (Deprecated.)\n\nHISTFILE\nThe  file  to save the history in when an interactive shell exits.  If unset, the his‐\ntory is not saved.\n\nHISTORYIGNORE\nIf set, is treated as a pattern at the time history files are written.  Any  potential\nhistory  entry  that matches the pattern is skipped.  For example, if the value is `fc\n*' then commands that invoke the interactive history editor are never written  to  the\nhistory file.\n\nNote  that  HISTORYIGNORE  defines  a single pattern: to specify alternatives use the\n`(first|second|...)' syntax.\n\nCompare the HISTNOSTORE option or the zshaddhistory hook, either of which would pre‐\nvent such commands from being added to the interactive history at all.  If you wish to\nuse HISTORYIGNORE to stop history being added in the first place, you can define  the\nfollowing hook:\n\nzshaddhistory() {\nemulate -L zsh\n## uncomment if HISTORYIGNORE\n## should use EXTENDEDGLOB syntax\n# setopt extendedglob\n[[ $1 != ${~HISTORYIGNORE} ]]\n}\n\nHISTSIZE <S>\nThe  maximum  number  of  events  stored in the internal history list.  If you use the\nHISTEXPIREDUPSFIRST option, setting this value larger than the SAVEHIST  size  will\ngive you the difference as a cushion for saving duplicated history events.\n\nIf  this  is  made local, it is not implicitly set to 0, but may be explicitly set lo‐\ncally.\n\nHOME <S>\nThe default argument for the cd command.  This is not set automatically by  the  shell\nin  sh,  ksh  or csh emulation, but it is typically present in the environment anyway,\nand if it becomes set it has its usual special behaviour.\n\nIFS <S>\nInternal field separators (by default space, tab, newline and NUL), that are  used  to\nseparate  words which result from command or parameter expansion and words read by the\nread builtin.  Any characters from the set space, tab and newline that appear  in  the\nIFS are called IFS white space.  One or more IFS white space characters or one non-IFS\nwhite  space  character together with any adjacent IFS white space character delimit a\nfield.  If an IFS white space character appears twice consecutively in the  IFS,  this\ncharacter is treated as if it were not an IFS white space character.\n\nIf the parameter is unset, the default is used.  Note this has a different effect from\nsetting the parameter to an empty string.\n\nKEYBOARDHACK\nThis  variable  defines a character to be removed from the end of the command line be‐\nfore interpreting it (interactive shells only). It is intended to fix the problem with\nkeys placed annoyingly close to return and replaces the SUNKEYBOARDHACK  option  which\ndid this for backquotes only.  Should the chosen character be one of singlequote, dou‐\nblequote  or  backquote,  there must also be an odd number of them on the command line\nfor the last one to be removed.\n\nFor backward compatibility, if the SUNKEYBOARDHACK option is explicitly set, the value\nof KEYBOARDHACK reverts to backquote.  If the option is explicitly unset, this  vari‐\nable is set to empty.\n\nKEYTIMEOUT\nThe time the shell waits, in hundredths of seconds, for another key to be pressed when\nreading bound multi-character sequences.\n\nLANG <S>\nThis  variable  determines  the  locale category for any category not specifically se‐\nlected via a variable starting with `LC'.\n\nLCALL <S>\nThis variable overrides the value of the `LANG' variable and the value of any  of  the\nother variables starting with `LC'.\n\nLCCOLLATE <S>\nThis  variable  determines  the  locale  category  for character collation information\nwithin ranges in glob brackets and for sorting.\n\nLCCTYPE <S>\nThis variable determines the locale category for character handling functions.  If the\nMULTIBYTE option is in effect this variable or LANG should contain a  value  that  re‐\nflects  the  character  set  in use, even if it is a single-byte character set, unless\nonly the 7-bit subset  (ASCII)  is  used.   For  example,  if  the  character  set  is\nISO-8859-1,  a suitable value might be enUS.iso88591 (certain Linux distributions) or\nenUS.ISO8859-1 (MacOS).\n\nLCMESSAGES <S>\nThis variable determines the language in which messages should be written.  Note  that\nzsh does not use message catalogs.\n\nLCNUMERIC <S>\nThis  variable  affects  the decimal point character and thousands separator character\nfor the formatted input/output functions and string conversion functions.   Note  that\nzsh ignores this setting when parsing floating point mathematical expressions.\n\nLCTIME <S>\nThis  variable  determines  the locale category for date and time formatting in prompt\nescape sequences.\n\nLINES <S>\nThe number of lines for this terminal session.  Used for printing select lists and for\nthe line editor.\n\nLISTMAX\nIn the line editor, the number of matches to list without asking first. If  the  value\nis  negative, the list will be shown if it spans at most as many lines as given by the\nabsolute value.  If set to zero, the shell asks only if the top of the  listing  would\nscroll off the screen.\n\nMAIL   If  this  parameter  is  set  and mailpath is not set, the shell looks for mail in the\nspecified file.\n\nMAILCHECK\nThe interval in seconds between checks for new mail.\n\nmailpath <S> <Z> (MAILPATH <S>)\nAn array (colon-separated list) of filenames to check for new mail.  Each filename can\nbe followed by a `?' and a message that will be printed.  The message will undergo pa‐\nrameter expansion, command substitution and arithmetic expansion with the variable  $\ndefined  as  the  name of the file that has changed.  The default message is `You have\nnew mail'.  If an element is a directory instead of a file the shell will  recursively\ncheck every file in every subdirectory of the element.\n\nmanpath <S> <Z> (MANPATH <S> <Z>)\nAn array (colon-separated list) whose value is not used by the shell.  The manpath ar‐\nray can be useful, however, since setting it also sets MANPATH, and vice versa.\n",
            "subsections": [
                {
                    "name": "match",
                    "content": ""
                },
                {
                    "name": "mbegin",
                    "content": "mend   Arrays  set by the shell when the b globbing flag is used in pattern matches.  See the\nsubsection Globbing flags in the documentation for Filename Generation in zshexpn(1).\n\nMATCH\nMBEGIN\nMEND   Set by the shell when the m globbing flag is used in pattern matches.  See the subsec‐\ntion Globbing flags in the documentation for Filename Generation in zshexpn(1).\n\nmodulepath <S> <Z> (MODULEPATH <S>)\nAn array (colon-separated list) of directories that zmodload searches for  dynamically\nloadable  modules.   This  is  initialized  to  a standard pathname, usually `/usr/lo‐\ncal/lib/zsh/$ZSHVERSION'.  (The `/usr/local/lib' part varies from installation to in‐\nstallation.)  For security reasons, any value set in the environment when the shell is\nstarted will be ignored.\n\nThese parameters only exist if the installation supports dynamic module loading.\n\nNULLCMD <S>\nThe command name to assume if a redirection is specified with no command.  Defaults to\ncat.  For sh/ksh behavior, change this to :.  For csh-like behavior, unset this  para‐\nmeter; the shell will print an error message if null commands are entered.\n\npath <S> <Z> (PATH <S>)\nAn  array (colon-separated list) of directories to search for commands.  When this pa‐\nrameter is set, each directory is scanned and all files found are put in a hash table.\n\nPOSTEDIT <S>\nThis string is output whenever the line editor exits.   It  usually  contains  termcap\nstrings to reset the terminal.\n\nPROMPT <S> <Z>\nPROMPT2 <S> <Z>\nPROMPT3 <S> <Z>\nPROMPT4 <S> <Z>\nSame as PS1, PS2, PS3 and PS4, respectively.\n\nprompt <S> <Z>\nSame as PS1.\n\nPROMPTEOLMARK\nWhen the PROMPTCR and PROMPTSP options are set, the PROMPTEOLMARK parameter can be\nused  to  customize  how the end of partial lines are shown.  This parameter undergoes\nprompt expansion, with the PROMPTPERCENT option set.  If not set, the default  behav‐\nior is equivalent to the value `%B%S%#%s%b'.\n\nPS1 <S>\nThe  primary  prompt string, printed before a command is read.  It undergoes a special\nform of expansion before being displayed; see EXPANSION OF PROMPT  SEQUENCES  in  zsh‐\nmisc(1).  The default is `%m%# '.\n\nPS2 <S>\nThe secondary prompt, printed when the shell needs more information to complete a com‐\nmand.   It  is expanded in the same way as PS1.  The default is `%> ', which displays\nany shell constructs or quotation marks which are currently being processed.\n\nPS3 <S>\nSelection prompt used within a select loop.  It is expanded in the same  way  as  PS1.\nThe default is `?# '.\n\nPS4 <S>\nThe  execution  trace  prompt.   Default is `+%N:%i> ', which displays the name of the\ncurrent shell structure and the line number within it.  In sh or  ksh  emulation,  the\ndefault is `+ '.\n\npsvar <S> <Z> (PSVAR <S>)\nAn array (colon-separated list) whose elements can be used in PROMPT strings.  Setting\npsvar also sets PSVAR, and vice versa.\n\nREADNULLCMD <S>\nThe command name to assume if a single input redirection is specified with no command.\nDefaults to more.\n\nREPORTMEMORY\nIf  nonnegative, commands whose maximum resident set size (roughly speaking, main mem‐\nory usage) in kilobytes is greater than this value have  timing  statistics  reported.\nThe  format  used to output statistics is the value of the TIMEFMT parameter, which is\nthe same as for the REPORTTIME variable and the time builtin;  note  that  by  default\nthis  does  not  output memory usage.  Appending \" max RSS %M\" to the value of TIMEFMT\ncauses it to output the value that triggered the report.  If  REPORTTIME  is  also  in\nuse,  at most a single report is printed for both triggers.  This feature requires the\ngetrusage() system call, commonly supported by modern Unix-like systems.\n\nREPORTTIME\nIf nonnegative, commands whose combined user and system execution times  (measured  in\nseconds)  are greater than this value have timing statistics printed for them.  Output\nis suppressed for commands executed within the line editor, including completion; com‐\nmands explicitly marked with the time keyword still cause the summary to be printed in\nthis case.\n\nREPLY  This parameter is reserved by convention to pass string values between  shell  scripts\nand  shell  builtins in situations where a function call or redirection are impossible\nor undesirable.  The read builtin and the select complex command may  set  REPLY,  and\nfilename  generation  both sets and examines its value when evaluating certain expres‐\nsions.  Some modules also employ REPLY for similar purposes.\n\nreply  As REPLY, but for array values rather than strings.\n\nRPROMPT <S>\nRPS1 <S>\nThis prompt is displayed on the right-hand side of the screen when the primary  prompt\nis  being  displayed on the left.  This does not work if the SINGLELINEZLE option is\nset.  It is expanded in the same way as PS1.\n\nRPROMPT2 <S>\nRPS2 <S>\nThis prompt is displayed on the right-hand side  of  the  screen  when  the  secondary\nprompt  is being displayed on the left.  This does not work if the SINGLELINEZLE op‐\ntion is set.  It is expanded in the same way as PS2.\n\nSAVEHIST\nThe maximum number of history events to save in the history file.\n\nIf this is made local, it is not implicitly set to 0, but may be  explicitly  set  lo‐\ncally.\n\nSPROMPT <S>\nThe  prompt  used  for  spelling  correction.  The sequence `%R' expands to the string\nwhich presumably needs spelling correction, and `%r' expands to the  proposed  correc‐\ntion.  All other prompt escapes are also allowed.\n\nThe actions available at the prompt are [nyae]:\nn (`no') (default)\nDiscard the correction and run the command.\ny (`yes')\nMake the correction and run the command.\na (`abort')\nDiscard the entire command line without running it.\ne (`edit')\nResume editing the command line.\n\nSTTY   If  this  parameter is set in a command's environment, the shell runs the stty command\nwith the value of this parameter as arguments in order to set up the  terminal  before\nexecuting the command. The modes apply only to the command, and are reset when it fin‐\nishes  or is suspended. If the command is suspended and continued later with the fg or\nwait builtins it will see the modes specified by STTY, as if it  were  not  suspended.\nThis  (intentionally)  does  not  apply  if the command is continued via `kill -CONT'.\nSTTY is ignored if the command is run in the background, or if it is in  the  environ‐\nment  of  the shell but not explicitly assigned to in the input line. This avoids run‐\nning stty at every external command by accidentally exporting it. Also note that  STTY\nshould not be used for window size specifications; these will not be local to the com‐\nmand.\n\nIf  the  parameter  is set and empty, all of the above applies except that stty is not\nrun. This can be useful as a way to freeze the tty around a single  command,  blocking\nits changes to tty settings, similar to the ttyctl builtin.\n\nTERM <S>\nThe  type of terminal in use.  This is used when looking up termcap sequences.  An as‐\nsignment to TERM causes zsh to re-initialize the terminal, even if the value does  not\nchange  (e.g.,  `TERM=$TERM').   It  is  necessary to make such an assignment upon any\nchange to the terminal definition database or terminal type in order for the new  set‐\ntings to take effect.\n\nTERMINFO <S>\nA  reference to your terminfo database, used by the `terminfo' library when the system\nhas it; see terminfo(5).  If set, this causes the shell to reinitialise the  terminal,\nmaking the workaround `TERM=$TERM' unnecessary.\n\nTERMINFODIRS <S>\nA colon-seprarated list of terminfo databases, used by the `terminfo' library when the\nsystem  has  it;  see  terminfo(5). This variable is only used by certain terminal li‐\nbraries, in particular ncurses; see terminfo(5) to check support on your  system.   If\nset,  this  causes  the  shell  to  reinitialise  the  terminal, making the workaround\n`TERM=$TERM' unnecessary.  Note that unlike other colon-separated arrays this  is  not\ntied to a zsh array.\n\nTIMEFMT\nThe format of process time reports with the time keyword.  The default is `%J  %U user\n%S  system %P cpu %*E total'.  Recognizes the following escape sequences, although not\nall may be available on all systems, and some that are available may not be useful:\n\n%%     A `%'.\n%U     CPU seconds spent in user mode.\n%S     CPU seconds spent in kernel mode.\n%E     Elapsed time in seconds.\n%P     The CPU percentage, computed as 100*(%U+%S)/%E.\n%W     Number of times the process was swapped.\n%X     The average amount in (shared) text space used in kilobytes.\n%D     The average amount in (unshared) data/stack space used in kilobytes.\n%K     The total space used (%X+%D) in kilobytes.\n%M     The  maximum memory the process had in use at any time in kilobytes.\n%F     The number of major page faults (page needed to be brought from disk).\n%R     The number of minor page faults.\n%I     The number of input operations.\n%O     The number of output operations.\n%r     The number of socket messages received.\n%s     The number of socket messages sent.\n%k     The number of signals received.\n%w     Number of voluntary context switches (waits).\n%c     Number of involuntary context switches.\n%J     The name of this job.\n\nA star may be inserted between the percent sign and flags printing time (e.g., `%*E');\nthis causes the time to be printed in `hh:mm:ss.ttt' format  (hours  and  minutes  are\nonly  printed  if  they  are  not zero).  Alternatively, `m' or `u' may be used (e.g.,\n`%mE') to produce time output in milliseconds or microseconds, respectively.\n\nTMOUT  If this parameter is nonzero, the shell will receive an ALRM signal if  a  command  is\nnot entered within the specified number of seconds after issuing a prompt. If there is\na trap on SIGALRM, it will be executed and a new alarm is scheduled using the value of\nthe TMOUT parameter after executing the trap.  If no trap is set, and the idle time of\nthe  terminal is not less than the value of the TMOUT parameter, zsh terminates.  Oth‐\nerwise a new alarm is scheduled to TMOUT seconds after the last keypress.\n\nTMPPREFIX\nA pathname prefix which the shell will use for all temporary files.   Note  that  this\nshould  include an initial part for the file name as well as any directory names.  The\ndefault is `/tmp/zsh'.\n\nTMPSUFFIX\nA filename suffix which the shell will use for temporary files created by process sub‐\nstitutions (e.g., `=(list)').  Note that the value should include a leading dot `.' if\nintended to be interpreted as a file extension.  The default is not to append any suf‐\nfix, thus this parameter should be assigned only when needed and then unset again.\n\nWORDCHARS <S>\nA list of non-alphanumeric characters considered part of a word by the line editor.\n\nZBEEP  If set, this gives a string of characters, which can use all the  same  codes  as  the\nbindkey  command  as described in the zsh/zle module entry in zshmodules(1), that will\nbe output to the terminal instead of beeping.  This may have a visible instead  of  an\naudible  effect;  for example, the string `\\e[?5h\\e[?5l' on a vt100 or xterm will have\nthe effect of flashing reverse video on and off (if you usually use reverse video, you\nshould use the string `\\e[?5l\\e[?5h' instead).  This takes precedence over the  NOBEEP\noption.\n\nZDOTDIR\nThe directory to search for shell startup files (.zshrc, etc), if not $HOME.\n"
                },
                {
                    "name": "zle_bracketed_paste",
                    "content": "Many  terminal emulators have a feature that allows applications to identify when text\nis pasted into the terminal rather than being typed normally. For ZLE, this means that\nspecial characters such as tabs and newlines can be inserted instead of invoking  edi‐\ntor commands.  Furthermore, pasted text forms a single undo event and if the region is\nactive, pasted text will replace the region.\n\nThis  two-element  array  contains the terminal escape sequences for enabling and dis‐\nabling the feature. These escape sequences are used to enable bracketed paste when ZLE\nis active and disable it at other times.  Unsetting the parameter has  the  effect  of\nensuring that bracketed paste remains disabled.\n"
                },
                {
                    "name": "zle_highlight",
                    "content": "An  array describing contexts in which ZLE should highlight the input text.  See Char‐\nacter Highlighting in zshzle(1).\n\nZLELINEABORTED\nThis parameter is set by the line editor when an error occurs.  It contains  the  line\nthat was being edited at the point of the error.  `print -zr -- $ZLELINEABORTED' can\nbe used to recover the line.  Only the most recent line of this kind is remembered.\n\nZLEREMOVESUFFIXCHARS\nZLESPACESUFFIXCHARS\nThese parameters are used by the line editor.  In certain circumstances suffixes (typ‐\nically  space  or slash) added by the completion system will be removed automatically,\neither because the next editing command was not an insertable  character,  or  because\nthe character was marked as requiring the suffix to be removed.\n\nThese  variables  can  contain the sets of characters that will cause the suffix to be\nremoved.  If ZLEREMOVESUFFIXCHARS is set, those characters will cause the suffix to\nbe removed; if ZLESPACESUFFIXCHARS is set, those characters will cause  the  suffix\nto be removed and replaced by a space.\n\nIf ZLEREMOVESUFFIXCHARS is not set, the default behaviour is equivalent to:\n\nZLEREMOVESUFFIXCHARS=$' \\t\\n;&|'\n\nIf  ZLEREMOVESUFFIXCHARS  is  set  but is empty, no characters have this behaviour.\nZLESPACESUFFIXCHARS takes precedence, so that the following:\n\nZLESPACESUFFIXCHARS=$'&|'\n\ncauses the characters `&' and `|' to remove the suffix but to replace it with a space.\n\nTo illustrate the difference, suppose that the option AUTOREMOVESLASH is  in  effect\nand the directory DIR has just been completed, with an appended /, following which the\nuser  types  `&'.  The default result is `DIR&'.  With ZLEREMOVESUFFIXCHARS set but\nwithout including `&' the result is `DIR/&'.  With ZLESPACESUFFIXCHARS set  to  in‐\nclude `&' the result is `DIR &'.\n\nNote  that certain completions may provide their own suffix removal or replacement be‐\nhaviour which overrides the values described here.  See the completion system documen‐\ntation in zshcompsys(1).\n\nZLERPROMPTINDENT <S>\nIf set, used to give the indentation between the right hand side of the  right  prompt\nin  the line editor as given by RPS1 or RPROMPT and the right hand side of the screen.\nIf not set, the value 1 is used.\n\nTypically this will be used to set the value to 0 so that  the  prompt  appears  flush\nwith  the right hand side of the screen.  This is not the default as many terminals do\nnot handle this correctly, in particular when the prompt appears at the extreme bottom\nright of the screen.  Recent virtual terminals are more likely  to  handle  this  case\ncorrectly.  Some experimentation is necessary.\n\nzsh 5.9                                     May 14, 2022                                 ZSHPARAM(1)"
                }
            ]
        }
    },
    "summary": "zshparam - zsh parameters",
    "flags": [],
    "examples": [],
    "see_also": []
}