diff options
| author | Jack Nagel | 2014-04-24 17:24:27 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-24 17:24:27 -0500 |
| commit | 3f10327c0e9327501e3fd0cdff21b79e9658f4e5 (patch) | |
| tree | 2dcc521cf2fd51dd2b9590d37843414c8fbd6f10 /Library | |
| parent | 54004a4759fa660c4294c00f1b4708f514948250 (diff) | |
| download | brew-3f10327c0e9327501e3fd0cdff21b79e9658f4e5.tar.bz2 | |
Update bash completion for new tap format
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 5f7a45db5..daaacd861 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -66,12 +66,12 @@ __brew_complete_formulae () local af=$(\ls ${lib}/Aliases 2>/dev/null) 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 file=${file/"Formula/"/} file=${file/"HomebrewFormula/"/} file=${file#${lib}/Taps/} file=${file%.rb} - file=${file/-//} + file=${file/homebrew-/} tf="${tf} ${file}" done @@ -111,7 +111,15 @@ _brew_switch () __brew_complete_tapped () { - __brewcomp "$(\ls $(brew --repository)/Library/Taps 2>/dev/null | sed 's/-/\//g')" + local taplib=$(brew --repository)/Library/Taps + local dir taps + + for dir in ${taplib}/*/*; do + dir=${dir#${taplib}/} + dir=${dir/homebrew-/} + taps="$taps $dir" + done + __brewcomp "$taps" } _brew_complete_tap () |
