diff options
| author | Jack Nagel | 2014-04-24 21:36:59 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-24 21:36:59 -0500 |
| commit | c466b20591df86f9972b42d5f3e2ce9ab2cfdd34 (patch) | |
| tree | dd3ab347a382dc0c649d016a3dae04496a4b877e | |
| parent | a699eeb468956446d9ae7e71df7deaf7d214844b (diff) | |
| download | brew-c466b20591df86f9972b42d5f3e2ce9ab2cfdd34.tar.bz2 | |
Fix tap completion when there aren't any taps
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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" |
