From 536deb63b6bbd4c7b46f8979122fa916cf005de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20B=C3=BCckendorf?= Date: Sat, 18 May 2019 15:48:09 +0200 Subject: [PATCH] bashrc.d: Added bash completion for MacOS stuff --- .bashrc.d/brew_caveats.sh | 10 ++++++++++ .bashrc.d/dotfiles_command.sh | 1 + 2 files changed, 11 insertions(+) create mode 100644 .bashrc.d/brew_caveats.sh diff --git a/.bashrc.d/brew_caveats.sh b/.bashrc.d/brew_caveats.sh new file mode 100644 index 0000000..b74b695 --- /dev/null +++ b/.bashrc.d/brew_caveats.sh @@ -0,0 +1,10 @@ +# Save other operating systems some work +if [[ $OSTYPE != darwin* ]]; then + return +fi + +# brew formula bash-completion +if [[ -r /usr/local/etc/profile.d/bash_completion.sh ]]; then + export BASH_COMPLETION_COMPAT_DIR=/usr/local/etc/bash_completion.d + . /usr/local/etc/profile.d/bash_completion.sh +fi diff --git a/.bashrc.d/dotfiles_command.sh b/.bashrc.d/dotfiles_command.sh index c29caf1..f7da2b0 100644 --- a/.bashrc.d/dotfiles_command.sh +++ b/.bashrc.d/dotfiles_command.sh @@ -17,6 +17,7 @@ possible_locations=( "/usr/share/doc/git/contrib/completion/git-completion.bash" "/usr/share/git/completion/git-completion.bash" "/usr/share/bash-completion/completions/git" + "/usr/local/etc/bash_completion.d/git-completion.bash" ) for completion_file in "${possible_locations[@]}"