From a87694e968fc3a28dc486d47bd4047037324b44a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 23 May 2024 09:56:28 +0700 Subject: [PATCH] fix: Ffs mac --- .config/zsh/include/completion | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/zsh/include/completion b/.config/zsh/include/completion index 153e38c..56cdff9 100644 --- a/.config/zsh/include/completion +++ b/.config/zsh/include/completion @@ -4,9 +4,11 @@ fpath=(/usr/local/share/zsh-completions $fpath) autoload -Uz compinit -if [[ "$OSTYPE" == "darwin"* && "$(which brew)" == "brew not found" ]]; then - FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" - compinit -u # homebrew moment, not recommended but whatever +if [[ "$OSTYPE" == "darwin"* ]]; then + brew >/dev/null 2>/dev/null && { + FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"; + compinit -u; # homebrew moment, not recommended but whatever + } else compinit fi