Skip to content

Commit 6448c46

Browse files
committed
ensure mac bash_completion.d exists
1 parent 7ecdaba commit 6448c46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ install_completions() {
5454
compdir="/usr/share/bash-completion/completions"
5555
elif [[ -d "/usr/local/etc/bash_completion.d" ]]; then
5656
compdir="/usr/local/etc/bash_completion.d"
57-
elif command -v brew &> /dev/null; then
57+
elif command -v brew &> /dev/null && [[ -d "$(brew --prefix)/etc/bash_completion.d" ]]; then
5858
compdir="$(brew --prefix)/etc/bash_completion.d"
5959
else
6060
compdir=''

test/setup_artifacts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ get_comp_dir() {
1414
echo "/usr/share/bash-completion/completions"
1515
elif [[ -d "/usr/local/etc/bash_completion.d" ]]; then
1616
echo "/usr/local/etc/bash_completion.d"
17-
elif command -v brew &> /dev/null; then
17+
elif command -v brew &> /dev/null && [[ -d "$(brew --prefix)/etc/bash_completion.d" ]]; then
1818
echo "$(brew --prefix)/etc/bash_completion.d"
1919
else
2020
echo ''

0 commit comments

Comments
 (0)