mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge 36d4dcf8b1 into b34aee7f76
This commit is contained in:
commit
238f7fa2da
1 changed files with 15 additions and 6 deletions
|
|
@ -11,6 +11,10 @@ _brew_installed_formulae() {
|
|||
installed_formulae=(`brew list`)
|
||||
}
|
||||
|
||||
_brew_outdated_formulae() {
|
||||
outdated_formulae=(`brew outdated`)
|
||||
}
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'cat:display formula file for a formula'
|
||||
|
|
@ -26,20 +30,21 @@ _1st_arguments=(
|
|||
'list:list files in a formula or not-installed formulae'
|
||||
'log:git commit log for a formula'
|
||||
'missing:check all installed formuale for missing dependencies.'
|
||||
'outdated:list formulas for which a newer version is available'
|
||||
'outdated:list formulae for which a newer version is available'
|
||||
'pin:pin specified formulae'
|
||||
'prune:remove dead links'
|
||||
'remove:remove a formula'
|
||||
'search:search for a formula (/regex/ or string)'
|
||||
'server:start a local web app that lets you browse formulae (requires Sinatra)'
|
||||
'unlink:unlink a formula'
|
||||
'unpin:unpin specified formulae'
|
||||
'update:freshen up links'
|
||||
'upgrade:upgrade outdated formulae'
|
||||
'uses:show formulas which depend on a formula'
|
||||
'versions:show all available formula versions'
|
||||
'uses:show formulae which depend on a formula'
|
||||
)
|
||||
|
||||
local expl
|
||||
local -a formulae installed_formulae
|
||||
local -a formulae installed_formulae outdated_formulae
|
||||
|
||||
_arguments \
|
||||
'(-v)-v[verbose]' \
|
||||
|
|
@ -65,6 +70,7 @@ case "$words[1]" in
|
|||
list|ls)
|
||||
_arguments \
|
||||
'(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
|
||||
'(--pinned)--pinned[list all versions of pinned formulae]' \
|
||||
'(--versions)--versions[list all installed versions of a formula]' \
|
||||
'1: :->forms' && return 0
|
||||
|
||||
|
|
@ -72,10 +78,13 @@ case "$words[1]" in
|
|||
_brew_installed_formulae
|
||||
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae
|
||||
fi ;;
|
||||
install|home|homepage|log|info|abv|uses|cat|deps|edit|options|versions)
|
||||
install|home|homepage|log|info|abv|uses|cat|deps|edit|options)
|
||||
_brew_all_formulae
|
||||
_wanted formulae expl 'all formulae' compadd -a formulae ;;
|
||||
remove|rm|uninstall|unlink|cleanup|link|ln)
|
||||
remove|rm|uninstall|unlink|cleanup|link|ln|pin|unpin)
|
||||
_brew_installed_formulae
|
||||
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
|
||||
upgrade)
|
||||
_brew_outdated_formulae
|
||||
_wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue