brew --compact
This commit is contained in:
parent
97b8f9a31f
commit
6864140237
@ -42,7 +42,7 @@ _brew_to_completion()
|
||||
# Complete --options for selected brew
|
||||
*)
|
||||
[[ ${COMP_WORDS[1]} == "install" ]] && [[ "$cur" == --* ]] && {
|
||||
COMPREPLY=( $(compgen -W "$(brew options "$prev" | grep -P "^--")" -- ${cur}) )
|
||||
COMPREPLY=( $(compgen -W "$(brew options --compact "$prev")" -- ${cur}) )
|
||||
return
|
||||
}
|
||||
;;
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
compact = ARGV.include? '--compact'
|
||||
|
||||
ARGV.formulae.each do |f|
|
||||
f.options rescue next
|
||||
puts f.name
|
||||
f.options.each do |o|
|
||||
puts o[0]
|
||||
puts "\t"+o[1]
|
||||
if compact
|
||||
puts f.options.collect {|o| o[0]} * " "
|
||||
else
|
||||
puts f.name
|
||||
f.options.each do |o|
|
||||
puts o[0]
|
||||
puts "\t"+o[1]
|
||||
end
|
||||
puts
|
||||
end
|
||||
puts
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user