mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
reorder command flags
This commit is contained in:
parent
a427de5bee
commit
2ae4f11963
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -22,8 +22,8 @@ module Homebrew
|
||||
EOS
|
||||
switch "-n", "--dry-run",
|
||||
description: "Do everything except caching state and opening pull requests."
|
||||
flag "--limit=",
|
||||
description: "Maximum runtime in minutes."
|
||||
flag "--limit=",
|
||||
description: "Maximum runtime in minutes."
|
||||
flag "--state-file=",
|
||||
description: "File for caching state."
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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"
|
||||
|
@ -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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user