Merge pull request #4331 from apjanke/brew-style-complete-files
brew style zsh completion: complete files
This commit is contained in:
commit
7fac0b3b82
@ -32,6 +32,13 @@ __brew_list_aliases() {
|
|||||||
echo "${aliases}"
|
echo "${aliases}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__brew_formulae_or_ruby_files() {
|
||||||
|
local -a formulae
|
||||||
|
formulae=($(brew search))
|
||||||
|
_alternative 'formulae::__brew_formulae' \
|
||||||
|
'files:files:{_files -g *.rb}'
|
||||||
|
}
|
||||||
|
|
||||||
__brew_formulae() {
|
__brew_formulae() {
|
||||||
local -a formulae
|
local -a formulae
|
||||||
formulae=($(brew search))
|
formulae=($(brew search))
|
||||||
@ -571,8 +578,7 @@ _brew_style() {
|
|||||||
_arguments \
|
_arguments \
|
||||||
'(--fix)--fix[fix style violations automatically]' \
|
'(--fix)--fix[fix style violations automatically]' \
|
||||||
'(--display-cop-names)--display-cop-names[include RuboCop name for each violation in output]' \
|
'(--display-cop-names)--display-cop-names[include RuboCop name for each violation in output]' \
|
||||||
'*::formula:__brew_formulae'
|
'*::formula:__brew_formulae_or_ruby_files'
|
||||||
# TODO add files to completion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew switch name version:
|
# brew switch name version:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user