Skip to content

Commit

Permalink
🚜 Fixes homebrew base competions
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Apr 5, 2024
1 parent baf72ac commit f2a837a
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions home/.bash_osx
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,20 @@

set completion-ignore-case On

# auto-load bash_completion.d
if [ -d /usr/local/etc/bash_completion.d ]; then
for filename in "/usr/local/etc/bash_completion.d/"*; do
if [ -f "${filename}" ]; then
# shellcheck source=/dev/null
source "${filename}"
# echo "${filename}"
fi
if type brew &>/dev/null
then
HOMEBREW_PREFIX="$(brew --prefix)"
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]
then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
else
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*
do
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
done
fi
fi

# elif [ -d /opt/homebrew/etc/bash_completion.d ]; then
# for filename in "/opt/homebrew/etc/bash_completion.d/"*; do
# if [ -f "${filename}" ]; then
# # shellcheck source=/dev/null
# source "${filename}"
# fi
# done
# fi

# [[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh"

################
# bash history #
################
Expand Down

0 comments on commit f2a837a

Please sign in to comment.