my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
595 B

3 years ago
  1. () {
  2. emulate -L zsh
  3. if ! (( $+commands[cask] )); then
  4. print "zsh cask plugin: cask command not found" >&2
  5. return
  6. fi
  7. cask_base=${commands[cask]:h:h}
  8. # Plain cask installation location (for Cask 0.7.2 and earlier)
  9. comp_files=($cask_base/etc/cask_completion.zsh)
  10. # Mac Homebrew installs the completion in a different location
  11. if (( $+commands[brew] )); then
  12. comp_files+=($(brew --prefix)/share/zsh/site-functions/cask_completion.zsh)
  13. fi
  14. # Load first found file
  15. for f in $comp_files; do
  16. if [[ -f "$f" ]]; then
  17. source "$f"
  18. break
  19. fi
  20. done
  21. }