aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/help.rb40
-rw-r--r--Library/Homebrew/extend/ARGV.rb48
2 files changed, 43 insertions, 45 deletions
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
new file mode 100644
index 000000000..3e7cc75b9
--- /dev/null
+++ b/Library/Homebrew/cmd/help.rb
@@ -0,0 +1,40 @@
+HOMEBREW_HELP = <<-EOS
+Example usage:
+ brew install FORMULA...
+ brew uninstall FORMULA...
+ brew search [foo]
+ brew list [FORMULA...]
+ brew update
+ brew outdated
+ brew [info | home] [FORMULA...]
+
+Troubleshooting:
+ brew doctor
+ brew install -vd FORMULA
+ brew [--env | --config]
+
+Brewing:
+ brew create [URL [--no-fetch]]
+ brew edit [FORMULA...]
+ open https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
+
+Further help:
+ man brew
+ brew home
+EOS
+
+# NOTE Keep the lenth of vanilla --help less than 25 lines!
+# This is because the default Terminal height is 25 lines. Scrolling sucks
+# and concision is important. If more help is needed we should start
+# specialising help like the gem command does.
+# NOTE Keep lines less than 80 characters! Wrapping is just not cricket.
+# NOTE The reason the string is at the top is so 25 lines is easy to measure!
+
+module Homebrew extend self
+ def help
+ puts HOMEBREW_HELP
+ end
+ def help_s
+ HOMEBREW_HELP
+ end
+end
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 603239a34..604ef27dc 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -67,51 +67,9 @@ module HomebrewArgvExtension
return false
end
- def usage; <<-EOS.undent
- Usage: brew [-v|--version] [--prefix [formula]] [--cache [formula]]
- [--cellar [formula]] [--config] [--env] [--repository]
- [-h|--help] COMMAND [formula] ...
-
- Principal Commands:
- install formula ... [--ignore-dependencies] [--HEAD]
- list [--unbrewed|--versions] [formula] ...
- search [/regex/] [substring]
- uninstall formula ...
- update
-
- Other Commands:
- info formula [--github]
- options formula
- deps formula
- uses formula [--installed]
- home formula ...
- cleanup [formula]
- link formula ...
- unlink formula ...
- outdated
- missing
- prune
- doctor
-
- Informational:
- --version
- --config
- --prefix [formula]
- --cache [formula]
-
- Commands useful when contributing:
- create URL
- edit [formula]
- audit [formula]
- log formula
- install formula [-vd|-i]
-
- For more information:
- man brew
-
- To visit the Homebrew homepage type:
- brew home
- EOS
+ def usage
+ require 'cmd/help'
+ Homebrew.help_s
end
private