Skip to content
Browse files

Conditionally load completion scripts

  • Loading branch information...
1 parent 0ac5464 commit 9a499152e224ca3b5ee00ed8bfe2545f64692e8f Adam Hutchison committed Feb 25, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 bash/completions
View
12 bash/completions
@@ -1,5 +1,13 @@
-source ~/.bash/completion_scripts/git_completion
-source `brew --prefix`/Library/Contributions/brew_bash_completion.sh
complete -C ~/.bash/completion_scripts/rake_completion -o default rake
complete -C ~/.bash/completion_scripts/project_completion -o default c
complete -C ~/.bash/completion_scripts/capistrano_completion -o default cap
+
+if which git &> /dev/null; then
+ source ~/.bash/completion_scripts/git_completion
+else
+ echo "Hmmm... git doesn't seem to be installed."
+fi
+
+if which brew &> /dev/null; then
+ source `brew --prefix`/Library/Contributions/brew_bash_completion.sh
+fi

0 comments on commit 9a49915

Please sign in to comment.
Something went wrong with that request. Please try again.