Fix tap completion when there aren't any taps

This commit is contained in:
Jack Nagel 2014-04-24 21:36:59 -05:00
parent a699eeb468
commit c466b20591

View File

@ -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"