diff options
| author | Jack Nagel | 2012-01-06 14:35:48 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-06 14:51:15 -0600 |
| commit | f3f04e595d919cff81ed342ed0fd119f16a33bc0 (patch) | |
| tree | 5baf95afb9bd9cea82519547382bab7a1e56d118 /Library/Contributions | |
| parent | 016a508c7a8a1456a52a32ad4330d811d1a043aa (diff) | |
| download | brew-f3f04e595d919cff81ed342ed0fd119f16a33bc0.tar.bz2 | |
versions: enable '--compact' output
This will be useful for shell tab completion when something like `brew
install <formula> --version <version>` is implemented.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Contributions')
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 5 | ||||
| -rw-r--r-- | Library/Contributions/manpages/brew.1.md | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 355d6443f..8299ef9a9 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -197,6 +197,11 @@ _brew_to_completion() COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) return ;; + versions) + local opts=$([[ "${COMP_WORDS[*]}" =~ "--compact" ]] || echo "--compact") + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return + ;; esac fi diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index 2293b60f6..66fb3eb41 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -272,10 +272,13 @@ For the full command list, see the COMMANDS section. If `--installed` is passed, only list installed formulae. - * `versions` <formulae>: + * `versions [--compact]` <formulae>: List previous versions of <formulae>, along with a command to checkout each version. + If `--compact` is passed, show all options on a single line separated by + spaces. + * `--cache`: Display Homebrew's download cache. *Default:* `~/Library/Caches/Homebrew` |
