diff --git a/completions/bash/brew b/completions/bash/brew index 967363f593..035782f253 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -2028,6 +2028,24 @@ _brew_ruby() { __brew_complete_files } +_brew_rubydoc() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --help + --only-public + --open + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_search() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -2759,6 +2777,7 @@ _brew() { remove) _brew_remove ;; rm) _brew_rm ;; ruby) _brew_ruby ;; + rubydoc) _brew_rubydoc ;; search) _brew_search ;; sh) _brew_sh ;; style) _brew_style ;; diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index e8ab276a78..cfd60856b8 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1363,6 +1363,15 @@ __fish_brew_complete_arg 'ruby' -l e -d 'Execute the given text string as a scri __fish_brew_complete_arg 'ruby' -l r -d 'Load a library using `require`' +__fish_brew_complete_cmd 'rubydoc' 'Generate Homebrew\'s RubyDoc documentation' +__fish_brew_complete_arg 'rubydoc' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'rubydoc' -l help -d 'Show this message' +__fish_brew_complete_arg 'rubydoc' -l only-public -d 'Only generate public API documentation' +__fish_brew_complete_arg 'rubydoc' -l open -d 'Open generated documentation in a browser' +__fish_brew_complete_arg 'rubydoc' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'rubydoc' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'search' 'Perform a substring search of cask tokens and formula names for text' __fish_brew_complete_arg 'search' -l archlinux -d 'Search for text in the given database' __fish_brew_complete_arg 'search' -l cask -d 'Search for casks' diff --git a/completions/internal_commands_list.txt b/completions/internal_commands_list.txt index 45d6e2f367..b9ae55c71e 100644 --- a/completions/internal_commands_list.txt +++ b/completions/internal_commands_list.txt @@ -85,6 +85,7 @@ remove rm rubocop ruby +rubydoc search setup-ruby sh diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 1253d2becb..6a4fe95e06 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -205,6 +205,7 @@ __brew_internal_commands() { 'release:Create a new draft Homebrew/brew release with the appropriate version number and release notes' 'rubocop:Installs, configures and runs Homebrew'\''s `rubocop`' 'ruby:Run a Ruby instance with Homebrew'\''s libraries loaded' + 'rubydoc:Generate Homebrew'\''s RubyDoc documentation' 'search:Perform a substring search of cask tokens and formula names for text' 'setup-ruby:Installs and configures Homebrew'\''s Ruby' 'sh:Enter an interactive shell for Homebrew'\''s build environment' @@ -1684,6 +1685,17 @@ _brew_ruby() { '*::file:__brew_formulae_or_ruby_files' } +# brew rubydoc +_brew_rubydoc() { + _arguments \ + '--debug[Display any debugging information]' \ + '--help[Show this message]' \ + '--only-public[Only generate public API documentation]' \ + '--open[Open generated documentation in a browser]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew search _brew_search() { _arguments \ diff --git a/docs/Manpage.md b/docs/Manpage.md index fbce73728d..c39a488633 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -2554,6 +2554,18 @@ Run e.g. `brew ruby -- --version` to pass arbitrary arguments to `ruby`. : Execute the given text string as a script. +### `rubydoc` \[`--only-public`\] \[`--open`\] + +Generate Homebrew's RubyDoc documentation. + +`--only-public` + +: Only generate public API documentation. + +`--open` + +: Open generated documentation in a browser. + ### `sh` \[`--env=`\] \[`--cmd=`\] \[*`file`*\] Enter an interactive shell for Homebrew's build environment. Use diff --git a/manpages/brew.1 b/manpages/brew.1 index f3f73d9497..5aa403933a 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1627,6 +1627,14 @@ Load a library using \fBrequire\fP\&\. .TP \fB\-e\fP Execute the given text string as a script\. +.SS "\fBrubydoc\fP \fR[\fB\-\-only\-public\fP] \fR[\fB\-\-open\fP]" +Generate Homebrew\[u2019]s RubyDoc documentation\. +.TP +\fB\-\-only\-public\fP +Only generate public API documentation\. +.TP +\fB\-\-open\fP +Open generated documentation in a browser\. .SS "\fBsh\fP \fR[\fB\-\-env=\fP] \fR[\fB\-\-cmd=\fP] \fR[\fIfile\fP]" Enter an interactive shell for Homebrew\[u2019]s build environment\. Use years\-battle\-hardened build logic to help your \fB\&\./configure && make && make install\fP and even your \fBgem install\fP succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fP to your \fBPATH\fP which build systems would not find otherwise\. .TP