Completion Using compctl (zsh)

## 21 Completion Using compctl ¶

### 21.1 Types of completion ¶

This version of zsh has two ways of performing completion of words on the command line. New users of the shell may prefer to use the newer and more powerful system based on shell functions; this is described in Completion System, and the basic shell mechanisms which support it are described in Completion Widgets. This chapter describes the older `compctl` command.

### 21.2 Description ¶

`compctl` [ `-CDT` ] options [ command ... ]
`compctl` [ `-CDT` ] options [ `-x` pattern options `-` ... `-``-` ]
`` [ `+` options [ `-x` ... `-``-` ] ... [`+`] ] [ command ... ]
`compctl` `-M` match-specs ...
`compctl` `-L` [ `-CDTM` ] [ command ... ]
`compctl` `+` command ...

Control the editor’s completion behavior according to the supplied set of options. Various editing commands, notably `expand-or-complete-word`, usually bound to tab, will attempt to complete a word typed by the user, while others, notably `delete-char-or-list`, usually bound to ^D in EMACS editing mode, list the possibilities; `compctl` controls what those possibilities are. They may for example be filenames (the most common case, and hence the default), shell variables, or words from a user-specified list.