compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask_学无止境-优快云博客
解决方法:
找个_brew_cask添加到Homebrew/completions/zsh文件夹中
将下面内容添加到_brew_cask文件中,文件没有后缀
#compdef brew-cask
#autoload
# Zsh Autocompletion script for Homebrew Cask
# https://github.com/homebrew/brew
# Authors:
# Patrick Stadler (https://github.com/pstadler)
# Josh McKinney (https://github.com/joshka)
# only display the main commands (but enable completing aliases like 'ls')
zstyle -T ':completion:*:*:*:brew-cask:*' tag-order && \
zstyle ':completion:*:*:*:brew-cask:*' tag-order 'commands'
__brew_all_casks() {
local -a list
local expl
local comp_cachename=brew_casks
if ! _retrieve_cache $comp_cachename; then
list=( $(brew search --cask) )
_store_cache $comp_cachename list
fi
_wanted list expl 'all casks' compadd -a list
}
__brew_installed_casks() {
local -a list
local expl
list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
__brew_cask_commands() {
local -a commands
commands=(
'audit:verifies installability of C