ZSHCOMPWID(1) General Commands Manual ZSHCOMPWID(1) (NAME) zshcompwid - zsh (DESCRIPTION) . zshcompsys(1) ( -- `hubris' ) . compctl zshcompctl(1) . -C zle zsh/zle ( zshzle(1) ). zle -C complete expand-or-complete completer `complete' . : complete-word expand-or-complete expand-or-complete-prefix menu-complete menu-expand-or-complete reverse-menu-complete list-choices delete-char-or-list. . bindkey zsh/zle ( zshzle(1) ) `completer' . . ZLE . expand-or-complete . (COMPLETION SPECIAL PARAMETERS) ZLE_REMOVE_SUFFIX_CHARS ZLE_SPACE_SUFFIX_CHARS . Parameters Used By The Shell zshparam(1) . . . . compstate ( ) . CURRENT words . ksharrays . IPREFIX . PREFIX PREFIX . PREFIX IPREFIX : IPREFIX=${PREFIX%%\=*}= PREFIX=${PREFIX#*=} . compset . ISUFFIX IPREFIX ISUFFIX SUFFIX . PREFIX . QIPREFIX . `"foo' (double quote) . -q compset ( ) `"foo bar' `bar' `"foo ' . QISUFFIX QIPREFIX . SUFFIX . COMPLETE_IN_WORD . compstate . : all_quotes -q compset ( ) `compset -q' . . . $'...' . . context (context) . : array_value words . brace_parameter ${ . ${( . assign_parameter . command ( ). condition `[[...]]' words . math `((...))'. parameter $ ${ . redirect . subscript . value . exact REC_EXACT . accept . . exact_string ..TP ignored -F compadd . insert . unambiguous automenu-unambiguous ( AUTO_MENU) menu automenu ( AUTO_MENU ). `tab' TAB . ( ) . ( `-1' ) . . menu automenu . `menu:2' . `tab' TAB . all . insert_positions . . last_prompt . ALWAYS_LAST_PROMPT . list . list autolist ambiguous AUTO_LIST LIST_AMBIGUOUS . force . . LIST_PACKED packed . LIST_PACKED . LIST_ROWS_FIRST rows . explanations ( ) messages ( -x compadd) . explanations messages . . list_lines . BUFFERLINES . list_max LISTMAX . LISTMAX . nmatches . old_insert . . old_list keep . insert . old_list yes . . shown . keep . . . parameter (subscript) . pattern_insert menu pattern_match ( ) . . pattern_match GLOB_COMPLETE . `*' . ( ) . (metacharacters) `*' `*' . compadd . quote ( ). . quoting single double backtick. . redirect < > . restore auto (words CURRENT PREFIX IPREFIX SUFFIX ISUFFIX) . . to_end . single ( ALWAYS_TO_END ) match . single . always . match . unambiguous ( ) . unambiguous_cursor unambiguous . . unambiguous_positions . unambiguous ..TP vared vared vared . vared . words . (COMPLETION BUILTIN COMMANDS) compadd [ -akqQfenUl12C ] [ -F array ] [-P prefix ] [ -S suffix ] [-p hidden-prefix ] [ -s hidden-suffix ] [-i ignored-prefix ] [ -I ignored-suffix ] [-W file-prefix ] [ -d array ] [-J group-name ] [ -X explanation ] [ -x message ] [-V group-name ] [ -o [ order ] ] [-r remove-chars ] [ -R remove-func ] [-D array ] [ -O array ] [ -A array ] [-E number ] [-M match-spec ] [ -- ] [ completions ... ] . . : IPREFIX -i . -U -i . -P . -p . . -s -S -I . : -P prefix . (metacharacters) . -S suffix -P . -p hidden-prefix . -U . -s hidden-suffix <<-p>> . -i ignored-prefix <<-P>> . <<-P>> <<-p>> . -I ignored-suffix -i . -a completions . completions (subscripts) <>. -k completions . -a words <>. -d array . array completion . completion . array . completions completions . -l -d . . -o [ order ] . order . . . match ( -d) . <<-o>> order . nosort completions . . numeric (lexicographical) . reverse . -J group-name . -V group-name -J . -J -o nosort . -1 -V . -J . . -2 -J -V . . -X explanation explanation . explanation EXPANSION OF PROMPT SEQUENCES zshmisc(1) : <<%B>> <<%S>> <<%U>> <<%F>> <<%K>> <<%{...%}>>. <<%F>> <<%K>> <<%{...%}>> (prompt expansion) . ( <<%G>> <<%{>> .) <<%%>> <<%>> ..PP format ( zshcompsys(1)) <<%>> _arguments _message . ${my_str//\%/%%} . -x message -X message . -q -S . -r remove-chars -q . -S remove-chars . print . <<-r "a-z\t">> TAB <<-r "^0-9">> . : <<\->> . <<-S "=" -q>> <<-S "=" -r "= \t\n\-">> . -S . -R remove-func -r . remove-func . () zle ( zshzle(1)) . -f completions . LIST_TYPES . . -e . AUTO_PARAM_SLASH AUTO_PARAM_KEYS . -W file-prefix -p . -f . -F array . completions . array <<-F "(*?.o *?.h)">>. . -Q (metacharacters) . -M match-spec <> . . match-spec . -U . -n completions . -U completions . . -O array completions . completions array . -A array -O completions array . <<-M "L:|no=">> <> completions <> <> -O <> . -D array -O completions . n completion n array . completion . . -C . -d . . -E number completions number . . ( -d ). -V -2 ( -J ). . - -- . completions . -M ( ) . compset -p number compset -P [ number ] pattern compset -s number compset -S [ number ] pattern compset -n begin [ end ] compset -N beg-pat [ end-pat ] compset -q . : -p number PREFIX number number IPREFIX . -P [ number ] pattern PREFIX pattern PREFIX IPREFIX . number number number . number number . PREFIX `a=b=c' compset -P '*\=' `a=b=' IPREFIX compset -P 1 '*\=' `a=' . -s number -p number SUFFIX ISUFFIX . -S [ number ] pattern -P SUFFIX ISUFFIX . -n begin [ end ] CURRENT begin begin words CURRENT begin . end end . end words . begin end words . -N beg-pat [ end-pat ] words CURRENT beg-pat words CURRENT . end-pat words CURRENT ( ). end-pat words . words end-pat . -q . words CURRENT PREFIX SUFFIX QIPREFIX QISUFFIX . . : if compset -P '*\='; then ... . compcall [ -TD ] compctl . (complete-word ) compctl . -T compctl / ( compctl -D ) -T / -D compcall . compctl . compctl . zsh/compctl . (COMPLETION CONDITION CODES) [[ ... ]] . . compset . -prefix [ number ] pattern -P compset . -suffix [ number ] pattern -S compset . -after beg-pat -N beg-pat . -between beg-pat end-pat -N . (COMPLETION MATCHING CONTROL) ( ) . . : o `*' ( ) o COMPLETE_IN_WORD `*' . compadd -M ( ` ' ). . . . o glob GLOB_COMPLETE pattern_match compstate -M ( ` ' ). o ( zshcompsys(1) ) -M matcher-list matcher ( Standard Styles COMPLETION SYSTEM CONFIGURATION zshcompsys(1) ). : o o `:' o (`|') o (`=') o . `=' . `=' OR . : o o o ( `\' ).TP o (`?') o (`[...]' Glob Operators GLOB OPERATORS zshexpn(1) ) / o ( ). . : o o (`0-9') / o (`[:name:]'). : o (`{...}') . o . `!' `^' . o n n `=' ( ) . . . `=' n `[:upper:]' `[:lower:]' . . `[:upper:]' `[:lower:]' `A-Z' `a-z' . . : . : . COMPLETE_IN_WORD ( ). m:word-pat=match-pat M:word-pat=match-pat word-pat match-pat . : m:{[:lower:]}={[:upper:]} . `foo' `FOO' `Foo' `fo' . M:_= (underscore) . `foo' `f_o' `f_oo' . b:word-pat=match-pat B:word-pat=match-pat e:word-pat=match-pat E:word-pat=match-pat (b:eginning) (e:nd) word-pat match-pat . : `b:-=+' . `B:0=' . l:|word-pat=match-pat L:|word-pat=match-pat r:word-pat|=match-pat R:word-pat|=match-pat (l:eft) (r:ight) word-pat match-pat . l: L: r: R: ( ) match-pat `*' . . : `r:|=*' `*' COMPLETE_IN_WORD . `L:|-=' . l:anchor|word-pat=match-pat L:anchor|word-pat=match-pat r:word-pat|anchor=match-pat R:word-pat|anchor=match-pat word-pat (l:eft) (r:ight) anchor match-pat . ( ) word-pat anchor ( coanchor ) . (anchor) . ( ) match-pat `*' `**' . `*' anchor `**' . ( `*' `l:' `r:' `*' `**' glob .).PP : `r:|.=*' `comp.sources.unix' `..u' -- `.u'. `--foo' `L:--|no-=' `--no-' `--no-foo' . l:anchor||coanchor=match-pat L:anchor||coanchor=match-pat r:coanchor||anchor=match-pat R:coanchor||anchor=match-pat anchor coanchor match-pat . anchor coanchor `*' . : `r:?||[[:upper:]]=*' `fB' `fooBar' `fooHooBar' ( `*' `[[:upper:]] ) `B' `fooBar' ( coanchor ). `pass.n' `pass.byname' `L:.||[[:alpha:]]=by' `pass.name' . x: . . ( zshcompsys(1) ) . (COMPLETION WIDGET EXAMPLE) : zle -C complete complete-word complete-files bindkey : bindkey '^X\t' complete control-X TAB complete-files . : complete-files () { compadd - * } . zsh 5.9.2 July 12, 2026 ZSHCOMPWID(1)