diff --git a/Library/Homebrew/cmd/cat.rb b/Library/Homebrew/dev-cmd/cat.rb similarity index 100% rename from Library/Homebrew/cmd/cat.rb rename to Library/Homebrew/dev-cmd/cat.rb diff --git a/Library/Homebrew/cmd/command.rb b/Library/Homebrew/dev-cmd/command.rb similarity index 100% rename from Library/Homebrew/cmd/command.rb rename to Library/Homebrew/dev-cmd/command.rb diff --git a/Library/Homebrew/cmd/diy.rb b/Library/Homebrew/dev-cmd/diy.rb similarity index 100% rename from Library/Homebrew/cmd/diy.rb rename to Library/Homebrew/dev-cmd/diy.rb diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/dev-cmd/sh.rb similarity index 100% rename from Library/Homebrew/cmd/sh.rb rename to Library/Homebrew/dev-cmd/sh.rb diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/dev-cmd/style.rb similarity index 100% rename from Library/Homebrew/cmd/style.rb rename to Library/Homebrew/dev-cmd/style.rb diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/dev-cmd/unpack.rb similarity index 100% rename from Library/Homebrew/cmd/unpack.rb rename to Library/Homebrew/dev-cmd/unpack.rb diff --git a/Library/Homebrew/test/.rubocop_todo.yml b/Library/Homebrew/test/.rubocop_todo.yml index 7962795822..ccd1f0be95 100644 --- a/Library/Homebrew/test/.rubocop_todo.yml +++ b/Library/Homebrew/test/.rubocop_todo.yml @@ -78,9 +78,7 @@ RSpec/MultipleDescribes: - 'cmd/--repository_spec.rb' - 'cmd/--version_spec.rb' - 'cmd/analytics_spec.rb' - - 'cmd/cat_spec.rb' - 'cmd/cleanup_spec.rb' - - 'cmd/command_spec.rb' - 'cmd/commands_spec.rb' - 'cmd/config_spec.rb' - 'cmd/desc_spec.rb' @@ -101,14 +99,11 @@ RSpec/MultipleDescribes: - 'cmd/readall_spec.rb' - 'cmd/reinstall_spec.rb' - 'cmd/search_spec.rb' - - 'cmd/sh_spec.rb' - - 'cmd/style_spec.rb' - 'cmd/switch_spec.rb' - 'cmd/tap-info_spec.rb' - 'cmd/tap_spec.rb' - 'cmd/uninstall_spec.rb' - 'cmd/unlink_spec.rb' - - 'cmd/unpack_spec.rb' - 'cmd/unpin_spec.rb' - 'cmd/untap_spec.rb' - 'cmd/update-report_spec.rb' @@ -116,6 +111,8 @@ RSpec/MultipleDescribes: - 'cmd/uses_spec.rb' - 'dependency_spec.rb' - 'dev-cmd/bottle_spec.rb' + - 'dev-cmd/cat_spec.rb' + - 'dev-cmd/command_spec.rb' - 'dev-cmd/create_spec.rb' - 'dev-cmd/edit_spec.rb' - 'dev-cmd/extract_spec.rb' @@ -124,8 +121,11 @@ RSpec/MultipleDescribes: - 'dev-cmd/linkage_spec.rb' - 'dev-cmd/pull_spec.rb' - 'dev-cmd/ruby_spec.rb' + - 'dev-cmd/sh_spec.rb' + - 'dev-cmd/style_spec.rb' - 'dev-cmd/tap-new_spec.rb' - 'dev-cmd/test_spec.rb' + - 'dev-cmd/unpack_spec.rb' - 'download_strategies_spec.rb' - 'exceptions_spec.rb' - 'formula_support_spec.rb' diff --git a/Library/Homebrew/test/cmd/cat_spec.rb b/Library/Homebrew/test/dev-cmd/cat_spec.rb similarity index 100% rename from Library/Homebrew/test/cmd/cat_spec.rb rename to Library/Homebrew/test/dev-cmd/cat_spec.rb diff --git a/Library/Homebrew/test/cmd/command_spec.rb b/Library/Homebrew/test/dev-cmd/command_spec.rb similarity index 100% rename from Library/Homebrew/test/cmd/command_spec.rb rename to Library/Homebrew/test/dev-cmd/command_spec.rb diff --git a/Library/Homebrew/test/cmd/diy_spec.rb b/Library/Homebrew/test/dev-cmd/diy_spec.rb similarity index 100% rename from Library/Homebrew/test/cmd/diy_spec.rb rename to Library/Homebrew/test/dev-cmd/diy_spec.rb diff --git a/Library/Homebrew/test/cmd/sh_spec.rb b/Library/Homebrew/test/dev-cmd/sh_spec.rb similarity index 100% rename from Library/Homebrew/test/cmd/sh_spec.rb rename to Library/Homebrew/test/dev-cmd/sh_spec.rb diff --git a/Library/Homebrew/test/cmd/style_spec.rb b/Library/Homebrew/test/dev-cmd/style_spec.rb similarity index 99% rename from Library/Homebrew/test/cmd/style_spec.rb rename to Library/Homebrew/test/dev-cmd/style_spec.rb index 60d6bf4966..6926f49929 100644 --- a/Library/Homebrew/test/cmd/style_spec.rb +++ b/Library/Homebrew/test/dev-cmd/style_spec.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require "cmd/style" require "cmd/shared_examples/args_parse" describe "Homebrew.style_args" do diff --git a/Library/Homebrew/test/cmd/unpack_spec.rb b/Library/Homebrew/test/dev-cmd/unpack_spec.rb similarity index 100% rename from Library/Homebrew/test/cmd/unpack_spec.rb rename to Library/Homebrew/test/dev-cmd/unpack_spec.rb diff --git a/docs/Manpage.md b/docs/Manpage.md index 1a727a4111..5e78a13121 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -52,10 +52,6 @@ state. Read more at . If `regenerate-uuid` is passed, regenerate the UUID used in Homebrew's analytics. -### `cat` *`formula`* - -Display the source of *`formula`*. - ### `cleanup` [*`options`*] [*`formula`*|*`cask`*] Remove stale lock files and outdated downloads for all formulae and casks, and @@ -71,10 +67,6 @@ this for the given formulae and casks. * `--prune-prefix`: Only prune the symlinks and directories from the prefix and remove no other files. -### `command` *`cmd`* - -Display the path to the file being used when invoking `brew` *`cmd`*. - ### `commands` [*`options`*] Show lists of built-in and external commands. @@ -137,17 +129,6 @@ subsequent ones. * `-d`, `--description`: Search just descriptions for *`text`*. If *`text`* is flanked by slashes, it is interpreted as a regular expression. -### `diy` [*`options`*] - -Automatically determine the installation prefix for non-Homebrew software. Using -the output from this command, you can install your own software into the Cellar -and then link it into Homebrew's prefix with `brew link`. - -* `--name`: - Explicitly set the *`name`* of the package being installed. -* `--version`: - Explicitly set the *`version`* of the package being installed. - ### `doctor` [*`options`*] Check your system for potential problems. Will exit with a non-zero status if @@ -444,17 +425,6 @@ ones). No online search is performed. * `--ubuntu`: Search for *`text`* in the given package manager's list. -### `sh` [*`options`*] - -Start a Homebrew build environment shell. Uses our years-battle-hardened -Homebrew build logic to help your `./configure && make && make install` or even -your `gem install` succeed. Especially handy if you run Homebrew in an -Xcode-only configuration since it adds tools like `make` to your `PATH` which -build systems would not find otherwise. - -* `--env`: - Use the standard `PATH` instead of superenv's when `std` is passed. - ### `shellenv` Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`. @@ -462,23 +432,6 @@ Print export statements. When run in a shell, this installation of Homebrew will The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times. Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile` or `~/.zprofile`) with: `eval $(brew shellenv)` -### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*] - -Check formulae or files for conformance to Homebrew style guidelines. - -Lists of *`file`*, *`tap`* and *`formula`* may not be combined. If none are provided, -`style` will run style checks on the whole Homebrew library, including core code -and all formulae. - -* `--fix`: - Fix style violations automatically using RuboCop's auto-correct feature. -* `--display-cop-names`: - Include the RuboCop cop name for each violation in the output. -* `--only-cops`: - Specify a comma-separated *`cops`* list to check for violations of only the listed RuboCop cops. -* `--except-cops`: - Specify a comma-separated *`cops`* list to skip checking for violations of the listed RuboCop cops. - ### `switch` *`formula`* *`version`* Symlink all of the specified *`version`* of *`formula`*'s installation into @@ -540,18 +493,6 @@ brew link` *`formula`* * `-n`, `--dry-run`: List files which would be unlinked without actually unlinking or deleting any files. -### `unpack` [*`options`*] *`formula`* - -Unpack the source files for *`formula`* into subdirectories of the current working -directory. - -* `--destdir`: - Create subdirectories in the directory named by *`path`* instead. -* `--patch`: - Patches for *`formula`* will be applied to the unpacked source. -* `-g`, `--git`: - Initialise a Git repository in the unpacked source. This is useful for creating patches for the software. - ### `unpin` *`formula`* Unpin *`formula`*, allowing them to be upgraded by `brew upgrade` *`formula`*. See @@ -795,6 +736,14 @@ present, "revision 1" will be added. * `--message`: Append *`message`* to the default commit message. +### `cat` *`formula`* + +Display the source of *`formula`*. + +### `command` *`cmd`* + +Display the path to the file being used when invoking `brew` *`cmd`*. + ### `create` [*`options`*] *`URL`* Generate a formula for the downloadable file at *`URL`* and open it in the editor. @@ -830,6 +779,17 @@ a simple example. For the complete API, see: * `--tap`: Generate the new formula within the given tap, specified as *`user`*`/`*`repo`*. +### `diy` [*`options`*] + +Automatically determine the installation prefix for non-Homebrew software. Using +the output from this command, you can install your own software into the Cellar +and then link it into Homebrew's prefix with `brew link`. + +* `--name`: + Explicitly set the *`name`* of the package being installed. +* `--version`: + Explicitly set the *`version`* of the package being installed. + ### `edit` [*`formula`*] Open *`formula`* in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the @@ -984,6 +944,34 @@ Run a Ruby instance with Homebrew's libraries loaded, e.g. `brew ruby -e "puts * `-e`: Execute the given text string as a script. +### `sh` [*`options`*] + +Start a Homebrew build environment shell. Uses our years-battle-hardened +Homebrew build logic to help your `./configure && make && make install` or even +your `gem install` succeed. Especially handy if you run Homebrew in an +Xcode-only configuration since it adds tools like `make` to your `PATH` which +build systems would not find otherwise. + +* `--env`: + Use the standard `PATH` instead of superenv's when `std` is passed. + +### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*] + +Check formulae or files for conformance to Homebrew style guidelines. + +Lists of *`file`*, *`tap`* and *`formula`* may not be combined. If none are provided, +`style` will run style checks on the whole Homebrew library, including core code +and all formulae. + +* `--fix`: + Fix style violations automatically using RuboCop's auto-correct feature. +* `--display-cop-names`: + Include the RuboCop cop name for each violation in the output. +* `--only-cops`: + Specify a comma-separated *`cops`* list to check for violations of only the listed RuboCop cops. +* `--except-cops`: + Specify a comma-separated *`cops`* list to skip checking for violations of the listed RuboCop cops. + ### `tap-new` *`user`*`/`*`repo`* Generate the template files for a new tap. @@ -1020,6 +1008,18 @@ Run Homebrew's unit and integration tests. * `--seed`: Randomise tests with the specified *`value`* instead of a random seed. +### `unpack` [*`options`*] *`formula`* + +Unpack the source files for *`formula`* into subdirectories of the current working +directory. + +* `--destdir`: + Create subdirectories in the directory named by *`path`* instead. +* `--patch`: + Patches for *`formula`* will be applied to the unpacked source. +* `-g`, `--git`: + Initialise a Git repository in the unpacked source. This is useful for creating patches for the software. + ### `update-test` [*`options`*] Run a test of `brew update` with a new repository clone. If no options are diff --git a/manpages/brew.1 b/manpages/brew.1 index 86a5974eae..57d6bb11d7 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -47,9 +47,6 @@ If \fBstate\fR is passed, display the current anonymous user behaviour analytics .P If \fBregenerate\-uuid\fR is passed, regenerate the UUID used in Homebrew\'s analytics\. . -.SS "\fBcat\fR \fIformula\fR" -Display the source of \fIformula\fR\. -. .SS "\fBcleanup\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR]" Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae\. If arguments are specified, only do this for the given formulae and casks\. . @@ -69,9 +66,6 @@ Scrub the cache, including downloads for even the latest versions\. Note downloa \fB\-\-prune\-prefix\fR Only prune the symlinks and directories from the prefix and remove no other files\. . -.SS "\fBcommand\fR \fIcmd\fR" -Display the path to the file being used when invoking \fBbrew\fR \fIcmd\fR\. -. .SS "\fBcommands\fR [\fIoptions\fR]" Show lists of built\-in and external commands\. . @@ -160,17 +154,6 @@ Search just names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is in \fB\-d\fR, \fB\-\-description\fR Search just descriptions for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. . -.SS "\fBdiy\fR [\fIoptions\fR]" -Automatically determine the installation prefix for non\-Homebrew software\. Using the output from this command, you can install your own software into the Cellar and then link it into Homebrew\'s prefix with \fBbrew link\fR\. -. -.TP -\fB\-\-name\fR -Explicitly set the \fIname\fR of the package being installed\. -. -.TP -\fB\-\-version\fR -Explicitly set the \fIversion\fR of the package being installed\. -. .SS "\fBdoctor\fR [\fIoptions\fR]" Check your system for potential problems\. Will exit with a non\-zero status if any potential problems are found\. Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue\. If everything you use Homebrew for is working fine: please don\'t worry or file an issue; just ignore this\. . @@ -583,41 +566,12 @@ Search for \fItext\fR in the given package manager\'s list\. \fB\-\-ubuntu\fR Search for \fItext\fR in the given package manager\'s list\. . -.SS "\fBsh\fR [\fIoptions\fR]" -Start a Homebrew build environment shell\. Uses our years\-battle\-hardened Homebrew build logic to help your \fB\./configure && make && make install\fR or even your \fBgem install\fR succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fR to your \fBPATH\fR which build systems would not find otherwise\. -. -.TP -\fB\-\-env\fR -Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\. -. .SS "\fBshellenv\fR" Print export statements\. When run in a shell, this installation of Homebrew will be added to your \fBPATH\fR, \fBMANPATH\fR, and \fBINFOPATH\fR\. . .P The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITORY\fR are also exported to avoid querying them multiple times\. Consider adding evaluation of this command\'s output to your dotfiles (e\.g\. \fB~/\.profile\fR or \fB~/\.zprofile\fR) with: \fBeval $(brew shellenv)\fR . -.SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR]" -Check formulae or files for conformance to Homebrew style guidelines\. -. -.P -Lists of \fIfile\fR, \fItap\fR and \fIformula\fR may not be combined\. If none are provided, \fBstyle\fR will run style checks on the whole Homebrew library, including core code and all formulae\. -. -.TP -\fB\-\-fix\fR -Fix style violations automatically using RuboCop\'s auto\-correct feature\. -. -.TP -\fB\-\-display\-cop\-names\fR -Include the RuboCop cop name for each violation in the output\. -. -.TP -\fB\-\-only\-cops\fR -Specify a comma\-separated \fIcops\fR list to check for violations of only the listed RuboCop cops\. -. -.TP -\fB\-\-except\-cops\fR -Specify a comma\-separated \fIcops\fR list to skip checking for violations of the listed RuboCop cops\. -. .SS "\fBswitch\fR \fIformula\fR \fIversion\fR" Symlink all of the specified \fIversion\fR of \fIformula\fR\'s installation into Homebrew\'s prefix\. . @@ -685,21 +639,6 @@ Remove symlinks for \fIformula\fR from Homebrew\'s prefix\. This can be useful f \fB\-n\fR, \fB\-\-dry\-run\fR List files which would be unlinked without actually unlinking or deleting any files\. . -.SS "\fBunpack\fR [\fIoptions\fR] \fIformula\fR" -Unpack the source files for \fIformula\fR into subdirectories of the current working directory\. -. -.TP -\fB\-\-destdir\fR -Create subdirectories in the directory named by \fIpath\fR instead\. -. -.TP -\fB\-\-patch\fR -Patches for \fIformula\fR will be applied to the unpacked source\. -. -.TP -\fB\-g\fR, \fB\-\-git\fR -Initialise a Git repository in the unpacked source\. This is useful for creating patches for the software\. -. .SS "\fBunpin\fR \fIformula\fR" Unpin \fIformula\fR, allowing them to be upgraded by \fBbrew upgrade\fR \fIformula\fR\. See also \fBpin\fR\. . @@ -1020,6 +959,12 @@ Print what would be done rather than doing it\. \fB\-\-message\fR Append \fImessage\fR to the default commit message\. . +.SS "\fBcat\fR \fIformula\fR" +Display the source of \fIformula\fR\. +. +.SS "\fBcommand\fR \fIcmd\fR" +Display the path to the file being used when invoking \fBbrew\fR \fIcmd\fR\. +. .SS "\fBcreate\fR [\fIoptions\fR] \fIURL\fR" Generate a formula for the downloadable file at \fIURL\fR and open it in the editor\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The \fBwget\fR formula serves as a simple example\. For the complete API, see: \fIhttp://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\fR . @@ -1075,6 +1020,17 @@ Explicitly set the \fIversion\fR of the new formula\. \fB\-\-tap\fR Generate the new formula within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. . +.SS "\fBdiy\fR [\fIoptions\fR]" +Automatically determine the installation prefix for non\-Homebrew software\. Using the output from this command, you can install your own software into the Cellar and then link it into Homebrew\'s prefix with \fBbrew link\fR\. +. +.TP +\fB\-\-name\fR +Explicitly set the \fIname\fR of the package being installed\. +. +.TP +\fB\-\-version\fR +Explicitly set the \fIversion\fR of the package being installed\. +. .SS "\fBedit\fR [\fIformula\fR]" Open \fIformula\fR in the editor set by \fBEDITOR\fR or \fBHOMEBREW_EDITOR\fR, or open the Homebrew repository for editing if no formula is provided\. . @@ -1264,6 +1220,35 @@ Load a library using \fBrequire\fR\. \fB\-e\fR Execute the given text string as a script\. . +.SS "\fBsh\fR [\fIoptions\fR]" +Start a Homebrew build environment shell\. Uses our years\-battle\-hardened Homebrew build logic to help your \fB\./configure && make && make install\fR or even your \fBgem install\fR succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fR to your \fBPATH\fR which build systems would not find otherwise\. +. +.TP +\fB\-\-env\fR +Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\. +. +.SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR]" +Check formulae or files for conformance to Homebrew style guidelines\. +. +.P +Lists of \fIfile\fR, \fItap\fR and \fIformula\fR may not be combined\. If none are provided, \fBstyle\fR will run style checks on the whole Homebrew library, including core code and all formulae\. +. +.TP +\fB\-\-fix\fR +Fix style violations automatically using RuboCop\'s auto\-correct feature\. +. +.TP +\fB\-\-display\-cop\-names\fR +Include the RuboCop cop name for each violation in the output\. +. +.TP +\fB\-\-only\-cops\fR +Specify a comma\-separated \fIcops\fR list to check for violations of only the listed RuboCop cops\. +. +.TP +\fB\-\-except\-cops\fR +Specify a comma\-separated \fIcops\fR list to skip checking for violations of the listed RuboCop cops\. +. .SS "\fBtap\-new\fR \fIuser\fR\fB/\fR\fIrepo\fR" Generate the template files for a new tap\. . @@ -1312,6 +1297,21 @@ Run only \fItest_script\fR\fB_spec\.rb\fR\. Appending \fB:\fR\fIline_number\fR w \fB\-\-seed\fR Randomise tests with the specified \fIvalue\fR instead of a random seed\. . +.SS "\fBunpack\fR [\fIoptions\fR] \fIformula\fR" +Unpack the source files for \fIformula\fR into subdirectories of the current working directory\. +. +.TP +\fB\-\-destdir\fR +Create subdirectories in the directory named by \fIpath\fR instead\. +. +.TP +\fB\-\-patch\fR +Patches for \fIformula\fR will be applied to the unpacked source\. +. +.TP +\fB\-g\fR, \fB\-\-git\fR +Initialise a Git repository in the unpacked source\. This is useful for creating patches for the software\. +. .SS "\fBupdate\-test\fR [\fIoptions\fR]" Run a test of \fBbrew update\fR with a new repository clone\. If no options are passed, use \fBorigin/master\fR as the start commit\. .