zsh:completion: Autoload and run bashcompinit

zshcompsys(1):

> The function bashcompinit provides compatibility with bash's
> programmable completion system. When run it will define the functions,
> compgen and complete which correspond to the bash builtins with the
> same names. It will then be possible to use completion specifications
> and functions written for bash.
This commit is contained in:
2022-04-09 15:12:41 +02:00
parent 39bec7a71a
commit 5c51bd87c4

View File

@@ -1,7 +1,8 @@
[[ ! -d "$ZDOTDIR/completion" ]] || fpath=("$ZDOTDIR/completion" $fpath)
autoload -Uz compinit
autoload -Uz compinit bashcompinit
compinit -d "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump-$ZSH_VERSION"
bashcompinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate