➜  site-functions pwd
/usr/local/share/zsh/site-functions
➜  site-functions ls -all
total 0
drwxr-xr-x  5 air  wheel  160 11 25 08:56 .
drwxr-xr-x  4 air  wheel  128 11 26 11:42 ..
lrwxr-xr-x  1 air  wheel   39 11 25 08:56 _brew -> ../../../Homebrew/completions/zsh/_brew
lrwxr-xr-x  1 air  wheel   44 11 25 08:56 _brew_cask -> ../../../Homebrew/completions/zsh/_brew_cask
lrwxr-xr-x  1 air  wheel   88 11 25 08:56 _brew_services -> ../../../Homebrew/Library/Taps/homebrew/homebrew-services/completions/zsh/_brew_services
➜  site-functions

问题原因:跳转到下面路径,发现没有文件

../../../Homebrew/completions/zsh/_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 listlocal expllocal comp_cachename=brew_casksif ! _retrieve_cache $comp_cachename; thenlist=( $(brew search --cask) )_store_cache $comp_cachename listfi_wanted list expl 'all casks' compadd -a list
}__brew_installed_casks() {local -a listlocal expllist=( $(brew list --cask) )_wanted list expl 'installed casks' compadd -a list
}__brew_cask_commands() {local -a commandscommands=('audit:verifies installability of Casks''cat:dump raw source of the given Cask to the standard output''create:creates the given Cask and opens it in an editor''doctor:checks for configuration issues''edit:edits the given Cask''fetch:downloads remote application files to local cache''home:opens the homepage of the given Cask''info:displays information about the given Cask''install:installs the given Cask''list:with no args, lists installed Casks; given installed Casks, lists staged files''outdated:list the outdated installed Casks''reinstall:reinstalls the given Cask''style:checks Cask style using RuboCop''uninstall:uninstalls the given Cask''upgrade:upgrade installed Casks with newer versions''zap:zaps all files associated with the given Cask')_describe -t commands "brew cask command" commands
}__brew_cask_aliases() {local -a aliasesaliases=('dr''homepage''abv''ls''-S''rm''remove')_describe -t commands "brew cask command aliases" aliases
}__brew_cask_command() {local command="$1"local completion_func="_brew_cask_${command//-/_}"declare -f "$completion_func" >/dev/null && "$completion_func" && return
}_brew_cask_abv() {_brew_cask_info
}_brew_cask_audit() {__brew_all_casks
}_brew_cask_cat() {__brew_all_casks
}_brew_cask_create() {_arguments '*::token:'
}_brew_cask_edit() {__brew_all_casks
}_brew_cask_fetch() {_arguments : \'--force:force re-download even if the files are already cached' \'*::token:__brew_all_casks'
}_brew_cask_home() {__brew_all_casks
}_brew_cask_homepage() {__brew_cask_home
}_brew_cask_info() {__brew_all_casks
}_brew_cask_install() {_arguments : \'--force:re-install even if the Cask appears to be already present' \'--skip-cask-deps:skip any Cask dependencies' \'--require-sha:abort installation if the Cask does not have a checksum defined' \'*::token:__brew_all_casks'
}_brew_cask_list() {_arguments : \'-1[format output in a single column]' \'-l[format as detailed list]' \'*::token:__brew_installed_casks'
}_brew_cask_outdated() {_arguments : \'--greedy:also list Casks with auto_updates or version \:latest' \'*::token:__brew_installed_casks'
}_brew_cask_remove() {_brew_cask_uninstall
}_brew_cask_rm() {_brew_cask_uninstall
}_brew_cask_style() {_arguments : \'--fix:auto-correct any style errors if possible' \'*::token:__brew_all_casks'
}_brew_cask_uninstall() {_arguments : \'--force:uninstall even if the Cask does not appear to be present' \'*::token:__brew_installed_casks'
}_brew_cask_upgrade() {_arguments : \'--force:upgrade even if Cask is not present, and --force the install' \'--greedy:also upgrade Casks with auto_updates or version \:latest' \'*::token:__brew_installed_casks'
}_brew_cask_zap() {__brew_all_casks
}_brew_cask()
{local curcontext="$curcontext" state state_descr linetypeset -A opt_args_arguments -C : \'--verbose:Give additional feedback during installation.' \'--appdir=-:Target location for Applications. The default value is /Applications:' \'--colorpickerdir=-:Target location for Color Pickers. The default value is ~/Library/ColorPickers.' \'--prefpanedir=-:Target location for Preference Panes. The default value is ~/Library/PreferencePanes.' \'--qlplugindir=-:Target location for QuickLook Plugins. The default value is ~/Library/QuickLook.' \'--dictionarydir=-:Target location for Dictionaries. The default value is ~/Library/Dictionaries.' \'--fontdir=-:Target location for Fonts. The default value is ~/Library/Fonts.' \'--servicedir=-:Target location for Services. The default value is ~/Library/Services.' \'--input_methoddir=-:Target location for Input Methods. The default value is ~/Library/Input Methods.' \'--internet_plugindir=-:Target location for Internet Plugins. The default value is ~/Library/Internet Plug-Ins.' \'--audio_unit_plugindir=-:Target location for Audio Unit Plugins. The default value is ~/Library/Audio/Plug-Ins/Components.' \'--vst_plugindir=-:Target location for VST Plugins. The default value is ~/Library/Audio/Plug-Ins/VST.' \'--vst3_plugindir=-:Target location for VST3 Plugins. The default value is ~/Library/Audio/Plug-Ins/VST3.' \'--screen_saverdir=-:Target location for Screen Savers. The default value is ~/Library/Screen Savers.' \'--no-binaries:Do not link "helper" executables to /usr/local/bin.' \'--debug:Output debugging information of use to Cask authors and developers.' \':command:->command' \'*::options:->options'case "$state" in(command)_alternative -C 'brew-cask' \'aliases:alias:__brew_cask_aliases' \'commands:command:__brew_cask_commands' ;;(options)__brew_cask_command "$line[1]" ;;esac
}_brew_cask "$@"

compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask相关推荐

  1. zsh 缺少 /usr/local/share/zsh/site-functions/_brew_cask

    compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask_学无止境-CSDN博客 ...

  2. Error: Could not link: /usr/local/share/doc/homebrew

    文章转自:http://c.n-di.com/2017/07/17/1827.html 版权归原作者! mac 执行brew update 报错 Error: Could not link: /usr ...

  3. sudo: Cannot execute /usr/local/bin/zsh: No such file or directory 问题

    参考:sudo: Cannot execute /usr/local/bin/zsh: No such file or directory 之前在美化Ubuntu的时候,下了个zsh,但是忘记改配置文 ...

  4. bison: /usr/local/share/bison.simple: No such file or directory

    bison: /usr/local/share/bison.simple: No such file or directory 前言: 这个问题是在太坑了,网上搜到的资料又太少,所以记下来吧,希望能帮 ...

  5. hadoop3: mkdir: cannot create directory `/usr/local/hadoop/bin/../logs’: Permission denied

    1.hadoop3: mkdir: cannot create directory `/usr/local/hadoop/bin/../logs': Permission denied 把所有Data ...

  6. Mac brew报错Error: The following directories are not writable by your user: /usr/local/share/man/man5

    解决方法 sudo chown -R $(whoami) /usr/local/share/man/man5 chmod u+w /usr/local/share/man/man5

  7. 配置Hadoop格式化namenode时报错cannot create directory /usr/local/hadoop/tmp/dfs/name/current

    格式化namenode时,通过以下字句验证是否成功 status 0 为操作成功,status 1为操作失败,往上翻查找错误原因 该错误是由于权限问题导致的 我们通过 sudo su 进入root操作 ...

  8. cp: -r not specified; omitting directory '/usr/local/'

    这个错误消息表示在使用 cp 命令时,没有指定 -r 参数.而 -r 参数是用来拷贝目录的,由于没有指定,所以 cp 命令忽略了要拷贝的目录 /usr/local/.如果您希望拷贝整个目录,需要在命令 ...

  9. Can't locate Automake/Config.pm in @INC(@INC contains: /usr/local/share/automake-1.14 /xxxxx)

    总是会遇到这种问题: 解决方法:上传压缩包,用解压命令解压后安装. 亲测有效.试过改路径啥的都没用.

最新文章

  1. 投了3遍都被毙的论文,终于中了
  2. 解决https协议服务器内部无法跳转的问题
  3. 用python玩转数据慕课答案第四周_大学慕课用Python玩转数据章节测试答案
  4. jsp:include标签与include指令的区别
  5. security面试_41 道 Spring Boot 面试题,帮你整理好了!
  6. PHP百度收录量查询接口源码,百度收录量API查询PHP源码
  7. 折腾一天,获取下列多选框的所有选中值,原生js可直接通过obj.val()来获取,可jq不行,要通过循环取值来获取;...
  8. word树状分支图_word绘制树形图
  9. Discuz!首页去掉版块的最后发表、主题数、总帖数
  10. 分布式游戏服务器设计
  11. linux服务器关不了机,解决Linux关不了机开机,报错NMI watchdog: BUG: soft lockup - CPU#2 stuck for 22s的bug...
  12. 服务器怎么修改mac地址怎么办,服务器修改mac地址重启后会恢復原mac吗?
  13. React AntV/G2Plot环形图Pie添加点击事件,即点击图环触发获取相关数据。
  14. Linux_查看内存使用情况
  15. arm汇编lr pc b bl ret指令函数调用和返回gif动图演示
  16. 产后修复治疗仪方案/案列/APP/网站
  17. FAERIE QVEENE 仙后节选
  18. Rethinking Image Aesthetics Assessment:Models,Datasets and Benchmarks
  19. 体验篇 - 部署以太坊私有链 (PoA)
  20. H265编码 SPS分析

热门文章

  1. 晶振知识小结(晶振电路设计)
  2. html如何插入视频qsv,爱奇艺视频qsv怎么转换成mp4?
  3. 华为ws851虚拟服务器,华为荣耀路由Pro(WS851)设置后不能上网怎么办?
  4. 中国电信php,适⽤于华为、中国电信物联⽹平台北向应⽤对接的PHP版本SDK
  5. 还在为信号不稳定、流量限速烦恼?来试试4G路由器
  6. UE4通过鼠标和键盘可以移动角色
  7. 【优化调度】基于NSGA2算法多技能员工调度优化模型含Matlab源码
  8. threejs灯光阴影
  9. 《缠中说禅108课》14:喝茅台的高潮程序
  10. DA14583 OTA 固件升级