Fix tap completion when there aren't any taps
This commit is contained in:
parent
a699eeb468
commit
c466b20591
@ -67,6 +67,7 @@ __brew_complete_formulae ()
|
|||||||
local tf file
|
local tf file
|
||||||
|
|
||||||
for file in ${taps}/*/*/*.rb ${taps}/*/*/Formula/*.rb ${taps}/*/*/HomebrewFormula/*.rb; do
|
for file in ${taps}/*/*/*.rb ${taps}/*/*/Formula/*.rb ${taps}/*/*/HomebrewFormula/*.rb; do
|
||||||
|
[ -f "$file" ] || continue
|
||||||
file=${file/"Formula/"/}
|
file=${file/"Formula/"/}
|
||||||
file=${file/"HomebrewFormula/"/}
|
file=${file/"HomebrewFormula/"/}
|
||||||
file=${file#${lib}/Taps/}
|
file=${file#${lib}/Taps/}
|
||||||
@ -115,6 +116,7 @@ __brew_complete_tapped ()
|
|||||||
local dir taps
|
local dir taps
|
||||||
|
|
||||||
for dir in ${taplib}/*/*; do
|
for dir in ${taplib}/*/*; do
|
||||||
|
[ -d "$dir" ] || continue
|
||||||
dir=${dir#${taplib}/}
|
dir=${dir#${taplib}/}
|
||||||
dir=${dir/homebrew-/}
|
dir=${dir/homebrew-/}
|
||||||
taps="$taps $dir"
|
taps="$taps $dir"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user