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."
|
description: "Only show cache files for formulae."
|
||||||
switch "--cask",
|
switch "--cask",
|
||||||
description: "Only show cache files for casks."
|
description: "Only show cache files for casks."
|
||||||
|
|
||||||
conflicts "--build-from-source", "--force-bottle"
|
conflicts "--build-from-source", "--force-bottle"
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ module Homebrew
|
|||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
depends_on: "--installed",
|
depends_on: "--installed",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
|
|
||||||
conflicts "--installed", "--all"
|
conflicts "--installed", "--all"
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
formula_options
|
formula_options
|
||||||
|
@ -42,12 +42,10 @@ module Homebrew
|
|||||||
switch "--[no-]quarantine",
|
switch "--[no-]quarantine",
|
||||||
description: "Disable/enable quarantining of downloads (default: enabled).",
|
description: "Disable/enable quarantining of downloads (default: enabled).",
|
||||||
env: :cask_opts_quarantine
|
env: :cask_opts_quarantine
|
||||||
|
|
||||||
switch "--formula", "--formulae",
|
switch "--formula", "--formulae",
|
||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
conflicts "--formula", "--cask"
|
|
||||||
|
|
||||||
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
|
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
|
||||||
conflicts "--cask", "--HEAD"
|
conflicts "--cask", "--HEAD"
|
||||||
@ -55,6 +53,7 @@ module Homebrew
|
|||||||
conflicts "--cask", "-s"
|
conflicts "--cask", "-s"
|
||||||
conflicts "--cask", "--build-bottle"
|
conflicts "--cask", "--build-bottle"
|
||||||
conflicts "--cask", "--force-bottle"
|
conflicts "--cask", "--force-bottle"
|
||||||
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask], min: 1
|
named_args [:formula, :cask], min: 1
|
||||||
end
|
end
|
||||||
|
@ -20,6 +20,7 @@ module Homebrew
|
|||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
|
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
|
@ -58,14 +58,13 @@ module Homebrew
|
|||||||
description: "Print JSON of all available formulae."
|
description: "Print JSON of all available formulae."
|
||||||
switch "-v", "--verbose",
|
switch "-v", "--verbose",
|
||||||
description: "Show more verbose analytics data for <formula>."
|
description: "Show more verbose analytics data for <formula>."
|
||||||
|
|
||||||
switch "--formula", "--formulae",
|
switch "--formula", "--formulae",
|
||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
conflicts "--formula", "--cask"
|
|
||||||
|
|
||||||
conflicts "--installed", "--all"
|
conflicts "--installed", "--all"
|
||||||
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
end
|
end
|
||||||
|
@ -51,18 +51,18 @@ module Homebrew
|
|||||||
description: "Search for GitHub pull requests containing <text>."
|
description: "Search for GitHub pull requests containing <text>."
|
||||||
switch "--open",
|
switch "--open",
|
||||||
depends_on: "--pull-request",
|
depends_on: "--pull-request",
|
||||||
description: "Search for only open GitHub pull requests"
|
description: "Search for only open GitHub pull requests."
|
||||||
switch "--closed",
|
switch "--closed",
|
||||||
depends_on: "--pull-request",
|
depends_on: "--pull-request",
|
||||||
description: "Search for only closed GitHub pull requests"
|
description: "Search for only closed GitHub pull requests."
|
||||||
conflicts "--open", "--closed"
|
|
||||||
package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" }
|
package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" }
|
||||||
package_manager_switches.each do |s|
|
package_manager_switches.each do |s|
|
||||||
switch s,
|
switch s,
|
||||||
description: "Search for <text> in the given package manager's list."
|
description: "Search for <text> in the given package manager's list."
|
||||||
end
|
end
|
||||||
|
|
||||||
conflicts("--desc", "--pull-request")
|
conflicts "--desc", "--pull-request"
|
||||||
|
conflicts "--open", "--closed"
|
||||||
conflicts(*package_manager_switches)
|
conflicts(*package_manager_switches)
|
||||||
|
|
||||||
# TODO: (2.9) add `min: 1` when the `odeprecated`/`odisabled` for `brew search` with no arguments is removed
|
# 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",
|
switch "--zap",
|
||||||
description: "Remove all files associated with a <cask>. " \
|
description: "Remove all files associated with a <cask>. " \
|
||||||
"*May remove files which are shared between applications.*"
|
"*May remove files which are shared between applications.*"
|
||||||
conflicts "--formula", "--zap"
|
|
||||||
switch "--ignore-dependencies",
|
switch "--ignore-dependencies",
|
||||||
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
|
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
|
||||||
"formulae."
|
"formulae."
|
||||||
|
|
||||||
switch "--formula", "--formulae",
|
switch "--formula", "--formulae",
|
||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
|
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
conflicts "--formula", "--zap"
|
||||||
|
|
||||||
named_args [:installed_formula, :installed_cask], min: 1
|
named_args [:installed_formula, :installed_cask], min: 1
|
||||||
end
|
end
|
||||||
|
@ -43,6 +43,10 @@ module Homebrew
|
|||||||
description: "Run various additional style checks to determine if a new formula or cask is eligible "\
|
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 "\
|
"for Homebrew. This should be used when creating new formula and implies "\
|
||||||
"`--strict` and `--online`."
|
"`--strict` and `--online`."
|
||||||
|
switch "--[no-]appcast",
|
||||||
|
description: "Audit the appcast."
|
||||||
|
switch "--token-conflicts",
|
||||||
|
description: "Audit for token conflicts."
|
||||||
flag "--tap=",
|
flag "--tap=",
|
||||||
description: "Check the formulae within the given tap, specified as <user>`/`<repo>."
|
description: "Check the formulae within the given tap, specified as <user>`/`<repo>."
|
||||||
switch "--fix",
|
switch "--fix",
|
||||||
@ -69,25 +73,18 @@ module Homebrew
|
|||||||
comma_array "--except-cops",
|
comma_array "--except-cops",
|
||||||
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed "\
|
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed "\
|
||||||
"RuboCop cops."
|
"RuboCop cops."
|
||||||
|
|
||||||
switch "--formula", "--formulae",
|
switch "--formula", "--formulae",
|
||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as 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", "--except"
|
||||||
conflicts "--only-cops", "--except-cops", "--strict"
|
conflicts "--only-cops", "--except-cops", "--strict"
|
||||||
conflicts "--only-cops", "--except-cops", "--only"
|
conflicts "--only-cops", "--except-cops", "--only"
|
||||||
conflicts "--display-cop-names", "--skip-style"
|
conflicts "--display-cop-names", "--skip-style"
|
||||||
conflicts "--display-cop-names", "--only-cops"
|
conflicts "--display-cop-names", "--only-cops"
|
||||||
conflicts "--display-cop-names", "--except-cops"
|
conflicts "--display-cop-names", "--except-cops"
|
||||||
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
end
|
end
|
||||||
|
@ -22,8 +22,8 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
switch "-n", "--dry-run",
|
switch "-n", "--dry-run",
|
||||||
description: "Do everything except caching state and opening pull requests."
|
description: "Do everything except caching state and opening pull requests."
|
||||||
flag "--limit=",
|
flag "--limit=",
|
||||||
description: "Maximum runtime in minutes."
|
description: "Maximum runtime in minutes."
|
||||||
flag "--state-file=",
|
flag "--state-file=",
|
||||||
description: "File for caching state."
|
description: "File for caching state."
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ module Homebrew
|
|||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
|
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask], number: 1
|
named_args [:formula, :cask], number: 1
|
||||||
|
@ -21,6 +21,7 @@ module Homebrew
|
|||||||
description: "Treat all named arguments as formulae."
|
description: "Treat all named arguments as formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Treat all named arguments as casks."
|
description: "Treat all named arguments as casks."
|
||||||
|
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
|
@ -44,6 +44,7 @@ module Homebrew
|
|||||||
description: "Only check formulae."
|
description: "Only check formulae."
|
||||||
switch "--cask", "--casks",
|
switch "--cask", "--casks",
|
||||||
description: "Only check casks."
|
description: "Only check casks."
|
||||||
|
|
||||||
conflicts "--debug", "--json"
|
conflicts "--debug", "--json"
|
||||||
conflicts "--tap=", "--all", "--installed"
|
conflicts "--tap=", "--all", "--installed"
|
||||||
conflicts "--cask", "--formula"
|
conflicts "--cask", "--formula"
|
||||||
|
@ -23,8 +23,8 @@ module Homebrew
|
|||||||
switch "--update",
|
switch "--update",
|
||||||
description: "Update RBI files."
|
description: "Update RBI files."
|
||||||
switch "--suggest-typed",
|
switch "--suggest-typed",
|
||||||
description: "Try upgrading `typed` sigils.",
|
depends_on: "--update",
|
||||||
depends_on: "--update"
|
description: "Try upgrading `typed` sigils."
|
||||||
switch "--fail-if-not-changed",
|
switch "--fail-if-not-changed",
|
||||||
description: "Return a failing status code if all gems are up to date " \
|
description: "Return a failing status code if all gems are up to date " \
|
||||||
"and gem definitions do not need a tapioca update."
|
"and gem definitions do not need a tapioca update."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user