make alias test happy
parent
57f4343d04
commit
efa911d58a
|
|
@ -1,29 +1,27 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Only operate on MacOS since there are no linux paths
|
# Only operate on MacOS since there are no linux paths
|
||||||
if [[ $(uname) == 'Darwin' ]] ; then
|
[[ "$(uname -s)" -eq 'Darwin' ]] || return
|
||||||
|
|
||||||
# Make sure git is installed
|
# Make sure git is installed
|
||||||
_command_exists git || return
|
_command_exists git || return
|
||||||
|
|
||||||
# Don't handle completion if it's already managed
|
# Don't handle completion if it's already managed
|
||||||
! complete -p git &>/dev/null || return
|
! complete -p git &>/dev/null || return
|
||||||
|
|
||||||
_git_bash_completion_paths=(
|
_git_bash_completion_paths=(
|
||||||
# MacOS non-system locations
|
# MacOS non-system locations
|
||||||
'/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash'
|
'/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash'
|
||||||
'/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash'
|
'/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash'
|
||||||
)
|
)
|
||||||
|
|
||||||
for _comp_path in "${_git_bash_completion_paths[@]}" ; do
|
for _comp_path in "${_git_bash_completion_paths[@]}" ; do
|
||||||
if [ -r "$_comp_path" ] ; then
|
if [ -r "$_comp_path" ] ; then
|
||||||
source "$_comp_path"
|
source "$_comp_path"
|
||||||
unset _git_bash_completion_paths
|
unset _git_bash_completion_paths
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
unset _git_bash_completion_paths
|
unset _git_bash_completion_paths
|
||||||
_log_warning "no completion files found - please try enabling the 'system' completion instead."
|
_log_warning "no completion files found - please try enabling the 'system' completion instead."
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue