From c466b20591df86f9972b42d5f3e2ce9ab2cfdd34 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 24 Apr 2014 21:36:59 -0500 Subject: Fix tap completion when there aren't any taps --- Library/Contributions/brew_bash_completion.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library') diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index daaacd861..54ce7fe09 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -67,6 +67,7 @@ __brew_complete_formulae () local tf file for file in ${taps}/*/*/*.rb ${taps}/*/*/Formula/*.rb ${taps}/*/*/HomebrewFormula/*.rb; do + [ -f "$file" ] || continue file=${file/"Formula/"/} file=${file/"HomebrewFormula/"/} file=${file#${lib}/Taps/} @@ -115,6 +116,7 @@ __brew_complete_tapped () local dir taps for dir in ${taplib}/*/*; do + [ -d "$dir" ] || continue dir=${dir#${taplib}/} dir=${dir/homebrew-/} taps="$taps $dir" -- cgit v1.2.3