From b90001bedd37c29b988a110e0e07ea3ba59d2b6f Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Thu, 20 Jun 2024 11:52:51 +0000 Subject: [PATCH] - Setup: Fix bash completions on mac --- setup | 2 ++ test/setup_artifacts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/setup b/setup index fa6c42b..5f67a50 100755 --- a/setup +++ b/setup @@ -54,6 +54,8 @@ install_completions() { compdir="/usr/share/bash-completion/completions" elif [[ -d "/usr/local/etc/bash_completion.d" ]]; then compdir="/usr/local/etc/bash_completion.d" + elif command -v brew &>/dev/null && [[ -d "$(brew --prefix)/etc/bash_completion.d" ]]; then + compdir="$(brew --prefix)/etc/bash_completion.d" else compdir='' fi diff --git a/test/setup_artifacts b/test/setup_artifacts index 236ef5a..ed85470 100755 --- a/test/setup_artifacts +++ b/test/setup_artifacts @@ -14,6 +14,8 @@ get_comp_dir() { echo "/usr/share/bash-completion/completions" elif [[ -d "/usr/local/etc/bash_completion.d" ]]; then echo "/usr/local/etc/bash_completion.d" + elif command -v brew &> /dev/null && [[ -d "$(brew --prefix)/etc/bash_completion.d" ]]; then + echo "$(brew --prefix)/etc/bash_completion.d" else echo '' fi