From ebcd096ab74fc729d7b0a888000a41ed3d8562c3 Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 2 Aug 2024 20:36:14 +0200 Subject: [PATCH] feat: add homebrew zsh completions support --- shell/settings/zsh.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/settings/zsh.sh b/shell/settings/zsh.sh index 2c1bcb4..3c6b7c6 100755 --- a/shell/settings/zsh.sh +++ b/shell/settings/zsh.sh @@ -46,6 +46,13 @@ setopt hist_verify # Do not execute immediately upon history expansio fpath+="$HOME/.config/shell/zfunctions" fpath+="$HOME/.zsh/zfunctions" +if hash brew 2>/dev/null && [[ -d "$(brew --prefix)/share/zsh-completions" ]]; then + fpath+="$(brew --prefix)/share/zsh-completions" +fi + +if [[ -d /opt/homebrew/share/zsh/site-functions ]]; then + fpath+="/opt/homebrew/share/zsh/site-functions" +fi # Color man pages export LESS_TERMCAP_mb=$'\E[01;32m'