a38d7cf54a8d6f43caf8347c85a184da85fdbd0c
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/brew/_brew b/plugins/brew/_brew
2index 4c99a383ae237077bf0a5f9241a6aa7fddba2ee7..1f24bd67b10576067d7dd8d1aa2bc299dfafe103 100644
3--- a/plugins/brew/_brew
4+++ b/plugins/brew/_brew
5@@ -1,7 +1,13 @@
6 #compdef brew
7 #autoload
8
9-# imported from the latest homebrew contributions
10+# imported from https://github.com/Homebrew/homebrew/blob/29f73d2212c2b202fe25f69dcbf440d8391fa4c9/Library/Contributions/brew_zsh_completion.zsh
11+
12+# Brew ZSH completion function
13+# Drop this somewhere in your $fpath (like /usr/share/zsh/site-functions)
14+# and rename it _brew
15+#
16+# altered from _fink
17
18 _brew_all_formulae() {
19 formulae=(`brew search`)
20@@ -15,6 +21,14 @@ _brew_installed_taps() {
21 installed_taps=(`brew tap`)
22 }
23
24+_brew_official_taps() {
25+ official_taps=(`brew tap --list-official`)
26+}
27+
28+_brew_pinned_taps() {
29+ pinned_taps=(`brew tap --list-pinned`)
30+}
31+
32 _brew_outdated_formulae() {
33 outdated_formulae=(`brew outdated`)
34 }
35@@ -25,8 +39,10 @@ _1st_arguments=(
36 'cat:display formula file for a formula'
37 'cleanup:uninstall unused and old versions of packages'
38 'commands:show a list of commands'
39+ 'config:show homebrew and system configuration'
40 'create:create a new formula'
41- 'deps:list dependencies of a formula'
42+ 'deps:list dependencies and dependants of a formula'
43+ 'desc:display a description of a formula'
44 'doctor:audits your installation for common issues'
45 'edit:edit a formula'
46 'fetch:download formula resources to the cache'
47@@ -37,40 +53,45 @@ _1st_arguments=(
48 'reinstall:install a formula anew; re-using its current options'
49 'leaves:show installed formulae that are not dependencies of another installed formula'
50 'link:link a formula'
51+ 'linkapps:symlink .app bundles provided by formulae into /Applications'
52 'list:list files in a formula or not-installed formulae'
53 'log:git commit log for a formula'
54 'missing:check all installed formuale for missing dependencies.'
55+ 'migrate:migrate renamed formula to new name'
56 'outdated:list formulae for which a newer version is available'
57 'pin:pin specified formulae'
58 'postinstall:perform post_install for a given formula'
59 'prune:remove dead links'
60 'remove:remove a formula'
61 'search:search for a formula (/regex/ or string)'
62- 'switch:switch linkage between installed versions of a formula'
63+ 'switch:switch between different versions of a formula'
64 'tap:tap a new formula repository from GitHub, or list existing taps'
65+ 'tap-info:information about a tap'
66+ 'tap-pin:pin a tap'
67+ 'tap-unpin:unpin a tap'
68 'test-bot:test a formula and build a bottle'
69 'uninstall:uninstall a formula'
70 'unlink:unlink a formula'
71+ 'unlinkapps:remove symlinked .app bundles provided by formulae from /Applications'
72 'unpin:unpin specified formulae'
73 'untap:remove a tapped repository'
74- 'update:pull latest repository'
75+ 'update:fetch latest version of Homebrew and all formulae'
76 'upgrade:upgrade outdated formulae'
77 'uses:show formulae which depend on a formula'
78+ `brew commands --quiet --include-aliases`
79 )
80
81 local expl
82-local -a formulae installed_formulae installed_taps outdated_formulae
83+local -a formulae installed_formulae installed_taps official_taps outdated_formulae
84
85 _arguments \
86 '(-v)-v[verbose]' \
87 '(--cellar)--cellar[brew cellar]' \
88- '(--config)--config[brew configuration]' \
89 '(--env)--env[brew environment]' \
90 '(--repository)--repository[brew repository]' \
91 '(--version)--version[version information]' \
92 '(--prefix)--prefix[where brew lives on this system]' \
93 '(--cache)--cache[brew cache]' \
94- '(--force)--force[brew force]' \
95 '*:: :->subcmds' && return 0
96
97 if (( CURRENT == 1 )); then
98@@ -79,9 +100,18 @@ if (( CURRENT == 1 )); then
99 fi
100
101 case "$words[1]" in
102- install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|edit|options)
103+ install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|desc|edit|options|switch)
104 _brew_all_formulae