Character Index, e.g. What does this character mean?

This is intended to be a list of the various and multiple meanings in the zsh of all the characters on the keyboard. Flags, punctuation, etc. It is sorted in ASCII order, but with case-folded. While it is intended to be complete, it is not so yet. (Quite a bit of the phrasing used below was copied from the ZSH Reference Card.)

!

  1. !(pat) is a KSH_GLOB operator meaning anything but pat
  2. !expr is the general form of history expansion
  3. ! is a history event designator expansion referring to the previous command
  4. %! is a prompt expansion for the current history event number
  5. ! is a shell variable automatically set to the Process ID of last background process
  6. STRING != PATTERN is a conditional expression operator which is true if STRING does not match PATTERN
  7. ! expr is a conditional expression operator which is true if expr is false
  8. !-foo prevents -foo from being completed within the argument specifiers used by the _arguments completion utility function

"

  1. " serves to mark double quoted strings, a type of quoting (the others are single quoting (') and backslash quoting (\)); in double quotes, parameter expansion, command substitution, and limited backslash quoting occur.
  2. !" turns off the history mechanism for the current list

#

  1. X# is an EXTENDED_GLOB globbing pattern meaning zero or more occurrences of element X
  2. X## is an EXTENDED_GLOB globbing pattern meaning one or more occurrences of element X
  3. (#X) is the form of all EXTENDED_GLOB globbing flags, where X is the flag.
  4. #, in scripts (or interactively, with INTERACTIVE_COMMENTS set) makes the rest of the line a comment.
  5. !# is a history expansion referring to the current command line so far.
  6. %# is a prompt expansion used to identify root shells.
  7. ${var#pat} is a parameter expansion form returning the minimum match of pat removed from head
  8. ${var##pat} is a parameter expansion form returning the maximum match of pat removed from head
  9. ${var:#pat} is a parameter expansion form returning var unless pat matches, then empty
  10. ${#var} is a parameter expansion form returning the length of var in words (if it's an array) or bytes otherwise.
  11. # is a shell variable automatically set to the number of arguments to a script or function
  12. # at the start of the matching pattern in a s/l/r/ history expansion with HIST_SUBST_PATTERN set anchors the pattern to the start of string to be matched
  13. BASE#N inside an arthemitic expression, means the integer N expressed in the base BASE

$

  1. $var performs variable (i.e. parameter) substitution/expansion
  2. ${var} performs parameter substitution/expansion, and allows parameter expansion flags and alternative parameter expansion forms.
  3. $(cmds) turns into the output of cmds, i.e. does command substitution (this is a synonym for `cmds` (backquoting))
  4. $((expr)) performs arithmetic substitution, i.e. it does math on expr and turns into the result
  5. :$ is a history expansion word selector referring to the last command argument; it's often used in the form of !!:$ which expands to the last argument of the previous command
  6. $ is a shell variable automatically set to the process ID of the main shell process

%

  1. % is a glob qualifier referring to special files
  2. % is a parameter expansion flag (e.g. ${(%)VARIABLE}) indicating that the string in VARIABLE should be prompt expanded
  3. %b is a glob qualifier referring to block special files
  4. %c is a glob qualifier referring to character special files
  5. %[optional integer]single character forms all prompt expansions; rather than duplicating them here, please look them up under their single character
  6. %% is a prompt expansion that expands to a percent character (i.e. "%")
  7. !?str?:% is a history expansion referring to the most recent word in the history matching str
  8. !% or !:% is a history expansion referring to the word matched by the last !?str? history expansion (the % is a word selector/designator)
  9. ${var%pat} is a parameter expansion form returning the minimum match of pat removed from the tail end of the value of var
  10. ${var%%pat} is a parameter expansion form returning the maximum match of pat removed from the tail end of the value of var
  11. % in arithmetic expansions is the modulus operator
  12. %= in arithmetic expansions is the modulus assignment operator
  13. %d in the value of the format completion zstyle refers to the specific format
  14. % at the start of the matching pattern in a s/l/r/ history expansion with HIST_SUBST_PATTERN set anchors the pattern to the end of string to be matched
  15. %NUMBER is a job control reference to NUMBER job
  16. %STRING is a job control reference to a job whose command line begins with STRING
  17. %?STRING is a job control reference to a job whose command line contains STRING
  18. %% OR %+ are job control references to the current job
  19. %- is a job control references to the previous job

&

  1. && is a command separator which makes the following command run only if the previous one succeeded, and a arithmetic operator which means logical AND
  2. EXP1 && EXP2 is a conditional expression operator which is true if EXP1 and EXP2 are true
  3. |& is a command separator which is shorthand for 2>&1 |, which sends stdout and stderr to stdin of the next command
  4. & is a sublist terminator which puts the pipeline before it into the background, and an arithmetic operator which means bitwise AND
  5. &! or &| are sublist terminators which background and disown (don't track in the jobs table) their sublists
  6. :& is a expansion modifier causing a previously set of search and replace strings to be re-used
  7. <& number is a redirection operator which duplicates stdin from file descriptor number
  8. >& number is a redirection operator which duplicates stdout from file descriptor number
  9. <& - is a redirection operator which closes stdin
  10. >& - is a redirection operator which closes stdout
  11. <& p is a redirection operator which moves coprocess input to stdin
  12. >& p is a redirection operator which moves stdout to coprocess output
  13. >& word or &> word are redirection operators which redirect both stdout and stderr to word (>& will be interpreted as above, if possible; use &> if to remove ambiguity)
  14. >&| word or >&! word or &>| word or &>! word are redirection operators which silently overwrite word, and redirect both stdout and stderr
  15. »& word or word are redirection operators which redirect both stdout and stderr to word in append mode
  16. »&| word or »&! word or &»| word or &»! word are redirection operators which silently create word, and redirect both stdout and stderr to it in append mode
  17. ;& is a list terminator used in case statements which causes fall-through, i.e. the next list will be executed, too
  18. &= or &&= are arithmetic operators which combine bitwise or logical AND with assignment
  19. & in the replacement string in a :s/l/r/ expansion modifier substitution is replaced by the matched text

'

  1. ' is used to quote things; it is referred as single-quoting
  2. '' (two single quotes), when the option RC_QUOTES is on, get turned into one single quote when found inside a single-quoted string; otherwise, they just vanish (i.e. they end the string, and start a new one, which gets automatically joined with the last one)
  3. $'str' is processed like the print builtin does, and quoted

(

  1. (list) executes list in a subshell
  2. (choices) enclose choices in a foreach statement
  3. optionally surround patterns in a case statement
  4. optional when defining a function
  5. (pat) is a glob pattern that groups globbing patterns
  6. (pat1|pat2) is a glob pattern that matches either pat1 or pat2
  7. K(pat) (where K is a KSH_GLOB operator) is the form of such operators
  8. (#X) is the form of a globbing flag, where X is the flag in question (listed under their individual letters) Note that some flags take additional arguments, which are included in the parentheses. Also note that all such flags require the EXTENDED_GLOB option.
  9. pat(glob qualifiers) is the form for glob qualifiers, which are listed under their individual letters
  10. surround the list executed in process substitution
  11. surround the command executed in command substitution ($())
  12. a pair surrounds arithmetic expansion
  13. may be used to surround parameter expansion flags, instead of :
  14. group tests within a double square bracket test expression
  15. doubled, activates arithmetic expansion within test expressions
  16. surround arguments to math functions
  17. surround list of options to be excluded in the argument specifiers used by the _arguments completion utility function
  18. surround explicit list of possible completions for arguments to options in the argument specifiers used by the _arguments completion utility function
  19. sets of arguments in the argument specifiers used by the _arguments completion utility function
  20. can be used for grouping in a conditional expression

)

  1. See (
  2. %) is a prompt expansion that expands to a close paren character (i.e. ")")

*

  1. * is a glob pattern referring to any string
  2. * is a glob qualifier referring to executable plain files (e.g. "*(*)")
  3. **/ is a glob pattern referring to any number of directories, i.e. all subdirectories
  4. ***/ same as "**/" but also follows symlinks
  5. *(pat) is a KSH_GLOB operator meaning zero or more copies of pat
  6. * is a shell variable automatically set to the list of positional parameters within a script or function; it is a synonym for argv
  7. * in arithmetic expansions is the multiplication operator
  8. ** in arithmetic expansions is the exponentiation operator
  9. *= in arithmetic expansions is the multiplication assignment operator
  10. **= in arithmetic expansions is the exponentiation assignment operator
  11. %* is a prompt expansion expanding to current time of day in 24-hour format, with seconds.
  12. * is a history word selector which selects all the arguments on the selected command line, or a null value if there are none.
  13. Other meanings not yet listed here…

+

  1. +cmd is a glob qualifier referring to files for which cmd evaluates to true (cmd must be a single word)
  2. $+VARIABLE returns 0 if VARIABLE is not set, and 1 if it is set (even if it is set to the empty string)
  3. +(pat) is a KSH_GLOB operator meaning one or more copies of pat
  4. Other meanings not yet listed here…

,

-

  1. - is a glob qualifier toggling link following behavior; i.e. does globing work on symbolic link targets, or the link files themselves (default is link files, not targets)
  2. <num1-num2> is a glob pattern meaning any number between num1 and num2; if num1 missing, from 0 to num2; if num2 missing, from num1 to infinity
  3. - is a precommand modifier that prepends a dash to the command name stored in argv[0]
  4. - is a shell variable automatically set to the flags supplied to the shell
  5. Other meanings not yet listed here…

.

  1. . is a glob quantifier referring to plain files
  2. . FILE is a shell builtin that sources FILE, i.e. reads commands from it and executes them
  3. Other meanings not yet listed here…

/

  1. / is a glob quantifier referring to directories
  2. **/ is a glob pattern referring to any number of directories, i.e. all subdirectories
  3. -/ is an option to the _path_files completion function causing it to complete only directories
  4. Other meanings not yet listed here…
  1. -0 is a synonym for the CORRECT option
  2. 0 is a shell variable automatically set to the name used to invoke the current shell; with the FUNCTION_ARGZERO option set, reflects the name of functions and scripts while within them
  3. 0x OR 0X begins a hexadecimal literal integer

1

2

3

  1. -3 is a synonym for the NO_NO_MATCH option

4

  1. -4 is a synonym for the GLOB_DOTS option

5

  1. -5 is a synonym for the NOTIFY option

6

  1. -6 is a synonym for the BG_NICE option

7

  1. -7 is a synonym for the IGNORE_EOF option

8

  1. -8 is a synonym for the MARK_DIRS option

9

  1. -9 is a synonym for the AUTO_LIST option

:

  1. : is a shell builtin that does nothing, and returns true, but without stdout/stderr output
  2. : separates parts of a zstyle context
  3. :class: is the form of all character classes, where class is one of alnum, alpha, etc
  4. Other meanings not yet listed here…

;

  1. ; terminates a sublist, and is a synonym for a newline
  2. ;; terminates a particular case within a case statement
  3. ;& terminates a particular case within a case statement, but falls through
  4. ;| terminates a particular case within a case statement, but keeps looking for matching cases
  5. Other meanings not yet listed here…

<

  1. <num1-num2> is a glob pattern meaning any number between num1 and num2; if num1 missing, from 0 to num2; if num2 missing, from num1 to infinity
  2. <(cmds) is a type of process substitution (expansion), which expands to a device file (or FIFO) holding the output of cmds
  3. STRING1 < STRING2 is a conditional expression operator which is true if STRING1 comes before STRING2 based on ASCII value of their characters
  4. Other meanings not yet listed here…

=

  1. = is a glob quantifier referring to sockets
  2. =(cmds) is a type of process substitution (expansion), which expands to temporary file holding the output of cmds
  3. STRING == PATTERN OR STRING = PATTERN are conditional expression operators which are true if STRING matches PATTERN (The single equals form is obsolete.)
  4. STRING =~ REGEXP is a conditional expression operator which is true if STRING matches REGEXP
  5. Other meanings not yet listed here…

>

  1. <num1-num2> is a glob pattern meaning any number between num1 and num2; if num1 missing, from 0 to num2; if num2 missing, from num1 to infinity
  2. >(cmds) is a type of process substitution (expansion), which expands to a device file (or FIFO) which will be read for standard input by cmds
  3. STRING1 > STRING2 is a conditional expression operator which is true if STRING1 comes after STRING2 based on ASCII value of their characters
  4. Other meanings not yet listed here…

?

  1. ? is a glob pattern matching any single character
  2. ?(pat) is a KSH_GLOB operator matching zero or 1 copy of pat
  3. !?str is a history expansion referring to the last command containing str
  4. %? is a prompt expansion for the return status of most recently executed command
  5. ${var:?str} is a parameter expansion form which returns var if it is non-null, otherwise prints str(if given) as an error and aborts
  6. ? is a shell variable automatically set to the status of the most recently executed command
  7. test?true_exp:false_exp is the C ternary if statement, usable only within arithmetic expressions

@

  1. @(pat) is a KSH_GLOB operator used to group patterns
  2. @ is a glob quantifier referring to symbolic links
  3. %@ is a prompt expansion expanding to the current time, in 12 hour (AM/PM) format. (%t is a synonym)
  4. @ is a parameter expansion flag causing arrays to be expanded even within double quotes
  5. @ is a shell variable automatically set to the list of positional parameters within a script or function; unlike argv, it splits into words even within double quotes.

a

  1. -a is a synonym for the ALL_EXPORT option
  2. -A and +A are options to the set builtin used for creating arrays
  3. (#anum) is an EXTENDED_GLOB globbing flag causing num approximations to be permitted in matches
  4. a is a glob qualifier specifying a particular access time; its format is a followed by one of the letters Mwhms (referring to the time units: Months, weeks, hours, minutes or seconds) followed by a plus or minus (referring to at older than or newer than), followed by a number (to set how many time units)
  5. A is a glob qualifier specifying the group read permission is set, i.e. –r—– or 0040
  6. A is a parameter expansion flag which creates an array parameter
  7. AA is a parameter expansion flag which creates an associative array parameter
  8. a is a parameter expansion flag causing sorting to be done on array index
  9. -a FILE is a conditional expression operator, identical to -e, i.e. it is true if FILE exists
  10. oa is a glob qualifier which causes the results to be sorted by access time; see under o for other sort orders
  11. :a is an expansion modifier that turns a file name into an absolute path.
  12. :A is an expansion modifier that turns a file name into an absolute path, resolving symlinks.

b

  1. -B is a synonym for the NO_BEEP option
  2. (#b) is an EXTENDED_GLOB globbing flag turning on backreferences, i.e. setting the shell parameters match, mbegin, & mend.
  3. (#B) is an EXTENDED_GLOB globbing flag turning off backreferences
  4. %b is a glob qualifier referring to block special files
  5. -b FILE is a conditional expression operator which is true if FILE is an existing block special file
  6. Other meanings not yet listed here…

c

  1. -C is a synonym for the NO_CLOBBER option
  2. %c is a glob qualifier referring to character special files
  3. c is a glob qualifier specifying a particular inode change (attribute modification) time; it's format is c followed by one of the letters Mwhms (referring to the time units: Months, weeks, hours, minutes or seconds) followed by a plus or minus (referring to at older than or newer than), followed by a number (to set how many time units)
  4. oc is a glob qualifier which causes the results to be sorted by inode change (attribute modification) time; see under o for other sort orders
  5. :c is an expansion modifier that turns a command name into an absolute path
  6. -c FILE is a conditional expression operator which is true if FILE is an existing character special file
  7. Other meanings not yet listed here…

d

  1. -D is a synonym for the PUSHD_TO_HOME option
  2. ddev is a glob qualifier referring to files with a device number of dev
  3. D is a glob qualifier which turns on the GLOB_DOTS option
  4. oc is a glob qualifier which causes the results to be sorted with files in subdirectories first; see under o for other sort orders
  5. -d FILE is a conditional expression operator which is true if FILE is an existing directory
  6. Other meanings not yet listed here…

e

  1. -e is a synonym for the ERR_EXIT option
  2. -E is a synonym for the PUSHD_SILENT option
  3. (#e) is a globbing flag that forces the pattern to only match at the end of the test string
  4. eDstringD is a glob qualifier (where D is any character, used as delimiter for string) referring to files for which string evaluates to true
  5. E is a glob qualifier specifying the group execute permission is set, i.e. —-x— or 0010
  6. :e is an expansion modifier that removes all but the extension
  7. -e FILE is a conditional expression operator which is true if FILE exists
  8. FILE1 -ef FILE2 is a conditional expression operator which is true if both files exist and are names for the same thing
  9. EXP1 -eq EXP2 is a conditional expression operator which is true if both expressions are numerically equal.
  10. Other meanings not yet listed here…

f

  1. -F is a synonym for the NO_GLOB option
  2. -f is a synonym for the NO_RCS option
  3. F is a glob quantifier referring to non-empty directories
  4. fspec is a glob quantifier referring to files with the chmod-style permissions of spec
  5. -f is an option to the _path_files completion function causing it to complete all files, as is the default
  6. -F files is an option to the _path_files completion function causing it to ignore, i.e. not complete files, overriding ignored-patterns
  7. :fX is an expansion modifier that repeats the following modifier (X) until the result doesn't change any more (Only works with parameter expansion)
  8. :F:EXPR:X is an expansion modifier with the same effect as :f, but has the repetition limited to EXPR times. The colons can be any other character, if needed. (Only works with parameter expansion)
  9. -f FILE is a conditional expression operator which is true if FILE is an existing regular file
  10. Other meanings not yet listed here…

g

  1. -g is a synonym for the HIST_IGNORE_SPACE option
  2. -G is a synonym for the NULL_GLOB option
  3. G is a glob qualifier referring to files owned by a user in the same group as the current effective user (i.e. with the same effective GID)
  4. ggid is a glob qualifier referring to files owned by a user in gid (can be a name instead of a number)
  5. -g pat is an option to the _path_files completion function causing it to complete files that match pat
  6. -g FILE is a conditional expression operator which is true if FILE is an existing file with its setgid bit set
  7. -G FILE is a conditional expression operator which is true if FILE is in the current group
  8. EXP1 -gt EXP2 is a conditional expression operator which is true if EXP1 is numerically greater than EXP2
  9. EXP1 -ge EXP2 is a conditional expression operator which is true if EXP1 is numerically greater than or equal to EXP2
  10. Other meanings not yet listed here…

h

  1. -h is a synonym for the HIST_IGNORE_DUPS option
  2. -H is a synonym for the RM_STAR_SILENT option
  3. ah, ch or mh are glob qualifiers specifying a particular access time, inode change (attribute modification) time, or modification time; see under a, c or m for details
  4. :h is an expansion modifier that acts like dirname, removing a trailing pathname component
  5. -h FILE is a conditional expression operator, identical to -e, i.e. it is true if FILE is an existing symbolic link
  6. Other meanings not yet listed here…

i

  1. -I is a synonym for the IGNORE_BRACES option
  2. -i is a synonym for the INTERACTIVE option
  3. (#i) is an EXTENDED_GLOB globbing flag causing case insensitive matching
  4. (#I) is an EXTENDED_GLOB globbing flag causing case sensitive matching
  5. I is a glob qualifier specifying the group write permission is set, i.e. —w—- or 0020
  6. Other meanings not yet listed here…

j

  1. -J is a synonym for the AUTO_CD option
  2. %j is a prompt expansion referring to the number of jobs, as displayed by the jobs builtin
  3. j:str: is a parameter expansion flag causing the words expanded by the parameter to be joined with str in between

k

  1. -k is a synonym for the INTERACTIVE_COMMENTS option
  2. -K is a synonym for the NO_BANG_HIST option
  3. -k FILE is a conditional expression operator which is true if FILE is an existing file with its sticky bit set
  4. Other meanings not yet listed here…

l

  1. -l is a synonym for the LOGIN option
  2. -L is a synonym for the SUN_KEYBOARD_HACK option
  3. (#l) is an EXTENDED_GLOB globbing flag causing lower case to match upper case
  4. l-num and l+num are glob qualifiers referring to files with link counts less than (or greater than, for +) num
  5. oL is a glob qualifier which causes the results to be sorted by file size (Length); see under o for other sort orders
  6. ol is a glob qualifier which causes the results to be sorted by link count; see under o for other sort orders
  7. %l is a prompt expansion that expands to the user's tty line
  8. %L is a prompt expansion that expands to the current value of $SHLVL (the depth of nested shells)
  9. :l is an expansion modifier that converts the words to lowercase
  10. -L FILE is a conditional expression operator which is true if FILE is an existing symbolic link
  11. EXP1 -lt EXP2 is a conditional expression operator which is true if EXP1 is numerically less than EXP2
  12. EXP1 -le EXP2 is a conditional expression operator which is true if EXP1 is numerically less than or equal to EXP2
  13. Other meanings not yet listed here…

m

  1. -m is a synonym for the MONITOR option
  2. -M is a synonym for the SINGLE_LINE_ZLE option
  3. (#m) is an EXTENDED_GLOB globbing flag causing the match data to be saved, i.e. the contents and length of the match are put in the shell parameters MATCH, MBEGIN and MEND
  4. m is a glob qualifier specifying a particular modification time; its format is m followed by one of the letters Mwhms (referring to the time units: Months, weeks, hours, minutes or seconds) followed by a plus or minus (referring to at older than or newer than), followed by a number (to set how many time units)
  5. M is a glob qualifier which causes directories to be marked (i.e. sets the MARK_DIRS option)
  6. (#M) is an EXTENDED_GLOB globbing flag causing the match data not be saved
  7. aM, am, cM or cm are glob qualifiers specifying a particular access time (the first two) or inode change (attribute modification) time; see under a or c for details.
  8. om is a glob qualifier which causes the results to be sorted by modification time; see under o for other sort orders
  9. Other meanings not yet listed here…

n

  1. -N is a synonym for the AUTO_PUSHD option
  2. -n is a synonym for the NO_EXEC option
  3. N is a glob qualifier which turns on the NULL_GLOB option
  4. n is a glob qualifier which turns on the NUMERIC_GLOB_SORT option
  5. on is a glob qualifier which causes the results to be sorted by name; see under o for other sort orders
  6. -n STRING is a conditional expression operator which is true if STRING's length is non-zero
  7. -N FILE is a conditional expression operator which is true if FILE hasn't been accessed since it was modified
  8. FILE1 -nt FILE2 is a conditional expression operator which is true if FILE1 exists and is newer than FILE2
  9. EXP1 -ne EXP2 is a conditional expression operator which is true if EXP1 is not numerically equal to EXP2
  10. Other meanings not yet listed here…

o

  1. -O is a synonym for the CORRECT_ALL option
  2. o is a glob qualifier that selects a type of sorting; the choices are on, name (default); oL, size (Length); ol, link count; oa, access time, om, modification time, oc, inode change (attribute modification) time, od, files in subdirectories appear before those in the current directory at each level of the search
  3. O is a glob qualifier that selects a type of sorting, reversed from o; the choices are the same as with o
  4. -o OPTION is a conditional expression operator which is true if OPTION is on (if OPTION is a single letter, it's a single letter option synonym, without the normal initial dash)
  5. -O FILE is a conditional expression operator which is true if FILE is owned by the current user
  6. FILE1 -ot FILE2 is a conditional expression operator which is true if FILE1 exists and is older than FILE2
  7. Other meanings not yet listed here…

p

  1. -P is a synonym for the RC_EXPAND_PARAM option
  2. -p is a synonym for the PRIVILEGED option
  3. p is a glob qualifier referring to named pipes (FIFOs)
  4. P is a parameter expansion flag which causes the name in the parameter expansion to be treated as a variable whose value then becomes the value of the expansion
  5. p is a parameter expansion flag that activates print escape sequences in the *arguments* of other parameter expansion flags
  6. :p is a expansion modifier (only for history expansion) which causes the expansion to be printed, but not executed as it would be normally
  7. -p FILE is a conditional expression operator which is true if FILE is an existing FIFO special file (named pipe)
  8. Other meanings not yet listed here…

q

  1. -Q is a synonym for the PATH_DIRS option
  2. (#qexpr) is an EXTENDED_GLOB globbing flag listing a set of glob qualifiers
  3. :q is a expansion modifier which adds a layer of quotes
  4. :Q is a expansion modifier which strips off a layer of quotes
  5. q is a parameter expansion flag causing the result to be quoted with backslashes
  6. qq is a parameter expansion flag causing the result to be quoted with single quotes
  7. qqq is a parameter expansion flag causing the result to be quoted with double quotes
  8. qqqq is a parameter expansion flag causing the result to be quoted with the $'…' form
  9. Q is a parameter expansion flag which strips off a layer of quotes

r

  1. r is a shell builtin that is a synonym for fc -e -, i.e. repeat the last command
  2. -R is a synonym for the LONG_LIST_JOBS option
  3. -r is a synonym for the RESTRICTED option
  4. r is a glob qualifier specifying that matched files are readable by their owners
  5. R is a glob quantifier referring world readable files
  6. :r is an expansion modifier that removes a file extension
  7. -r FILE is a conditional expression operator which is true if FILE is an existing, currently readable, file
  8. Other meanings not yet listed here…

s

  1. -S is a synonym for the REC_EXACT option
  2. -s is a synonym for the SHIN_STDIN option
  3. (#s) is an EXTENDED_GLOB globbing flag forcing the pattern to only match at the beginning of the test string
  4. s is a glob quantifier referring to setuid files (set user id)
  5. s is a glob quantifier referring to setgid files (set group id)
  6. as, cs or ms are glob qualifiers specifying a particular access time, inode change (attribute modification) time, or modification time; see under a, c or m for details
  7. :s/l/r is an expansion modifier that does single replacement
  8. :s/l/r/:G or :gs/l/r is an expansion modifier that does global replacement
  9. -s FILE is a conditional expression operator which is true if FILE is an existing file with a non-zero size
  10. -S FILE is a conditional expression operator which is true if FILE is an existing socket
  11. Other meanings not yet listed here…

t

  1. -T is a synonym for the CDABLE_VARS option
  2. -t is a synonym for the SINGLE_COMMAND option
  3. t is a glob quantifier referring to files with the sticky bit set
  4. T is a glob qualifier which causes directories, links, and special files to be marked (i.e. sets the LIST_TYPES option)
  5. :t is an expansion modifier that acts like basename, removing all leading pathname components
  6. -t FD is a conditional expression operator which is true if FD is open and associated with a terminal device
  7. Other meanings not yet listed here…

u

  1. -U is a synonym for the MAIL_WARNING option
  2. -u is a synonym for the NO_UNSET option
  3. U is a glob qualifier referring to files owned by the current effective UID
  4. uuid is a glob qualifier referring to files owned by uid (can be a name instead of a number)
  5. :u is an expansion modifier that converts the words to uppercase
  6. -u FILE is a conditional expression operator which is true if FILE is an existing file with its setuid bit set
  7. Other meanings not yet listed here…

v

  1. -V is a synonym for the NO_PROMPT_CR option
  2. -v is a synonym for the VERBOSE option
  3. Other meanings not yet listed here…

w

  1. -W is a synonym for the AUTO_RESUME option
  2. -w is a synonym for the CHASE_LINKS option
  3. w is a glob qualifier specifying that matched files are writable by their owners
  4. W is a glob quantifier referring world writable files
  5. aw, cw or mw are glob qualifiers specifying a particular access time, inode change (attribute modification) time, or modification time; see under a, c or m for details.
  6. -W dirs is an option to the _path_files completion function causing it to look in dirs for files to complete
  7. :wX is an expansion modifier that applies the following modifier (X) to each word in the string (Only works with parameter expansion)
  8. :W:SEP:X is an expansion modifier with the same effect as :w, but splits words using SEP. The colons can be any other character, if needed. (Only works with parameter expansion)
  9. -w FILE is a conditional expression operator which is true if FILE is an existing, currently writable, file
  10. Other meanings not yet listed here…

x

  1. -X is a synonym for the LIST_TYPES option
  2. -x is a synonym for the XTRACE option
  3. x is a glob qualifier specifying that matched files are executable by their owners
  4. X is a glob quantifier referring world executable files
  5. :x is an expansion modifier that adds a layer of quotes, after breaking into words on whitespace (doesn't work on parameter expansion)
  6. -x FILE is a conditional expression operator which is true if FILE is an existing, currently executable, file
  7. Other meanings not yet listed here…

y

  1. -Y is a synonym for the MENU_COMPLETE option
  2. -y is a synonym for the SH_WORD_SPLIT option
  3. Other meanings not yet listed here…

z

  1. -Z is a synonym for the ZLE option
  2. -z STRING is a conditional expression operator which is true if STRING's length is zero
  3. Other meanings not yet listed here…

[

  1. [[ cond ]] evaluates cond as a conditional expression, returning true (0) or false (1)
  2. [ cond ] is a synonym for the test builtin, i.e. it evaluates cond as a POSIX-style test expression, returning true (0), false (1), or error (2)
    1. [class] is a glob pattern meaning any single character in class
  3. [^class] is a glob pattern meaning any single character not in class
  4. [num] is a glob qualifier causing the pattern to only return only the numth result
  5. [beg,end] is a glob qualifier causing the pattern to only return the results between beg and end as if they were an array (beg and end can be expressions)
  6. [BASE]N inside an arthemitic expression, means the integer N expressed in the base BASE (This is a depreciated form; BASE#N is preferred)
  7. [#BASE] inside an arthemitic expression, sets the base for output - [##BASE] inside an arthemitic expression, sets the base for output, but doesn't display a base prefix
  8. Other meanings not yet listed here…

\

  1. \C quotes the character
  2. \[newline] removes the newline, i.e. acts as a line continuation

]

  1. See [

^

  1. [^class] is a glob pattern meaning any single character not in class
  2. ^pat is an EXTENDED_GLOB globbing pattern meaning anything that doesn't match pat
  3. ^ is a glob quantifier which negates the following quantifiers
  4. ^ is a history word selector which selects the first argument (i.e. a synonym for 1)
  5. ${^var} is a parameter expansion form that causes the elements of var to be expanded like brace expansion

_

  1. _ is a shell variable automatically set (within the shell) to the last argument of the previous command, and (within a command) to the command's full pathname

{

  1. {list} groups the commands in list, so they act like a single command, e.g. they can be redirected as a whole
  2. ${var} performs parameter substitution/expansion, and allows parameter expansion flags and alternative parameter expansion forms (for which, see under their sections in this page)

|

  1. || is used to connect pipelines (or single simple commands) into an OR sublist
  2. | , the pipe character, is used to redirect the output of one command into the input of another, forming a pipeline
  3. (pat1|pat2) is a glob pattern that matches either pat1 or pat2
  4. EXP1 || EXP2 is a conditional expression operator which is true if either EXP1 or EXP2 are true
  5. Other meanings not yet listed here…

}

  1. See {

~

  1. pat~exclude_pat is an EXTENDED_GLOB globbing pattern meaning anything that matches pat and doesn't match exclude_pat
 
scripting/charindex.txt · Last modified: 2013/04/03 01:38 by khayyam