Some custom completion stuff
This commit is contained in:
parent
3b2eb6cd5b
commit
01d19b1b52
4 changed files with 32 additions and 22 deletions
25
completion.zsh
Normal file
25
completion.zsh
Normal file
|
@ -0,0 +1,25 @@
|
|||
# autoload completions
|
||||
fpath+=( "${ZDOTDIR:+ZDOTDIR}/compdef" )
|
||||
fpath+=( "/etc/zsh/compdef" )
|
||||
autoload -U /etc/zsh/compdef/*(:t)
|
||||
|
||||
if [[ -d $ZDOTDIR/compdef ]]; then
|
||||
autoload -U /etc/zsh/compdef/*(N:t)
|
||||
fi
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*:descriptions' format ‘%B%d%b’
|
||||
zstyle ':completion:*:messages' format ‘%d’
|
||||
zstyle ':completion:*:warnings' format ‘No matches for: %d’
|
||||
|
||||
|
||||
# completion for programs with standard gnu --help
|
||||
for prog in amm tapestry; do
|
||||
compdef _gnu_generic $prog
|
||||
done
|
||||
|
||||
# custom compdefs
|
||||
|
||||
compdef _xbps xi=xbps-install
|
Loading…
Add table
Add a link
Reference in a new issue