Logo
Explore Help
Sign In
mirrors/brew
1
0
Fork 0
You've already forked brew
mirror of https://github.com/Homebrew/brew.git synced 2025-07-14 16:09:03 +08:00
Code Issues Packages Projects Releases Wiki Activity
brew/Library/Homebrew/cmd/help.rb

8 lines
102 B
Ruby
Raw Normal View History

Refactor commands to remove "require cmd/help"
2018-06-05 23:19:18 -04:00
require "help"
help: use Commands module.
2016-09-07 20:09:29 +01:00
Only "extend self" once on the Homebrew module
2014-06-18 22:41:47 -05:00
module Homebrew
help: refactor (again) and fix code style issues Turns out making `empty_argv` a boolean argument for `Homebrew.help` was not the best idea and having command-to-path mapping and help extraction in a single method is not flexible enough. Also only complain about missing help text when `HOMEBREW_DEVELOPER=1` and otherwise just print the generic help text.
2016-04-19 07:24:21 +02:00
def help(cmd = nil, flags = {})
Refactor commands to remove "require cmd/help"
2018-06-05 23:19:18 -04:00
Help.help(cmd, flags)
Implement the `brew help` command This is also used by `brew <cmd> --help`. The basic idea is to have the documentation as a top level comment in each command file. To find these comments, they have to be like this `#:`. This is also used by the `brew man` command to keep the documentation DRY, and for that there are now a header and footer for the man page.
2016-04-03 20:17:01 +02:00
end
Optimise/simplify `brew help` Be more useful by being more concise. I referenced dozens of other mature commands’ usage to figure out what to do here. Also separated out the help into its own command for consistency.
2011-03-13 12:54:30 +00:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 503ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API