diff options
| author | Jack Nagel | 2012-01-21 00:08:35 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-25 23:04:08 -0600 |
| commit | 22d1c07bd1806e20cf9e8aecdf945e8133eaf794 (patch) | |
| tree | 928af0f8a861f2bfa23a1f0ef35566b41bc26ecd /Library/Formula | |
| parent | 74bff3983dcfe5e964bae8b872d455adbf71186c (diff) | |
| download | homebrew-22d1c07bd1806e20cf9e8aecdf945e8133eaf794.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/Formula')
0 files changed, 0 insertions, 0 deletions
