Zsh completion configuration: Difference between revisions

From wikinotes
(Created page with "= Loading Completions = <blockquote> <source lang="bash"> fpath=(~/.zsh/completion $fpath) # add completion dir to $fpath autoload -U compinit # init autocompletio...")
 
No edit summary
Line 12: Line 12:
* <code>autoload -U ~/.zsh/completion/_yourcompleter:t</code>
* <code>autoload -U ~/.zsh/completion/_yourcompleter:t</code>
</blockquote><!-- Loading Completions -->
</blockquote><!-- Loading Completions -->
= Customizing Completion Display =
<blockquote>
<syntaxhighlight lang="zsh">
zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
</syntaxhighlight>
</blockquote><!-- Customizing Completion Display -->

Revision as of 23:48, 28 December 2021

Loading Completions

fpath=(~/.zsh/completion $fpath) # add completion dir to $fpath
autoload -U compinit             # init autocompletion
compinit

The cleanest way to reload your autocompletion script is:

  • open a new terminal
  • autoload -U ~/.zsh/completion/_yourcompleter:t

Customizing Completion Display

zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'