aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorJack Nagel2012-01-21 00:08:35 -0600
committerJack Nagel2012-01-25 23:04:08 -0600
commitba69e170734cf561b63fc309fd7ca15c0a221d53 (patch)
treefc60fda10c1283dd450a73fa2917fcffbc8178fd /Library/Homebrew/utils.rb
parentab19242d0484a91ca2b9dac28c8a131be08758d6 (diff)
downloadbrew-ba69e170734cf561b63fc309fd7ca15c0a221d53.tar.bz2
Refactor the bash completion script
The script was lacking structure and had grown a number of one-off hacks that would be better as reusable functions. So, - give each subcommand that has completions it's own function - move completion of formulae, installed brews, and outdated brews into reusable functions - introduce a general __brewcomp() function that takes a string of tab, space, and/or newline separated items and converts all seperators to newlines, and then generates a reply with compgen(). These changes should allow for easier addition of new features in the future. As a bonus, completion for `brew log` will include git-log options if the git completion script is also loaded. _brew_to_completion() is kept around for compatiblity. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/utils.rb')
0 files changed, 0 insertions, 0 deletions