ZSHCOMPSYS(1) General Commands Manual ZSHCOMPSYS(1) (NAME) zshcompsys - zsh (DESCRIPTION) <<>> compsys . zshcompwid(1) . (contextual) . . INITIALIZATION . : o : . << rmdir >> o . << >> << >>. . : styles tags. . (tags) . . ls directories files . . (styles) ( ) . zstyle zshmodules(1) . . / . COMPLETION SYSTEM CONFIGURATION . _main_complete . . completer : . : o <> o <<_>> . (bind) <> . . compinit . compinstall . compinstall .zshrc . .zshrc .zshrc (returns early) . ( ) compinstall . compinstall `zstyle' . .zshrc . compinstall . compinstall fpath zsh fpath . ( `autoload -U compinstall' ). .zshrc . compinit compinit compinstall .zshrc . compinit fpath (`autoload -U compinit' ) `compinit' . . menu-select zsh/complist compinit . ( ) (expansion) TAB expand-or-complete compinit complete-word . `.' `.expand-or-complete'. compinit (dumped) compinit -D . .zcompdump ( $ZDOTDIR $HOME) `compinit -d dumpfile' . compinit . compinit . #compdef ( ) compinit . -C . . -w . compdump ( compdef) . . _compdir compinit . compinit root (world) root . compinit . -u compinit -i . -C dumpfile . compaudit . compinit fpath . compaudit fpath _compdir fpath . fpath compaudit compinit _compdir . bashcompinit bash . compgen complete (builtins) bash . bash . (underscore) fpath/FPATH . zsh fpath/FPATH . compinit ( ) _compdir . Base . Base Core compinit : zsh . compinit fpath/FPATH . . . : #compdef name ... [ -{p|P} pattern ... [ -N name ... ] ] name -context- . name `cmd=service' . cmd ( ) service . . $service . #compdef -p -P (pattern) . . -p -P . -P . -N -p -P . . #compdef -k style key-sequence ... (widget) style key-sequence ( ) (bind) . style complete-word delete-char-or-list expand-or-complete expand-or-complete-prefix list-choices menu-complete menu-expand-or-complete reverse-menu-complete. zsh/complist ( zshmodules(1) ) menu-select . key-sequence . ( undefined-key ) . bindkey . #compdef -K widget-name style key-sequence [ name style seq ... ] -k widget-name style key-sequence . . widget-name . `_' . widget-name : . #compdef -K _foo_complete complete-word "^X^C" \ _foo_list list-choices "^X^D" ( ) _foo_complete `^X^C' _foo_list `^X^D' . #autoload [ options ] #autoload . . options autoload +X . -U -z . # . #compdef compdef . : -array-value- (`name=(...)') -assign-parameter- `=' -brace-parameter- (`${...}') -command- -condition- (`[[...]]') -default- -equal- -first- . _compskip : all: patterns: default: `-default-' . -math- `((...))' -parameter- (`$...') -redirect- (redirection). -subscript- . -tilde- (`~') . -value- . . -context- _context ( `-tilde-' `_tilde'). -redirect- -value- . ( _dispatch .) . -redirect- `-redirect-,op,command' op command . command ..PP -value- `-value-,name,command' name . `assoc=(key ' name `name-key' . `make CFLAGS=' command make . `-default-' . `foo=' _value `-value-,foo,' ( command ) `-value-,foo,-default-' `-value-,-default-,-default-' . : compdef '_files -g "*.log"' '-redirect-,2>,-default-' `*.log' `2> ' . : compdef _foo -value-,-default-,-default- _foo . _value . (styles) ( ) zstyle ':completion:*:*:-redirect-,2>,*:*' file-patterns '*.log' `2> ' `*.log' . (Functions) compinit . compdef [ -ane ] function name ... [ -{p|P} pattern ... [ -N name ...]] compdef -d name ... compdef -k [ -an ] function style key-sequence [ key-sequence ... ] compdef -K [ -an ] function name style key-seq [ name style seq ... ] function #compdef . `cmd=service' . service `cmd1=service' #compdef . cmd service . function . . -e . eval . . `.h' foo: compdef '_files -g "*.h"' foo -n . -d . name -p -P -N #compdef . . $_compskip . `patterns' `all' . $_compskip -p ( ) . -k function key-sequence #compdef -k . style . : complete-word delete-char-or-list expand-or-complete expand-or-complete-prefix list-choices menu-complete menu-expand-or-complete reverse-menu-complete menu-select zsh/complist . -n undefined-key . -K function name style key-sequence -k . -a function (autoloadable) autoload -U function . compdef . compdef _pids foo _pids foo . _gnu_generic `--help' . (completion) (matches) . (Overview) (context) . . ( `grep' `zsh') ( `-o' zsh ). (" ") (" " " " ). . (:) `' . . style . . style . . zstyle (: zshmodules(1)). . . :completion:function:completer:command:argument:tag. . : o completion . zle ZFTP . o function . predict-on Widget . o completer (underscore) (hyphen). `completer' `complete' completer . `Control Functions' . o command -context- #compdef compdef . (sub-command) . cvs add cvs-add . o argument . argument-n n option-opt-n n opt . UNIX . o tag. (tags) . . :completion: function . completer . command argument . tag . :completion::complete:dvips:option-o-1:files -o dvips : dvips -o ... . . tag-order . . _complete_help . tag-order . `Bindable Commands' . . : () . . (verbose) verbose . : zstyle ':completion:*' verbose yes ( .zshrc) . verbose yes . `*' . compinstall . verbose kill . (jobs) PIDs . : zstyle ':completion:*:*:kill:*:*' verbose no `jobs' `processes' . : zstyle ':completion:*:*:kill:*:jobs' verbose no -e zstyle (style) ( zshcompwid(1))). zstyle -e ':completion:*' hosts 'reply=($myhosts)' hosts myhosts myhosts . file-list . menu list-rows-first . . ( `:completion::complete:::foo' `:completion::complete:::*' ) `*' . zmodules(1) . -- completer command argument :completion:function:completer:command:argument:tag -- (*) (:) . :completion:*:foo:* foo ( completer command ). . . (Standard Tags) . accounts users-hosts all-expansions _expand all-files ( globbed-files ). arguments arrays association-keys bookmarks ( URL zftp) builtins (builtin) characters stty. colormapids (colormap ID) X colors commands . cvs . contexts zstyle corrections _approximate _correct cursors X default . function descriptions format devices directories -- cdpath cd local-directories directory-stack displays (display) X domains email-plugin `_email-plugin' _email_addresses expansions _expand ( ) extensions X file-descriptors files fonts X fstypes ( mount) functions -- globbed-files groups history-words hosts indexes interfaces jobs ( `jobs' ) keymaps zsh keysyms keysym X.TP libraries limits local-directories cd ( path-directories ) -- cdpath directories mailboxes manuals (manual pages) maps ( NIS) messages format modifiers X ( X) modules ( zsh) my-accounts users-hosts named-directories ( ) names newsgroups USENET nicknames NIS options original _approximate _correct _expand other-accounts users-hosts packages ( rpm Debian) parameters path-directories cdpath cd ( local-directories ) paths expand ambiguous special-dirs pods pod perl ( ) ports () prefixes ( URL) printers processes (PID) processes-names command killall sequences ( mh) sessions zftp signals strings ( cd) styles zstyle suffixes tags ( rpm) targets makefile time-zones ( TZ) types ( xhost) urls urls local URL users values variant _pick_variant . visuals X (visual) warnings format widgets zsh windows X zsh-options (boolean) . `true' `on' `yes' `1' `true' `false' `off' `no' `0' `false' . . `true' `false' . (tag) default . menu list-colors list-packed last-prompt. default function default : zstyle ':completion:*:default' menu ... accept-exact default . `true' ( ). ( `paths' ) . . _expand (tilde) . foo foobar `$foo' accept-exact `true' $foo $foobar . `continue' _expand . accept-exact-dirs . accept-exact . . /usr/bin/ /usr . `true' . /usr/bin/ . ( .zfs ZFS .snapshot NetApp) . . path-completion ( ) `false' . add-space _expand . `true' () . `file' . `true' `file' `subst' `$(...)' `${...}' . _prefix . ambiguous . . paths . assign-list . (colon) PATH . . . auto-description . `%d' . `specify: %d' . . avoid-completer _all_matches . . . `_expand _oldlist _correct _approximate' . cache-path (cache) . `$ZDOTDIR/.zcompcache' $ZDOTDIR `$HOME/.zcompcache' . use-cache . cache-policy . _cache_invalid . call-command make ant make makefile . `true' . `false' . command . . . `builtin' `command' . processes ( verbose `true' ) . ps . `PID' ( `pid') . `PID' . . . command-path . path ..TP commands ( /etc/init.d ) . . `start' `stop' . complete _expand_alias . `true' (alias) . complete-options cd chdir pushd . - . `true' - . `true' - -- . completer . `Control Functions' . `function:name' . completer . function name completer . name name . : zstyle ':completion:*' completer _complete _complete:-foo _complete `complete' `complete-foo' completer . `functions:name' _ignored _prefix . `_complete _ignored' : ignored-patterns $fignore . condition _list . `true' . delimiters glob . . . : + / - % . . disabled `true' _expand_alias . `false' . domains . /etc/resolv.conf . environ environ `sudo' . `VAR=value' . zstyle ':completion:*:sudo::' environ \ PATH="/sbin:/usr/sbin:$PATH" HOME="/root" expand . `prefix' . `suffix' . . . extra-verbose `true' . commands parameters . commands ( parameters) `true' ( ) ( ) . fake . . `value:description' value . description . . fake-files fake-parameters . fake-always fake ignored-patterns . `*' . . tag-order named-directories complete cd . named-directories-normal named-directories-mine . `extra directories' . zstyle ':completion::complete:cd:*' tag-order \ 'named-directories:-mine:extra\ directories named-directories:-normal:named\ directories *' zstyle ':completion::complete:cd:*:named-directories-mine' \ fake-always mydir1 mydir2 zstyle ':completion::complete:cd:*:named-directories-mine' \ ignored-patterns '*' fake-files . `dir:names...' . names ( ) dir . dir dir . glob ( accept-exact-dirs ). ..PP `magic' . fake-parameters . . ( `scalar' `array' `integer'). . . file-list ls -l . zsh/stat stat stat . : zmodload -i zsh/stat disable stat `true' ( `all') `insert' `list' . =num . num . zstyle ':completion:*' file-list list=20 insert=10 ( ) . zstyle -e ':completion:*' file-list \ '(( ${+NUMERIC} )) && reply=(true)' . file-patterns _files . _files : `globbed-files' `directories' `all-files'. (`globbed-files' `directories') . file-patterns . `pattern:tag' . pattern . `%p' () _files . tag . . (tag) _files . tag . `:tag' `files' . tag (description) `%d' format ( ) . . rm (object files) : zstyle ':completion:*:*:rm:*:*' file-patterns \ '*.o:object-files' '%p:all-files' -- -- : zstyle ':completion:*' file-patterns \ '%p:globbed-files' '*(-/):directories' '*:all-files' : _files `*' . . . globbed-files `*' . group-name . zstyle ':completion:*' file-patterns \ '%p(^-/):globbed-files *(-/):directories:location' EXTENDED_GLOB `#' `~' `^' . file-sort . : `size' `links' `modification' ( `time' `date') `access' `inode' ( `change') inode. . `reverse' . `follow' . file-split-chars . : : . . filter ldap ( _email_addresses) . `sn' . LDAP . LDAP . command LDAP . force-list . . `always' . . . . . format descriptions . <<%d>> . compadd -X ( zshcompwid(1)). descriptions . . <<%>> . . messages . <<%d>> . warnings . <<%d>> . <<%D>> . printf <<%d>> . zformat zsh/zutil zshmodules(1). gain-privileges true sudo doas . sudo . sudo gain-privileges command . glob _expand . <> () (globbing) ( substitute ) . global <> () _expand_alias (global aliases) . group-name . . . : zstyle ':completion:*:*:-command-:*:commands' \ group-name commands zstyle ':completion:*:*:-command-:*:functions' \ group-name functions . . : zstyle ':completion:*' group-name '' -default- . format ( ) descriptions . group-order group-name ( tag-order ). . : zstyle ':completion:*:*:-command-:*:*' group-order \ builtins functions commands groups (UNIX). YP <> . hidden <> format . <> . . tag-order . hosts . <> . hosts-ports . <> . . ignore-line . <> . <> . <> . <> . <> <> accept-exact : . <<:completion:*>> <> <> . . ignore-parents . : parent . foo/../ foo ..TP pwd ../ . : .. `../' . directory . ignored-patterns _ignored . ignored-patterns . _ignored . $fignore . EXTENDED_GLOB `#' `~' `^' . insert _all_matches . insert-ids (PID) kill wait . . ( `menu' ) . `single' . . insert-sections `manuals.X' . X . : zstyle ':completion:*:manuals.*' insert-sections true man ssh_ man 5 ssh_config . `prepend' `suffix' . `prepend' `true' `suffix' man ssh_ man ssh_config.5 . separate-sections man ( printf(1) printf(3)). `false' . insert-tab `true' TAB ( ). `false' . `pending' `pending=val' . . val . (paste) . $PENDING zsh/zle . `true' vared `false' . insert-unambiguous _match _approximate . . `true' . _approximate completer correct-num approximate-num num . _match `pattern' . . keep-prefix _expand . `true' (tilde) . `~/f*' `/home/user/foo' `~/foo' . `changed' () . . _expand `true' _expand . known-hosts-files ( use-ip) IP known_hosts ssh . /etc/ssh/ssh_known_hosts ~/.ssh/known_hosts . last-prompt ALWAYS_LAST_PROMPT . `true' . default . `true' . ALWAYS_LAST_PROMPT . list _history_complete_word . `true' . `false' . AUTO_LIST . `:completion:history-words' . list-colors zsh/complist . ZLS_COLORS ZLS_COLOURS `The zsh/complist Module' zshmodules(1) (syntax) . default . . group-name . group-name `(group)' ZLS_COLORS ZLS_COLOURS default ..PP GNU ls : zstyle ':completion:*:default' list-colors \ ${(s.:.)LS_COLORS} GNU ls ( '') . list-dirs-first file-patterns . . list-grouped `true' () . ( verbose `true' ) . (menu selection) . list-packed (context) default . `true' LIST_PACKED . `false' . list-prompt default ( zsh/complist zshmodules(1) ). . : `%l' `%L' `%m' `%M' `%p' `%P' `Top' `Bottom' . . `%S' `%s' `%B' `%b' `%U' `%u' standout bold underline `%F' `%f' `%K' `%k' `%{...%}' ( ) . LISTPROMPT unset . list-rows-first list-packed - (rows-first) LIST_ROWS_FIRST . list-separator ( ) . `--' ( ) . list-suffixes . `true' . . local URL (file system) . : (hostname) (home) . : zstyle ':completion:*' local toast \ /var/http/public/toast public_html `http://toast/stuff/' /var/http/public/toast/stuff `http://toast/~yousir/' ~yousir/public_html . mail-directory zsh mailbox . `~/Mail' . match-original _match . only _match `*' . `*' `*' . `*' . matcher . matcher-list x: (override) . <> zshcompwid(1) . tag-order . matcher-list tag-order . matcher-list . <> zshcompwid(1) . . : zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' + . : zstyle ':completion:*' matcher-list \ '' '+m:{a-z}={A-Z}' '+m:{A-Z}={a-z}' . matcher-list _prefix _ignored . _complete _prefix _complete: zstyle ':completion:*' completer _complete _prefix zstyle ':completion:*:complete:*:*:*' matcher-list \ '' 'm:{a-zA-Z}={A-Za-z}' completer . . (partial-word): zstyle ':completion:*' completer \ _complete _correct _complete:foo zstyle ':completion:*:complete:*:*:*' matcher-list \ '' 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*:foo:*:*:*' matcher-list \ 'm:{a-zA-Z}={A-Za-z} r:|[-_./]=* r:|=*' . _correct _approximate matcher-list . matcher-list . . . NO_CASE_GLOB . . matcher tag-order . max-errors _approximate _correct . . `numeric' . : zstyle ':completion:*:approximate:::' max-errors 2 numeric ( `ESC-6 TAB') . `0 numeric' . `not-numeric' . `2 not-numeric' . `2 numeric' . max-matches-width verbose . . . . . menu `true' (menu completion) . `default' . `true' `auto' AUTO_MENU . `false' MENU_COMPLETE . `yes=num' `yes' `true' (`yes' `true' `on' `1') num . `yes=long' . `yes=long-list' ( `select=long-list' ). `false' ( `no=10') num . zsh/complist . . `select' . `select=num' num . . `no-select' . `select=long' . `select=long-list' . `yes=' `select=' `long' `long-list'. . `interactive' zsh/complist zshmodules(1) . `search' . `search-backward' . muttrc mutt . `~/.muttrc' . numbers jobs . `true' (job) . . `1' . old-list _oldlist . `always' `never' _oldlist . _oldlist . . ^Xc _correct_word . ^D . _oldlist . _match : insert-unambiguous `true' . . _oldlist _match . old-matches _all_matches . <> <> . <> _all_matches . _all_matches . completer -e zstyle . old-menu _oldlist . (menu completion) TAB . _oldlist . <> _oldlist . ^Xc . <> TAB . _oldlist . original _approximate _correct . <> . (context) correct-num approximate-num num . packageset <> . . : zstyle ':completion:*:complete:dpkg:option--status-1:*' \ packageset avail (available) <> . path colors . rgb.txt X11 . . path-completion . . /u/b/z /usr/bin/zsh . <> / accept-exact-dirs . <> COMPLETE_IN_WORD . /u /u/b/z /usr/bin/zsh . pine-directory PINE . PINE . ports ( ) . <> . prefix-hidden . <> . <> . prefix-needed . <> . options signals jobs functions parameters . <<->> <<+>> <<-->> . <<->> . (jobs) <<%>> . <<_>> <<.>> . function parameter <> <> . preserve-prefix . . Unices <> ( ) <> . <> Cygwin <> . range _history _history_complete_word . N . <> slice slice . max . . recursive-files <<$PWD/>> : . $PWD/ . **/*(/) . <<*/.git/*>>. : zstyle ':completion:*' recursive-files '*/zsh/*' /home/pws/zsh/Src zle_tr Zle/zle_tricky.c . regular _expand_alias . `true' () . `false' . `always' . rehash () rehash . . remote-access `false' . CVS . . remove-all-dups _history_complete_word _history . select-prompt default ( menu ) . list-prompt . . select-scroll default ( menu ) . `0' () . . separate-sections manuals . `true' `manuals.X' X . group-name . words dict . . : insert-sections. `false' . show-ambiguity zsh/complist . list-colors `true' . . show-completer . `true' . . single-ignored _ignored . `show' . `menu' . sort . `true' `false' . `-o' compadd : match nosort numeric reverse. . . `true' . `true' . _expand `true' . `menu' . special-dirs `.' `..' . `true' `.' `..' `..' `..' . special-dirs `.' `../' `..' . `false' . zstyle -e ':completion:*' special-dirs \ '[[ $PREFIX = (../)#(|.|..) ]] && reply=(..)' squeeze-slashes `true' ( `foo//bar') . . `*' . stop `true' _history_complete_word . _history_complete_word . `false' () _history_complete_word . strip-comments `true' . user@host . subst-globs-only _expand . `true' (globbing) substitute ( ) . `false' . substitute _expand ( `$(...)' `${...}') . `true' . suffix _expand (tilde) . `true' `~foo' `$foo' `~foo/' `$foo/bar' . `true' . tag-order . . . ( file-patterns .).PP : zstyle ':completion:*:complete:-command-:*:*' tag-order \ 'commands functions' . . : - . . . ! tags... . . tag:label ... tag label . label tag . ! . label tag label . . tag:label:description description <<%d>> format . . <<%d>> description . <<{pat1,pat2...}>> . . . : zstyle ':completion:*:*:-command-:*:*' tag-order \ 'functions:-non-comp *' functions zstyle ':completion:*:functions-non-comp' \ ignored-patterns '_*' functions functions-non-comp . ignored-patterns . tag-order . . : zstyle ':completion:*' tag-order \ 'options:-long:long\ options options:-short:short\ options options:-single-letter:single\ letter\ options' zstyle ':completion:*:options-long' \ ignored-patterns '[-+](|-|[^-]*)' zstyle ':completion:*:options-short' \ ignored-patterns '--*' '[-+]?' zstyle ':completion:*:options-single-letter' \ ignored-patterns '???*' group-names <<-->> <<->> <<+>> . . matcher-list . foo : zstyle ':completion:*:*:foo:*:*' tag-order '*' '*:-case' zstyle ':completion:*-case' matcher 'm:{a-z}={A-Z}' foo . tag-order -case . matcher zstyle . -e zstyle . : zstyle -e '*:-command-:*' tag-order ' if [[ -n $PREFIX$SUFFIX ]]; then reply=( ) else reply=( - ) fi' . PREFIX zshcompwid . reply . tag-order <<(|*-)argument-* (|*-)option-* values>> <> ( ) . urls urls URL . URL . URL ( URL ). . <> <> <> . . ..PP zstyle ':completion:*' urls ~/.urls mkdir -p ~/.urls/ftp/ftp.zsh.org/pub ftp://ftp.zsh.org/pub `netscape' `lynx' . hosts urls . _urls ( `more $^fpath/_urls(N)'). use-cache ( _store_cache _retrieve_cache _cache_invalid) . cache-path . use-compctl false 0 no off compctl . zsh/compctl . `first' `compctl -T' `default' `compctl -D' . compctl . compctl . _foo foo compctl foo . foo compctl . use-ip _hosts IP NIS ssh . `true' IP . hosts ( ) . users . . . users-hosts `user@host' `user:host' . . () . rlogin ssh my-accounts . talk finger other-accounts . accounts . users-hosts-ports users-hosts telnet `user@host:port' . verbose . `true' . word _list . . `true' . . compinit _main_complete . (wrapper) <> () . _main_complete . completer . : zstyle ':completion:*' completer _complete _correct compinit. `_complete _ignored' ignored-patterns . _main_complete . _main_complete . _main_complete (-) . completer (context) . . (underscore) `:completion::complete:...' . _all_matches . . avoid-completer old-matches . _generic _all_matches : zle -C all-matches complete-word _generic bindkey '^Xa' all-matches zstyle ':completion:all-matches:*' old-matches only zstyle ':completion:all-matches::::' completer _all_matches : ^Xa . : zstyle ':completion:all-matches::::' completer \ _all_matches _complete zstyle ':completion:all-matches:*' insert true old-matches . _approximate _complete . max-errors zshexpn(1) . _complete : zstyle ':completion:*' completer _complete _approximate . . corrections original . format `%e' `%o' . max-errors . : completer `approximate-1' `approximate-2' . _approximate -a . max-errors . ( _correct ) . completer -e zstyle : zstyle -e ':completion:*' completer ' if [[ $_last_try != "$HISTNO$BUFFER$CURSOR" ]]; then _last_try="$HISTNO$BUFFER$CURSOR" reply=(_complete _match _prefix) else reply=(_ignored _correct _approximate) fi' HISTNO BUFFER CURSOR zle . _ignored _correct _approximate . _canonical_paths [ -A var ] [ -N ] [ -MJV12nfX ] tag descr [ paths ... ] ( .. ). -A . . -N . -M -J -V -1 -2 -n -F -X compadd . tag descr _description . _cmdambivalent . ( /usr/bin/env) ( system(...)) . _cmdstring _precommand . . _cmdstring system(...) . _complete (context-sensitive) compdef . . _complete _normal . -context- . #compdef ..PP (context) _complete <> . <> (override) vared . (tag) <> (description) <> . (associative array) ( ) . <> <> . tag descr action _arguments . <> . -command-line- ( ) . . _correct _approximate . . _approximate completer correct . : zstyle ':completion:::::' completer \ _complete _correct _approximate zstyle ':completion:*:correct:::' max-errors 2 not-numeric zstyle ':completion:*:approximate:::' max-errors 3 numeric . . . _correct -a . accept . _approximate . _approximate _approximate _correct -- . _expand (expansion) . complete-word expand-or-complete ( TAB) . _complete . : all-expansions expansions original . ( ) group-order tag-order . all-expansions expansions <<%o>> . substitute glob subst-globs-only . _expand : -s substitute -g glob -o subst-globs-only. _expand_alias (alias) . regular global disabled . << (Bindable Commands)>> . _extensions <<*.>> . . _expand . add-space prefix-hidden . _external_pwds zsh . _generic . _match . _history . remove-all-dups sort _history_complete_word << (Bindable Commands)>> << (Completion System Configuration)>> . _ignored ignored-patterns . ignored-patterns . _prefix . single-ignored . _list . . condition word << (Completion System Configuration)>> . _match _complete . . GLOB_COMPLETE . <<*>> . match-original . insert-unambiguous <> . ( matcher-list matcher) . _menu . (menu selection) _generic . . MENU_COMPLETE reverse-menu-complete accept-and-menu-complete . _oldlist ( ) . . . : old-list old-menu << (Completion System Configuration)>> ..TP _precommand exec /usr/bin/env. _prefix ( ) . . expand-or-complete-prefix . completer . -- _prefix. _prefix . completer : zstyle ':completion:*' completer \ _complete _prefix _correct _prefix:foo _prefix . _correct _prefix . `foo' . _prefix : zstyle ':completion:*' completer _complete ... _prefix zstyle ':completion::prefix:*' completer _complete add-space . `true' _prefix ( ) . COMPLETE_IN_WORD . _user_expand _expand . add-space sort _expand _user_expand . all-expansions . user-expand . : $hash hash . $ . hash . _func _func _ . . reply . REPLY . . . . _bash_completions _bash_complete-word _bash_list-choices . bash . : <> <<$>> <<@>> <> <<~>> . bash <<\e>> <<^X>> . zsh <<\e~>> <<^X~>> . compinit .zshrc : for key in '!' '$' '@' '/' '~'; do bindkey "\e$key" _bash_complete-word bindkey "^X$key" _bash_list-choices done <<~>> . _correct_filename (^XC) . . zle . _correct_word (^Xc) . <> function _correct . _expand_alias (^Xa) . (alias) . regular global disabled . complete <> . alias _expand_alias alias . _expand_alias alias . _expand_word (^Xe) : expand-word _expand. function <> . _generic . function . . : zle -C foo complete-word _generic bindkey '...' foo zstyle ':completion:foo:*' menu yes select=1 completer . _generic completer _main_complete . _history_complete_word (\e/) . list remove-all-dups sort stop . _most_recent_file (^Xm) ( ) . N N . ( ) . _next_tags (^Xn) ( tag-order ) . . _read_comp (^X^R) . . <<_>> <<_files -/>> . ( ) . compadd . : <> <<^H>> <<^U>> <<^C>> <<^G>> <> . . _read_comp . _read_comp . _complete_debug (^X?) (trace) . . . _complete_help (^Xh) . 1 ( <>) . . _complete_help_generic ZLE ( zle -N). _generic . . _generic . _complete_help . debug <> _complete_debug . noread . ZSH_TRACE_GENERIC_WIDGET _generic . noread ..PP : zle -N _complete_debug_generic _complete_help_generic bindkey '^x:' _complete_debug_generic <> (widget) (trace output) . _complete_tag (^Xt) (symbol tags) etags ctags ( ) TAGS ( etags) tags ( ctags) . TAGS . TAGS tags $TAGSFILE $tagsfile . emacs vi etags vtags . (UTILITY FUNCTIONS) . Base . . _absolute_command_paths ( _command_names -e ). . _all_labels [ -x ] [ -12VJ ] tag name descr [ command arg ... ] _next_label _next_label . command . name arg command . command arg . command . _all_labels compadd . : local expl ... if _requested foo; then ... _all_labels foo expl '...' compadd ... - $matches fi matches compadd _all_labels . _alternative [ -O name ] [ -C name ] spec ... . _tags . spec : <>. tag _tags action descr . action _arguments ( ) : o <<->state>> <<=...>> . o <<((a\:bar b\:baz))>> spec action . action : _alternative \ 'users:user:_users' \ 'hosts:host:_hosts' _users _hosts . _arguments _all_labels . _alternative . <<-O name>> _arguments . name compadd . _tags -C (argument context field) . _arguments [ -nswWCRS ] [ -A pat ] [ -O name ] [ -M matchspec ] [ : ] spec ... _arguments [ opt ... ] -- [ -l ] [ -i pats ] [ -s pair ] [ helpspec ...] . _arguments -s -w -sw. spec . _arguments spec . <<-->> spec (help) . opt <<-->> . <<-s>> <<-->> <<-s>> <<-->> . -s -S -A -w -W _arguments . . _arguments : -n _arguments NORMARG $words . NORMARG -1 . -n <> . -s (option stacking) . <<-x>> <<-y>> <<-xy>> . (<<-xy>> <> ). (stacking) . -s -- ` spec ' . -w -s . -x -s `-xy' () -s -xy `y' -s -w -xy -x -y -x ( -y) . -W -w : . (action) . _guard . -C curcontext `->state' . . -R $state `->string' . -S `--' `--' . -S foobar -x -- -y `-x' `-y' `--' . -A pat . pat . _arguments optspec `-A "-*"' . -O name name action . . -M matchspec matchspec . `_' `-' `-f-b' `-foo-bar'. matchspec : r:|[_-]=* r:|=* -0 `opt_args' NUL . specs: actions . spec: spec . n:message:action n::message:action n . message action ( ). message . message . :message:action ::message:action . . *:message:action *::message:action *:::message:action ( - + ) . . message words CURRENT action . message . optspec optspec:... . . optspec . *optspec optspec . optspec . . -optname +optname optspec `-foo'. ( ) . `-+optname' `+-optname' -optname +optname . `-' `+' . -optname- . `-foo-:...' `-fooarg' . -optname+ optname . `-foo+:...' `-fooarg' `-foo arg' . -optname= `-foo=arg' `-foo arg'..TP -optname=- . optspec[explanation] () optspec `-q[query operation]'. verbose . auto-description optspec `%d' message optarg optspec . `+' `=' () `-\+'. optarg optspec : :message:action ::message:action message action . . . :message1:action1:message2:action2 . :*pattern:message:action :*pattern::message:action :*pattern:::message:action . optarg . pattern ( :*:) action pattern action . `*:...' : message words CURRENT action . . optname message action `\:'. . . `(-two -three 1)-one:...' `-one' -two -three . `(-foo):...' -foo . : (*) ( `*:...') (:) ( ) (-) . `(*)' ( `*:' ) . `!' . _arguments : `_arguments $global_options' `_arguments !$^global_options'. spec: action action . `->string' action _all_labels tag . . action `-O name' . compadd action . action . ( ) . message . message message action . (item1 item2 ...) : :foo:(foo bar baz) ((item1\:desc1 ...)) . . :foo:((a\:bar b\:baz)) description values . ->string _arguments . . _arguments action `->string' string state string . state_descr message optarg action . _arguments . -R _arguments 300 $state . $state $state_descr _arguments `context' `line' `opt_args' PREFIX words . ..PP _arguments (action) `->string' : local context state state_descr line typeset -A opt_args (global environment) _arguments . {eval-string} . ` word ...' . = action action `= ' ( ) _arguments argument words CURRENT . (dummy word) . action ( ). action _arguments _arguments . word ... word ... . action . compadd . _arguments . `expl' action `$expl[@]' . `line' . `opt_args' . (escaped) ( optspec `*optspec') ( ) . -0 NUL . `zsh -o foo:foo -o bar:bar -o ' `opt_args' typeset -A opt_args=( [-o]='foo\:foo:bar\:bar:' ) typeset -A opt_args=( [-o]=$'foo:foo\x00bar:bar\x00' ) _arguments -0 . `context' `->string' . $state . (context) : `option-opt-n' n -opt `argument-n' n . (<>) n `rest' . -o `option-o-1' ( ) `argument-2' . action curcontext context . -C _arguments curcontext `->state' . . ( context) (local) : local curcontext="$curcontext" . (Grouping Options) . `+' . . : _arguments \ '(group2--x)-a' \ + group1 \ -m \ '(group2)-n' \ + group2 \ -x -y `(name)' (mutually exclusive) . (alias) . : _arguments \ -a -b \ + '(operation)' \ {-c,--compress}'[compress]' \ {-d,--decompress}'[decompress]' \ {-l,--list}'[list]' `opt_args' 'group-option' . `-c' `operation--c' . (Specifying Multiple Sets of Arguments) . . . : _arguments \ -a \ - set1 \ -c \ - set2 \ -d \ ':arg:(x2 y2)' . `-c' `-d' . `-d' `-c' . `-a' . (exclusion lists) . . . rest-arguments ( `-foo:*:...') -foo optarg . spec `--' _arguments `--help' ( GNU ) . `--help' . . `_arguments --' `--opt=val' . helpspec `pattern:message:action' spec _arguments . pattern message action . `*:' message action . : _arguments -- '*\*:toggle:(yes no)' \ '*=FILE*:file:_files' \ '*=DIR*:directory:_files -/' \ '*=PATH*:directory:_files -/' `yes' `no' `=FILE' `=DIR' `=PATH' . . : -C, --directory=DIR change to directory DIR `--directory' `-C' . _arguments . message . pattern `(-)' action `=' . `=-' . ( `--help') ( LC_CTYPE) `C' . `-l' `_arguments --' . `_arguments --' `-i patterns' . . _arguments -- -i \ "(--(en|dis)able-FEATURE*)" `--enable-FEATURE' `--disable-FEATURE' ( configure ). `_arguments --' `-s pair' . pair - _arguments . configure `--enable-foo' `--disable-foo' . : _arguments -- -s "((#s)--enable- --disable-)" _arguments . . _arguments _arguments action spec `->state'. _arguments : _arguments '-l+:left border:' \ '-format:paper size:(letter A4)' \ '*-copy:output file:_files::resolution:(300 600)' \ ':postscript file:_files -g \*.\(ps\|eps\)' \ '*:page number:' : `-l' `-format' `-copy'. `left border' . `-l' . `-format' `paper size' `letter' `A4' . `-copy' . . ( `resolution') `300' `600' . . `postscript file' `ps' `eps' . `page number' . _as_if command [arg ... ] . foo bar --baz : compdef '_as_if bar --baz' foo _cache_invalid cache_identifier . cache-policy . . : _example_caching_policy () { # rebuild if cache is more than a week old local -a oldp oldp=( "$1"(Nm+7) ) (( $#oldp )) } _call_function return name [ arg ... ] name arg . return name return . _call_function name . _call_program [ -l ] [ -p ] tag string ... . command (tag) . . string _call_program . . ( LC_CTYPE) _comp_locale ( ) `C' . `-l' . `-p' . gain-privileges true _call_program sudo . gain-privileges command zstyle (`/') . _combination [ -s pattern ] tag style spec ... field opts ... . style tag . `users-hosts-ports'. spec `field=pattern' . `pws' `users=pws' . ( ). . ( : ). (:) . -s _combination . `-s "[:@]"' users-hosts. `field=pattern' . . `users-hosts-ports' `_hosts' . `field=pattern' ( ) . compadd . _command_names [ -e | - ] : (aliases) (builtins) (hashed commands) . -e . - . _comp_locale LC_CTYPE `C' . LC_CTYPE ( LC_ALL LANG) ASCII . (subshell) (export) . `$(_comp_locale; command ...)' . _completers [ -p ] (completers) . -p (`_') . _default -default- . . (graceful degradation) . _describe [-12JVx] [ -oO | -t tag ] descr name1 [ name2 ] [ opt ... ] [ -- name1 [ name2 ] [ opt ... ] ... ] . -- opt . format descriptions descr . . (item ...) . ( _arguments ((...)) .) name1 () `completion:description' . completion (backslash) ( ) . name2 name1 completion name1 . name1 . compadd . `-o' (: ) `-' `--' `+' . _describe prefix-hidden prefix-needed verbose . `-o' verbose . `-o' `-O' _describe prefix-needed . -t tag . `values' -o `options' . -1 -2 -J -V -x _next_label . list-grouped . _describe _all_labels . _description [ -x ] [ -12VJ ] tag name descr [ spec ... ] compadd . . tag . compadd name ( `expl' ). descr . : format hidden matcher ignore-line ignored-patterns group-name sort. format tag descriptions . _setup . format ( ) `%d' descr . descr format name . _description spec `char:str' . format : `%char' string . spec descr . (`%o') (`%m') (`%r') (`%h') . : _description times expl 'timeout (seconds) (0-60) [20]' zformat . `default:' format `%(o.default: %o.)' . -x -x -X compadd . . name group-name . ( -J compadd) `-V' `-J' `-1' `-2' _description . `-V' `-1V' `-2V' . : local expl _description files expl file compadd "$expl[@]" - "$files[@]" expl . compadd . _dir_list [ -s sep ] [ -S ] ( $PATH) . -s sep sep . sep (`:') . -S sep (`/') . _dispatch context string ... context ( compdef ) string . . string -default- (fallback) . $service string context/command ( ) $curcontext context . _email_addresses [ -c ] [ -n plugin ] . . -c localhost@domain.tld . RFC822 `Firstname Lastname
' . -n plugin plugin . : _email-ldap ( filter ) _email-local ( user@hostname ) _email-mail ( ~/.mailrc ) _email-mush _email-mutt _email-pine. _email-foo `email-foo' . `_email-' . -c compadd . $reply `alias:address' 300 . . _files _files (wrapper) _path_files . -- list-dirs-first -g -/ file-patterns . _files _path_files . _path_files . _gnu_generic _arguments . `--help' . . foo bar compdef _gnu_generic foo bar compinit ..PP `--help' . _guard [ options ] pattern descr pattern descr . action _arguments . . pattern compadd _description -M -J -V -1 -2 -n -F -X. . _arguments . -n -none -n . : _arguments '-n-: :_guard "[0-9]#" "numeric value"' '-none' _arguments `numeric value' `-n' . `-n' ( _guard) `-n' . _message [ -r12 ] [ -VJ group ] descr _message -e [ tag ] descr descr _description . . format messages descriptions . -r descr . descr . `%' compadd . -12VJ group compadd . -e tag . _arguments . $curtag . compstate[insert] . _multi_parts [ -i ] sep array sep . array `(foo bar)' . . sep . _tar `_multi_parts / patharray' . -i _multi_parts . . `-V' `-J' `-1' `-2' `-n' `-f' `-X' `-M' `-P' `-S' `-r' `-R' `-q' compadd . _next_label [ -x ] [ -12VJ ] tag name descr [ option ... ] (tag labels) tag-order . . _tags _requested . -x12VJ _description . tag . tag-order descr _next_label . descr name compadd . foo . _requested foo _next_label tag-order . local expl ret=1 ... if _requested foo; then ... while _next_label foo expl '...'; do compadd "$expl[@]" ... && ret=0 done ... fi return ret _normal [ -P | -p precommand ] -context- . . _normal -default- . $words $CURRENT . _precommand nohup words CURRENT `_normal -p $service' . `nohup cmd ...' `cmd ...' . -P . ( ) ( `zsh -c'). -p precommand precommand . -P . -p -P compdef _compskip . . -first- . _numbers [ option ... ] [ description ] [ suffix ... ] () . . compadd _numbers :.PP -t tag numbers . -u units bytes. -l min . -m max . -d default . -N . . -f . (colon) . . : _numbers -u seconds age :s:seconds m:minutes h:hours d:days . . format descriptions -t `%x' . format . . format unit-suffixes . . unit-suffixes `%x' `%X' . `%d' . `%i' `%r' . : zstyle ':completion:*:unit-suffixes' format '%x%(r::,)' _options . `no' ( `glob' `noglob' `NO_GLOB' ). compadd . _options_set _options_unset _options . _main_complete . . . _parameters . `-g pattern' pattern . `print ${(t)param}' `*' pattern . compadd . _path_files . . `/u/i/s/sig' `/usr/include/sys/signal.h' . _path_files _files : -f . . -/ . -g pattern pattern . -W paths . paths . -F ignored-files compadd . . ignored-patterns . _path_files _files compadd : `-J' `-V' `-1' `-2' `-n' `-X' `-M' `-P' `-S' `-q' `-r' `-R'. _path_files expand ambiguous special-dirs list-suffixes file-sort . _pick_variant [ -b builtin-label ] [ -c command ] [ -r name ] label=pattern ... label [ arg .. ] . words -c . . . label=pattern `command arg ...' pattern label . 1 . `-b builtin-label' ( autoload ) builtin-label . `-r name' label name . _cmd_variant (cache) . _regex_arguments name spec ... name spec . _regex_arguments name . words . <<|>> . . . (null) ( ) . action . . action tag-order _alternative action . descr expl . <<(>> <<)>> <<#>> <<|>> (quote) . /pattern/ [%lookahead%] [-guard] [:tag:descr:action] . <<(#b)((#B)pattern)lookahead*>> . <> . pattern <<[]>> . lookahead . : _alternative . : pattern . . action . /pattern/+ [%lookahead%] [-guard] [:tag:descr:action] <> ( ) . /pattern/- [%lookahead%] [-guard] [:tag:descr:action] <> action <> . ( spec ) spec _regex_arguments . spec # spec . spec spec spec . spec | spec spec . _regex_words . : _regex_arguments _tst /$'[^\0]#\0'/ \ /$'[^\0]#\0'/ :'compadd aaa' _tst aaa . tag description action ( ). . aaa . _regex_arguments _tst /$'[^\0]#\0'/ \ /$'aaa\0'/ :'compadd aaa' aaa . _regex_arguments _tst /$'[^\0]#\0'/ \( \ /$'aaa\0'/ :'compadd aaa' \ /$'bbb\0'/ :'compadd bbb' \) \# . aaa bbb . aaa bbb . _regex_arguments _tst /$'[^\0]#\0'/ \ \( /$'aaa\0'/ :'compadd aaa' \| \ /$'bbb\0'/ :'compadd bbb' \) \# aaa bbb . _regex_words . _regex_words tag description spec ... _regex_arguments . tag description (context) . spec : . spec . ( regex) _arguments . spec . * * * . spec . spec . (quoting) . regex . -t term . -s sep _values . _regex_words reply (local) . # . : local -a reply _regex_words mydb-commands 'mydb commands' \ 'add:add an entry to mydb:$mydb_add_cmds' \ 'show:show entries in mydb' _regex_arguments _mydb "$reply[@]" _mydb "$@" mydb add show . show add mydb_add_cmds _regex_words. _requested [ -x ] [ -12VJ ] tag [ name descr [ command [ arg ... ] ] (tag) _tags ( ) . . : _tags foo bar baz while _tags; do if _requested foo; then ... # perform completion for foo fi ... # test the tags bar and baz in the same way ... # exit loop if matches were generated done _tags . tag-order . name descr _requested _description _requested . command _all_labels . . : local expl ret=1 _tags foo bar baz while _tags; do _requested foo expl 'description' \ compadd foobar foobaz && ret=0 ... (( ret )) || break done command compadd . _retrieve_cache cache_identifier cache_identifier cache-path ~/.zcompcache . . use-cache (cache) . _store_cache . _sep_parts . . . `hosts=(ftp news)' `_sep_parts '(foo bar)' @ hosts' `f' `foo' `b@n' `bar@news' . `-V' `-J' `-1' `-2' `-n' `-X' `-M' `-P' `-S' `-r' `-R' `-q' compadd compadd . _sequence [ -s sep ] [ -n max ] [ -d ] function [ - ] ... . . -s . -s `,' . -d . -n . compadd . compadd _sequence _values . _setup tag [ group ] tag . list-colors list-packed list-rows-first last-prompt accept-exact menu force-list . group . tag . _description . _store_cache cache_identifier param ... _retrieve_cache _cache_invalid () . . _retrieve_cache . cache_identifier . cache-path ~/.zcompcache . param . . use-cache . _retrieve_cache . _cache_invalid . _perl_modules . _tags [ [ -C name ] tag ... ] . tag-order . _tags . . . _requested ( ). `-C name' name _tags argument ( ) curcontext . _tags curcontext ( ) . _tilde_files _files (tilde) `~' . _values [ -O name ] [ -s sep ] [ -S sep ] [ -wC ] desc spec ... () . `-O name' _arguments . name (action) compadd ..PP ( `-O name') `-s' . (auto-removable ) _arguments `_values -s' . . _values ( ) . -w . desc . _arguments ( ). (actions) . -S ( -s ). . : _values -s , 'description' \ '*foo[bar]' \ '(two)*one[number]:first count:' \ 'two[another number]::second count:(1 2 3)' : `foo' `one' `two'. `bar' . `number' `first count' . `(two)' `one' `two' . (`two') `another number' `second count' ( `=' ) `1' `2' `3' . _values . _arguments action (context name component) ( ) . . verbose ( ) . val_args opt_args _arguments . _values state state_descr line context val_args : local context state state_descr line typeset -A val_args `->string'. context . _values state state_descr . . _values ( `/' ) . `->string' . `-qS x' compadd x . -C _arguments . curcontext context ( ). _wanted [ -x ] [ -C name ] [ -12VJ ] tag name descr command [ arg ...] (tag) . . . _wanted _requested _description . command (tag labels) _wanted . : local expl _wanted tag expl 'description' \ compadd -- match1 match2... _wanted `Dynamic named directories' zshexpn(1) . _requested command compadd . _tags -C . -x _description . _widgets [ -g pattern ] zle ( `Widgets' zshzle(1) ). pattern $widgets `The zsh/zleparameter Module' zshmodules(1) . _main_complete . : _comp_caller_options setopt . . . _comp_caller_options . (underscore) `on' `off' . _comp_priv_prefix _sudo _comp_priv_prefix _call_program . _main_complete . compprefuncs comppostfuncs . . (COMPLETION DIRECTORIES) Completion . . . fpath . Base (bind) . . . Zsh (builtin) . Unix . Unix . . mount GNU --help . X AIX BSD ... . Linux Debian X . zsh 5.9.2 July 12, 2026 ZSHCOMPSYS(1)