aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-11-13 16:49:43 -0600
committerJack Nagel2012-11-13 16:49:43 -0600
commit6c4c37a01f5356e82a64643dbf99f812e24d0d16 (patch)
tree669b89cd75529b7c2244a75248dc6969675690e6 /Library
parent4125fa81215a41796104dc4a0fd15bea0a02eb89 (diff)
downloadbrew-6c4c37a01f5356e82a64643dbf99f812e24d0d16.tar.bz2
bash completion for doctor checks
Diffstat (limited to 'Library')
-rw-r--r--Library/Contributions/brew_bash_completion.sh6
-rw-r--r--Library/Homebrew/cmd/doctor.rb5
2 files changed, 11 insertions, 0 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh
index 089872a15..a645ebeaa 100644
--- a/Library/Contributions/brew_bash_completion.sh
+++ b/Library/Contributions/brew_bash_completion.sh
@@ -136,6 +136,11 @@ _brew_deps ()
__brew_complete_formulae
}
+_brew_doctor () {
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ __brewcomp "$(brew doctor --list-checks)"
+}
+
_brew_diy ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -425,6 +430,7 @@ _brew ()
cleanup) _brew_cleanup ;;
create) _brew_create ;;
deps) _brew_deps ;;
+ doctor|dr) _brew_doctor ;;
diy|configure) _brew_diy ;;
fetch) _brew_fetch ;;
info|abv) _brew_info ;;
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 4a4496fbd..e939e2a2c 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -994,6 +994,11 @@ module Homebrew extend self
def doctor
checks = Checks.new
+ if ARGV.include? '--list-checks'
+ checks.methods.select { |m| m =~ /^check_/ }.sort.each { |m| puts m }
+ exit
+ end
+
inject_dump_stats(checks) if ARGV.switch? 'D'
methods = if ARGV.named.empty?