mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
better bash completion compatibility with non-brew
This commit is contained in:
parent
6f9bfc691c
commit
9fdcb0ccb6
1 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,10 @@
|
|||
# homebrew bash autocompletion
|
||||
if [ -f `brew --prefix`/etc/bash_completion ]; then
|
||||
source `brew --prefix`/etc/bash_completion
|
||||
# default bash autocompletion
|
||||
bash_completion_file="/etc/bash_completion"
|
||||
if which brew >/dev/null; then
|
||||
bash_completion_file="`brew --prefix`$bash_completion_file"
|
||||
fi
|
||||
[[ -f $bash_completion_file ]] || unset bash_completion_file
|
||||
[[ -n "$bash_completion_file" ]] && source "$bash_completion_file"
|
||||
unset bash_completion_file
|
||||
|
||||
# vim: ft=sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue