reorder command flags

This commit is contained in:
EricFromCanada 2020-11-27 11:41:08 -05:00
parent a427de5bee
commit 2ae4f11963
13 changed files with 23 additions and 22 deletions

View File

@ -28,6 +28,7 @@ module Homebrew
description: "Only show cache files for formulae."
switch "--cask",
description: "Only show cache files for casks."
conflicts "--build-from-source", "--force-bottle"
conflicts "--formula", "--cask"

View File

@ -61,6 +61,7 @@ module Homebrew
switch "--cask", "--casks",
depends_on: "--installed",
description: "Treat all named arguments as casks."
conflicts "--installed", "--all"
conflicts "--formula", "--cask"
formula_options

View File

@ -42,12 +42,10 @@ module Homebrew
switch "--[no-]quarantine",
description: "Disable/enable quarantining of downloads (default: enabled).",
env: :cask_opts_quarantine
switch "--formula", "--formulae",
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
conflicts "--cask", "--HEAD"
@ -55,6 +53,7 @@ module Homebrew
conflicts "--cask", "-s"
conflicts "--cask", "--build-bottle"
conflicts "--cask", "--force-bottle"
conflicts "--formula", "--cask"
named_args [:formula, :cask], min: 1
end

View File

@ -20,6 +20,7 @@ module Homebrew
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
named_args [:formula, :cask]

View File

@ -58,14 +58,13 @@ module Homebrew
description: "Print JSON of all available formulae."
switch "-v", "--verbose",
description: "Show more verbose analytics data for <formula>."
switch "--formula", "--formulae",
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
conflicts "--installed", "--all"
conflicts "--formula", "--cask"
named_args [:formula, :cask]
end

View File

@ -51,18 +51,18 @@ module Homebrew
description: "Search for GitHub pull requests containing <text>."
switch "--open",
depends_on: "--pull-request",
description: "Search for only open GitHub pull requests"
description: "Search for only open GitHub pull requests."
switch "--closed",
depends_on: "--pull-request",
description: "Search for only closed GitHub pull requests"
conflicts "--open", "--closed"
description: "Search for only closed GitHub pull requests."
package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" }
package_manager_switches.each do |s|
switch s,
description: "Search for <text> in the given package manager's list."
end
conflicts("--desc", "--pull-request")
conflicts "--desc", "--pull-request"
conflicts "--open", "--closed"
conflicts(*package_manager_switches)
# TODO: (2.9) add `min: 1` when the `odeprecated`/`odisabled` for `brew search` with no arguments is removed

View File

@ -27,16 +27,16 @@ module Homebrew
switch "--zap",
description: "Remove all files associated with a <cask>. " \
"*May remove files which are shared between applications.*"
conflicts "--formula", "--zap"
switch "--ignore-dependencies",
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
"formulae."
switch "--formula", "--formulae",
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
conflicts "--formula", "--zap"
named_args [:installed_formula, :installed_cask], min: 1
end

View File

@ -43,6 +43,10 @@ module Homebrew
description: "Run various additional style checks to determine if a new formula or cask is eligible "\
"for Homebrew. This should be used when creating new formula and implies "\
"`--strict` and `--online`."
switch "--[no-]appcast",
description: "Audit the appcast."
switch "--token-conflicts",
description: "Audit for token conflicts."
flag "--tap=",
description: "Check the formulae within the given tap, specified as <user>`/`<repo>."
switch "--fix",
@ -69,25 +73,18 @@ module Homebrew
comma_array "--except-cops",
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed "\
"RuboCop cops."
switch "--formula", "--formulae",
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
switch "--[no-]appcast",
description: "Audit the appcast"
switch "--token-conflicts",
description: "Audit for token conflicts"
conflicts "--formula", "--cask"
conflicts "--only", "--except"
conflicts "--only-cops", "--except-cops", "--strict"
conflicts "--only-cops", "--except-cops", "--only"
conflicts "--display-cop-names", "--skip-style"
conflicts "--display-cop-names", "--only-cops"
conflicts "--display-cop-names", "--except-cops"
conflicts "--formula", "--cask"
named_args [:formula, :cask]
end

View File

@ -19,6 +19,7 @@ module Homebrew
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
named_args [:formula, :cask], number: 1

View File

@ -21,6 +21,7 @@ module Homebrew
description: "Treat all named arguments as formulae."
switch "--cask", "--casks",
description: "Treat all named arguments as casks."
conflicts "--formula", "--cask"
named_args [:formula, :cask]

View File

@ -44,6 +44,7 @@ module Homebrew
description: "Only check formulae."
switch "--cask", "--casks",
description: "Only check casks."
conflicts "--debug", "--json"
conflicts "--tap=", "--all", "--installed"
conflicts "--cask", "--formula"

View File

@ -23,8 +23,8 @@ module Homebrew
switch "--update",
description: "Update RBI files."
switch "--suggest-typed",
description: "Try upgrading `typed` sigils.",
depends_on: "--update"
depends_on: "--update",
description: "Try upgrading `typed` sigils."
switch "--fail-if-not-changed",
description: "Return a failing status code if all gems are up to date " \
"and gem definitions do not need a tapioca update."