diff --git a/completers/brew_completer/cmd/abv.go b/completers/brew_completer/cmd/abv.go new file mode 100644 index 0000000000..103294a783 --- /dev/null +++ b/completers/brew_completer/cmd/abv.go @@ -0,0 +1,32 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var abvCmd = &cobra.Command{ + Use: "abv", + Short: "Display brief statistics for your Homebrew installation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(abvCmd).Standalone() + + abvCmd.Flags().Bool("analytics", false, "List global Homebrew analytics data or, if specified, installation and build error data for (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set).") + abvCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + abvCmd.Flags().Bool("category", false, "Which type of analytics data to retrieve. The value for must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if is not. The default is `install`.") + abvCmd.Flags().Bool("days", false, "How many days of analytics data to retrieve. The value for must be `30`, `90` or `365`. The default is `30`.") + abvCmd.Flags().Bool("debug", false, "Display any debugging information.") + abvCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `HOMEBREW_EVAL_ALL` is set.") + abvCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + abvCmd.Flags().Bool("github", false, "Open the GitHub source page for and in a browser. To view the history locally: `brew log -p` or ") + abvCmd.Flags().Bool("help", false, "Show this message.") + abvCmd.Flags().Bool("installed", false, "Print JSON of formulae that are currently installed.") + abvCmd.Flags().Bool("json", false, "Print a JSON representation. Currently the default value for is `v1` for . For and use `v2`. See the docs for examples of using the JSON output: ") + abvCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + abvCmd.Flags().Bool("variations", false, "Include the variations hash in each formula's JSON output.") + abvCmd.Flags().Bool("verbose", false, "Show more verbose analytics data for .") + rootCmd.AddCommand(abvCmd) +} diff --git a/completers/brew_completer/cmd/analytics.go b/completers/brew_completer/cmd/analytics.go index c7552129b6..5d683e1afd 100644 --- a/completers/brew_completer/cmd/analytics.go +++ b/completers/brew_completer/cmd/analytics.go @@ -2,26 +2,22 @@ package cmd import ( "github.com/rsteube/carapace" - "github.com/rsteube/carapace/pkg/style" "github.com/spf13/cobra" ) var analyticsCmd = &cobra.Command{ - Use: "analytics", - Short: "Control Homebrew's anonymous aggregate user behaviour analytics", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "analytics", + Short: "Control Homebrew's anonymous aggregate user behaviour analytics", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(analyticsCmd).Standalone() - analyticsCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - analyticsCmd.Flags().BoolP("help", "h", false, "Show this message.") - analyticsCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - analyticsCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + analyticsCmd.Flags().Bool("debug", false, "Display any debugging information.") + analyticsCmd.Flags().Bool("help", false, "Show this message.") + analyticsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + analyticsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(analyticsCmd) - - carapace.Gen(analyticsCmd).PositionalCompletion( - carapace.ActionValues("on", "off").StyleF(style.ForKeyword), - ) } diff --git a/completers/brew_completer/cmd/audit.go b/completers/brew_completer/cmd/audit.go new file mode 100644 index 0000000000..4563990868 --- /dev/null +++ b/completers/brew_completer/cmd/audit.go @@ -0,0 +1,44 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var auditCmd = &cobra.Command{ + Use: "audit", + Short: "Check for Homebrew coding style violations", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(auditCmd).Standalone() + + auditCmd.Flags().Bool("arch", false, "Audit the given CPU architecture. (Pass `all` to audit all architectures.)") + auditCmd.Flags().Bool("audit-debug", false, "Enable debugging and profiling of audit methods.") + auditCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + auditCmd.Flags().Bool("debug", false, "Display any debugging information.") + auditCmd.Flags().Bool("display-filename", false, "Prefix every line of output with the file or formula name being audited, to make output easy to grep.") + auditCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to audit them. Implied if `HOMEBREW_EVAL_ALL` is set.") + auditCmd.Flags().Bool("except", false, "Specify a comma-separated list to skip running the methods named `audit_`.") + auditCmd.Flags().Bool("except-cops", false, "Specify a comma-separated list to skip checking for violations of the listed RuboCop cops.") + auditCmd.Flags().Bool("fix", false, "Fix style violations automatically using RuboCop's auto-correct feature.") + auditCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + auditCmd.Flags().Bool("git", false, "Run additional, slower style checks that navigate the Git repository.") + auditCmd.Flags().Bool("help", false, "Show this message.") + auditCmd.Flags().Bool("installed", false, "Only check formulae and casks that are currently installed.") + auditCmd.Flags().Bool("new", false, "Run various additional style checks to determine if a new formula or cask is eligible for Homebrew. This should be used when creating new formulae or casks and implies `--strict` and `--online`.") + auditCmd.Flags().Bool("no-signing", false, "Audit for signed apps, which are required on ARM") + auditCmd.Flags().Bool("online", false, "Run additional, slower style checks that require a network connection.") + auditCmd.Flags().Bool("only", false, "Specify a comma-separated list to only run the methods named `audit_`.") + auditCmd.Flags().Bool("only-cops", false, "Specify a comma-separated list to check for violations of only the listed RuboCop cops.") + auditCmd.Flags().Bool("os", false, "Audit the given operating system. (Pass `all` to audit all operating systems.)") + auditCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + auditCmd.Flags().Bool("signing", false, "Audit for signed apps, which are required on ARM") + auditCmd.Flags().Bool("skip-style", false, "Skip running non-RuboCop style checks. Useful if you plan on running `brew style` separately. Enabled by default unless a formula is specified by name.") + auditCmd.Flags().Bool("strict", false, "Run additional, stricter style checks.") + auditCmd.Flags().Bool("tap", false, "Check the formulae within the given tap, specified as `/`.") + auditCmd.Flags().Bool("token-conflicts", false, "Audit for token conflicts.") + auditCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(auditCmd) +} diff --git a/completers/brew_completer/cmd/autoremove.go b/completers/brew_completer/cmd/autoremove.go index 20024c19ae..d1bc6818bf 100644 --- a/completers/brew_completer/cmd/autoremove.go +++ b/completers/brew_completer/cmd/autoremove.go @@ -6,18 +6,19 @@ import ( ) var autoremoveCmd = &cobra.Command{ - Use: "autoremove", - Short: "Uninstall formulae that are no longer needed", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "autoremove", + Short: "Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(autoremoveCmd).Standalone() - autoremoveCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - autoremoveCmd.Flags().BoolP("dry-run", "n", false, "List what would be uninstalled, but do not") - autoremoveCmd.Flags().BoolP("help", "h", false, "Show this message.") - autoremoveCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - autoremoveCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + autoremoveCmd.Flags().Bool("debug", false, "Display any debugging information.") + autoremoveCmd.Flags().Bool("dry-run", false, "List what would be uninstalled, but do not actually uninstall anything.") + autoremoveCmd.Flags().Bool("help", false, "Show this message.") + autoremoveCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + autoremoveCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(autoremoveCmd) } diff --git a/completers/brew_completer/cmd/bottle.go b/completers/brew_completer/cmd/bottle.go new file mode 100644 index 0000000000..7f11cedff5 --- /dev/null +++ b/completers/brew_completer/cmd/bottle.go @@ -0,0 +1,35 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bottleCmd = &cobra.Command{ + Use: "bottle", + Short: "Generate a bottle (binary package) from a formula that was installed with `--build-bottle`", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bottleCmd).Standalone() + + bottleCmd.Flags().Bool("committer", false, "Specify a committer name and email in `git`'s standard author format.") + bottleCmd.Flags().Bool("debug", false, "Display any debugging information.") + bottleCmd.Flags().Bool("force-core-tap", false, "Build a bottle even if is not in `homebrew/core` or any installed taps.") + bottleCmd.Flags().Bool("help", false, "Show this message.") + bottleCmd.Flags().Bool("json", false, "Write bottle information to a JSON file, which can be used as the value for `--merge`.") + bottleCmd.Flags().Bool("keep-old", false, "If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.") + bottleCmd.Flags().Bool("merge", false, "Generate an updated bottle block for a formula and optionally merge it into the formula file. Instead of a formula name, requires the path to a JSON file generated with `brew bottle --json` .") + bottleCmd.Flags().Bool("no-all-checks", false, "Don't try to create an `all` bottle or stop a no-change upload.") + bottleCmd.Flags().Bool("no-commit", false, "When passed with `--write`, a new commit will not generated after writing changes to the formula file.") + bottleCmd.Flags().Bool("no-rebuild", false, "If the formula specifies a rebuild version, remove it from the generated DSL.") + bottleCmd.Flags().Bool("only-json-tab", false, "When passed with `--json`, the tab will be written to the JSON file but not the bottle.") + bottleCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bottleCmd.Flags().Bool("root-url", false, "Use the specified as the root of the bottle's URL instead of Homebrew's default.") + bottleCmd.Flags().Bool("root-url-using", false, "Use the specified download strategy class for downloading the bottle's URL instead of Homebrew's default.") + bottleCmd.Flags().Bool("skip-relocation", false, "Do not check if the bottle can be marked as relocatable.") + bottleCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + bottleCmd.Flags().Bool("write", false, "Write changes to the formula file. A new commit will be generated unless `--no-commit` is passed.") + rootCmd.AddCommand(bottleCmd) +} diff --git a/completers/brew_completer/cmd/bump.go b/completers/brew_completer/cmd/bump.go new file mode 100644 index 0000000000..1d42707865 --- /dev/null +++ b/completers/brew_completer/cmd/bump.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bumpCmd = &cobra.Command{ + Use: "bump", + Short: "Display out-of-date brew formulae and the latest version available", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bumpCmd).Standalone() + + bumpCmd.Flags().Bool("cask", false, "Check only casks.") + bumpCmd.Flags().Bool("debug", false, "Display any debugging information.") + bumpCmd.Flags().Bool("formula", false, "Check only formulae.") + bumpCmd.Flags().Bool("full-name", false, "Print formulae/casks with fully-qualified names.") + bumpCmd.Flags().Bool("help", false, "Show this message.") + bumpCmd.Flags().Bool("installed", false, "Check formulae and casks that are currently installed.") + bumpCmd.Flags().Bool("limit", false, "Limit number of package results returned.") + bumpCmd.Flags().Bool("no-pull-requests", false, "Do not retrieve pull requests from GitHub.") + bumpCmd.Flags().Bool("open-pr", false, "Open a pull request for the new version if none have been opened yet.") + bumpCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bumpCmd.Flags().Bool("start-with", false, "Letter or word that the list of package results should alphabetically follow.") + bumpCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(bumpCmd) +} diff --git a/completers/brew_completer/cmd/bumpCaskPr.go b/completers/brew_completer/cmd/bumpCaskPr.go new file mode 100644 index 0000000000..f933489f2d --- /dev/null +++ b/completers/brew_completer/cmd/bumpCaskPr.go @@ -0,0 +1,37 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bumpCaskPrCmd = &cobra.Command{ + Use: "bump-cask-pr", + Short: "Create a pull request to update with a new version", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bumpCaskPrCmd).Standalone() + + bumpCaskPrCmd.Flags().Bool("commit", false, "When passed with `--write-only`, generate a new commit after writing changes to the cask file.") + bumpCaskPrCmd.Flags().Bool("debug", false, "Display any debugging information.") + bumpCaskPrCmd.Flags().Bool("dry-run", false, "Print what would be done rather than doing it.") + bumpCaskPrCmd.Flags().Bool("force", false, "Ignore duplicate open PRs.") + bumpCaskPrCmd.Flags().Bool("fork-org", false, "Use the specified GitHub organization for forking.") + bumpCaskPrCmd.Flags().Bool("help", false, "Show this message.") + bumpCaskPrCmd.Flags().Bool("message", false, "Prepend to the default pull request message.") + bumpCaskPrCmd.Flags().Bool("no-audit", false, "Don't run `brew audit` before opening the PR.") + bumpCaskPrCmd.Flags().Bool("no-browse", false, "Print the pull request URL instead of opening in a browser.") + bumpCaskPrCmd.Flags().Bool("no-fork", false, "Don't try to fork the repository.") + bumpCaskPrCmd.Flags().Bool("no-style", false, "Don't run `brew style --fix` before opening the PR.") + bumpCaskPrCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bumpCaskPrCmd.Flags().Bool("sha256", false, "Specify the checksum of the new download.") + bumpCaskPrCmd.Flags().Bool("url", false, "Specify the for the new download.") + bumpCaskPrCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + bumpCaskPrCmd.Flags().Bool("version", false, "Specify the new for the cask.") + bumpCaskPrCmd.Flags().Bool("version-arm", false, "Specify the new cask for the ARM architecture.") + bumpCaskPrCmd.Flags().Bool("version-intel", false, "Specify the new cask for the Intel architecture.") + bumpCaskPrCmd.Flags().Bool("write-only", false, "Make the expected file modifications without taking any Git actions.") + rootCmd.AddCommand(bumpCaskPrCmd) +} diff --git a/completers/brew_completer/cmd/bumpFormulaPr.go b/completers/brew_completer/cmd/bumpFormulaPr.go new file mode 100644 index 0000000000..f0257071bb --- /dev/null +++ b/completers/brew_completer/cmd/bumpFormulaPr.go @@ -0,0 +1,42 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bumpFormulaPrCmd = &cobra.Command{ + Use: "bump-formula-pr", + Short: "Create a pull request to update with a new URL or a new tag", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bumpFormulaPrCmd).Standalone() + + bumpFormulaPrCmd.Flags().Bool("commit", false, "When passed with `--write-only`, generate a new commit after writing changes to the formula file.") + bumpFormulaPrCmd.Flags().Bool("debug", false, "Display any debugging information.") + bumpFormulaPrCmd.Flags().Bool("dry-run", false, "Print what would be done rather than doing it.") + bumpFormulaPrCmd.Flags().Bool("force", false, "Ignore duplicate open PRs. Remove all mirrors if `--mirror` was not specified.") + bumpFormulaPrCmd.Flags().Bool("fork-org", false, "Use the specified GitHub organization for forking.") + bumpFormulaPrCmd.Flags().Bool("help", false, "Show this message.") + bumpFormulaPrCmd.Flags().Bool("message", false, "Prepend to the default pull request message.") + bumpFormulaPrCmd.Flags().Bool("mirror", false, "Use the specified as a mirror URL. If is a comma-separated list of URLs, multiple mirrors will be added.") + bumpFormulaPrCmd.Flags().Bool("no-audit", false, "Don't run `brew audit` before opening the PR.") + bumpFormulaPrCmd.Flags().Bool("no-browse", false, "Print the pull request URL instead of opening in a browser.") + bumpFormulaPrCmd.Flags().Bool("no-fork", false, "Don't try to fork the repository.") + bumpFormulaPrCmd.Flags().Bool("online", false, "Run `brew audit --online` before opening the PR.") + bumpFormulaPrCmd.Flags().Bool("python-exclude-packages", false, "Exclude these Python packages when finding resources.") + bumpFormulaPrCmd.Flags().Bool("python-extra-packages", false, "Include these additional Python packages when finding resources.") + bumpFormulaPrCmd.Flags().Bool("python-package-name", false, "Use the specified when finding Python resources for . If no package name is specified, it will be inferred from the formula's stable URL.") + bumpFormulaPrCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bumpFormulaPrCmd.Flags().Bool("revision", false, "Specify the new commit corresponding to the specified git or specified .") + bumpFormulaPrCmd.Flags().Bool("sha256", false, "Specify the checksum of the new download.") + bumpFormulaPrCmd.Flags().Bool("strict", false, "Run `brew audit --strict` before opening the PR.") + bumpFormulaPrCmd.Flags().Bool("tag", false, "Specify the new git commit for the formula.") + bumpFormulaPrCmd.Flags().Bool("url", false, "Specify the for the new download. If a is specified, the checksum of the new download should also be specified.") + bumpFormulaPrCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + bumpFormulaPrCmd.Flags().Bool("version", false, "Use the specified to override the value parsed from the URL or tag. Note that `--version=0` can be used to delete an existing version override from a formula if it has become redundant.") + bumpFormulaPrCmd.Flags().Bool("write-only", false, "Make the expected file modifications without taking any Git actions.") + rootCmd.AddCommand(bumpFormulaPrCmd) +} diff --git a/completers/brew_completer/cmd/bumpRevision.go b/completers/brew_completer/cmd/bumpRevision.go new file mode 100644 index 0000000000..4217660f9f --- /dev/null +++ b/completers/brew_completer/cmd/bumpRevision.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bumpRevisionCmd = &cobra.Command{ + Use: "bump-revision", + Short: "Create a commit to increment the revision of ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bumpRevisionCmd).Standalone() + + bumpRevisionCmd.Flags().Bool("debug", false, "Display any debugging information.") + bumpRevisionCmd.Flags().Bool("dry-run", false, "Print what would be done rather than doing it.") + bumpRevisionCmd.Flags().Bool("help", false, "Show this message.") + bumpRevisionCmd.Flags().Bool("message", false, "Append to the default commit message.") + bumpRevisionCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bumpRevisionCmd.Flags().Bool("remove-bottle-block", false, "Remove the bottle block in addition to bumping the revision.") + bumpRevisionCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + bumpRevisionCmd.Flags().Bool("write-only", false, "Make the expected file modifications without taking any Git actions.") + rootCmd.AddCommand(bumpRevisionCmd) +} diff --git a/completers/brew_completer/cmd/bumpUnversionedCasks.go b/completers/brew_completer/cmd/bumpUnversionedCasks.go new file mode 100644 index 0000000000..c8adadce4e --- /dev/null +++ b/completers/brew_completer/cmd/bumpUnversionedCasks.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bumpUnversionedCasksCmd = &cobra.Command{ + Use: "bump-unversioned-casks", + Short: "Check all casks with unversioned URLs in a given for updates", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bumpUnversionedCasksCmd).Standalone() + + bumpUnversionedCasksCmd.Flags().Bool("debug", false, "Display any debugging information.") + bumpUnversionedCasksCmd.Flags().Bool("dry-run", false, "Do everything except caching state and opening pull requests.") + bumpUnversionedCasksCmd.Flags().Bool("help", false, "Show this message.") + bumpUnversionedCasksCmd.Flags().Bool("limit", false, "Maximum runtime in minutes.") + bumpUnversionedCasksCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + bumpUnversionedCasksCmd.Flags().Bool("state-file", false, "File for caching state.") + bumpUnversionedCasksCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(bumpUnversionedCasksCmd) +} diff --git a/completers/brew_completer/cmd/casks.go b/completers/brew_completer/cmd/casks.go deleted file mode 100644 index be9ec061ec..0000000000 --- a/completers/brew_completer/cmd/casks.go +++ /dev/null @@ -1,19 +0,0 @@ -package cmd - -import ( - "github.com/rsteube/carapace" - "github.com/spf13/cobra" -) - -var casksCmd = &cobra.Command{ - Use: "casks", - Short: "List all locally installable casks including short name", - Run: func(cmd *cobra.Command, args []string) {}, -} - -func init() { - carapace.Gen(casksCmd).Standalone() - - - rootCmd.AddCommand(casksCmd) -} diff --git a/completers/brew_completer/cmd/cat.go b/completers/brew_completer/cmd/cat.go new file mode 100644 index 0000000000..7b26bd9f2e --- /dev/null +++ b/completers/brew_completer/cmd/cat.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var catCmd = &cobra.Command{ + Use: "cat", + Short: "Display the source of a or ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(catCmd).Standalone() + + catCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + catCmd.Flags().Bool("debug", false, "Display any debugging information.") + catCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + catCmd.Flags().Bool("help", false, "Show this message.") + catCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + catCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(catCmd) +} diff --git a/completers/brew_completer/cmd/cleanup.go b/completers/brew_completer/cmd/cleanup.go index 9a5394808d..ee5095700d 100644 --- a/completers/brew_completer/cmd/cleanup.go +++ b/completers/brew_completer/cmd/cleanup.go @@ -6,22 +6,23 @@ import ( ) var cleanupCmd = &cobra.Command{ - Use: "cleanup", - Short: "Remove stale lock files and outdated downloads", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "cleanup", + Short: "Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(cleanupCmd).Standalone() - cleanupCmd.Flags().BoolS("s", "s", false, "Scrub the cache") - cleanupCmd.Flags().BoolP("debug", "d", false, "Display any debugging information") - cleanupCmd.Flags().BoolP("dry-run", "n", false, "Show what would be removed, but do not actually remove anything") - cleanupCmd.Flags().BoolP("help", "h", false, "Show this message") - cleanupCmd.Flags().String("prune", "", "Remove all cache files older than specified days") - cleanupCmd.Flags().Bool("prune-prefix", false, "Only prune the symlinks and directories from the prefix and remove no other files") - cleanupCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - cleanupCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose") + cleanupCmd.Flags().Bool("debug", false, "Display any debugging information.") + cleanupCmd.Flags().Bool("dry-run", false, "Show what would be removed, but do not actually remove anything.") + cleanupCmd.Flags().Bool("help", false, "Show this message.") + cleanupCmd.Flags().Bool("prune", false, "Remove all cache files older than specified . If you want to remove everything, use `--prune=all`.") + cleanupCmd.Flags().Bool("prune-prefix", false, "Only prune the symlinks and directories from the prefix and remove no other files.") + cleanupCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + cleanupCmd.Flags().BoolS("s", "s", false, "Scrub the cache, including downloads for even the latest versions. Note that downloads for any installed formulae or casks will still not be deleted. If you want to delete those too: `rm -rf \"$(brew --cache)\"`") + cleanupCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(cleanupCmd) carapace.Gen(cleanupCmd).FlagCompletion(carapace.ActionMap{ diff --git a/completers/brew_completer/cmd/command.go b/completers/brew_completer/cmd/command.go new file mode 100644 index 0000000000..b5b5f1b25a --- /dev/null +++ b/completers/brew_completer/cmd/command.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var commandCmd = &cobra.Command{ + Use: "command", + Short: "Display the path to the file being used when invoking `brew` ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(commandCmd).Standalone() + + commandCmd.Flags().Bool("debug", false, "Display any debugging information.") + commandCmd.Flags().Bool("help", false, "Show this message.") + commandCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + commandCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(commandCmd) +} diff --git a/completers/brew_completer/cmd/commands.go b/completers/brew_completer/cmd/commands.go index 446ce12f9d..a8e64bd6b3 100644 --- a/completers/brew_completer/cmd/commands.go +++ b/completers/brew_completer/cmd/commands.go @@ -6,18 +6,19 @@ import ( ) var commandsCmd = &cobra.Command{ - Use: "commands", - Short: "Show lists of built-in and external commands", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "commands", + Short: "Show lists of built-in and external commands", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(commandsCmd).Standalone() - commandsCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - commandsCmd.Flags().BoolP("help", "h", false, "Show this message.") + commandsCmd.Flags().Bool("debug", false, "Display any debugging information.") + commandsCmd.Flags().Bool("help", false, "Show this message.") commandsCmd.Flags().Bool("include-aliases", false, "Include aliases of internal commands.") - commandsCmd.Flags().BoolP("quiet", "q", false, "List only the names of commands without") - commandsCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + commandsCmd.Flags().Bool("quiet", false, "List only the names of commands without category headers.") + commandsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(commandsCmd) } diff --git a/completers/brew_completer/cmd/completions.go b/completers/brew_completer/cmd/completions.go index 819bc0348c..447b482463 100644 --- a/completers/brew_completer/cmd/completions.go +++ b/completers/brew_completer/cmd/completions.go @@ -6,18 +6,19 @@ import ( ) var completionsCmd = &cobra.Command{ - Use: "completions", - Short: "Control whether Homebrew automatically links external tap shell completion files", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "completions", + Short: "Control whether Homebrew automatically links external tap shell completion files", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(completionsCmd).Standalone() - completionsCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - completionsCmd.Flags().BoolP("help", "h", false, "Show this message.") - completionsCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - completionsCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + completionsCmd.Flags().Bool("debug", false, "Display any debugging information.") + completionsCmd.Flags().Bool("help", false, "Show this message.") + completionsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + completionsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(completionsCmd) carapace.Gen(completionsCmd).PositionalCompletion( diff --git a/completers/brew_completer/cmd/config.go b/completers/brew_completer/cmd/config.go index b1797a8c9a..3ac85a3fb3 100644 --- a/completers/brew_completer/cmd/config.go +++ b/completers/brew_completer/cmd/config.go @@ -6,17 +6,18 @@ import ( ) var configCmd = &cobra.Command{ - Use: "config", - Short: "Show Homebrew and system configuration info useful for debugging", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "config", + Short: "Show Homebrew and system configuration info useful for debugging", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(configCmd).Standalone() - configCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - configCmd.Flags().BoolP("help", "h", false, "Show this message.") - configCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - configCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + configCmd.Flags().Bool("debug", false, "Display any debugging information.") + configCmd.Flags().Bool("help", false, "Show this message.") + configCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + configCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(configCmd) } diff --git a/completers/brew_completer/cmd/contributions.go b/completers/brew_completer/cmd/contributions.go new file mode 100644 index 0000000000..73789a156b --- /dev/null +++ b/completers/brew_completer/cmd/contributions.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var contributionsCmd = &cobra.Command{ + Use: "contributions", + Short: "Summarise contributions to Homebrew repositories", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(contributionsCmd).Standalone() + + contributionsCmd.Flags().Bool("csv", false, "Print a CSV of contributions across repositories over the time period.") + contributionsCmd.Flags().Bool("debug", false, "Display any debugging information.") + contributionsCmd.Flags().Bool("from", false, "Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year.") + contributionsCmd.Flags().Bool("help", false, "Show this message.") + contributionsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + contributionsCmd.Flags().Bool("repositories", false, "Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `autoupdate`, `bundle`, `command-not-found`, `test-bot`, `services`, `cask-fonts` and `cask-versions`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ") + contributionsCmd.Flags().Bool("to", false, "Date (ISO-8601 format) to stop searching contributions.") + contributionsCmd.Flags().Bool("user", false, "Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers.") + contributionsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(contributionsCmd) +} diff --git a/completers/brew_completer/cmd/create.go b/completers/brew_completer/cmd/create.go index b518361394..8e4b589b68 100644 --- a/completers/brew_completer/cmd/create.go +++ b/completers/brew_completer/cmd/create.go @@ -7,34 +7,34 @@ import ( var createCmd = &cobra.Command{ Use: "create", - Short: "Generate a formula or a cask for the downloadable file at URL", + Short: "Generate a formula or, with `--cask`, a cask for the downloadable file at and open it in the editor", Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(createCmd).Standalone() - createCmd.Flags().Bool("HEAD", false, "Indicate that URL points to the package's repository rather than a file.") + createCmd.Flags().Bool("HEAD", false, "Indicate that points to the package's repository rather than a file.") createCmd.Flags().Bool("autotools", false, "Create a basic template for an Autotools-style build.") createCmd.Flags().Bool("cask", false, "Create a basic template for a cask.") createCmd.Flags().Bool("cmake", false, "Create a basic template for a CMake-style build.") createCmd.Flags().Bool("crystal", false, "Create a basic template for a Crystal build.") - createCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - createCmd.Flags().BoolP("force", "f", false, "Ignore errors for disallowed formula names") + createCmd.Flags().Bool("debug", false, "Display any debugging information.") + createCmd.Flags().Bool("force", false, "Ignore errors for disallowed formula names and names that shadow aliases.") createCmd.Flags().Bool("go", false, "Create a basic template for a Go build.") - createCmd.Flags().BoolP("help", "h", false, "Show this message.") + createCmd.Flags().Bool("help", false, "Show this message.") createCmd.Flags().Bool("meson", false, "Create a basic template for a Meson-style build.") - createCmd.Flags().Bool("no-fetch", false, "Homebrew will not download URL to the cache") + createCmd.Flags().Bool("no-fetch", false, "Homebrew will not download to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage).") createCmd.Flags().Bool("node", false, "Create a basic template for a Node build.") createCmd.Flags().Bool("perl", false, "Create a basic template for a Perl build.") createCmd.Flags().Bool("python", false, "Create a basic template for a Python build.") - createCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") + createCmd.Flags().Bool("quiet", false, "Make some output more quiet.") createCmd.Flags().Bool("ruby", false, "Create a basic template for a Ruby build.") createCmd.Flags().Bool("rust", false, "Create a basic template for a Rust build.") - createCmd.Flags().Bool("set-license", false, "Explicitly set the license of the new formula.") - createCmd.Flags().Bool("set-name", false, "Explicitly set the name of the new formula or cask.") - createCmd.Flags().Bool("set-version", false, "Explicitly set the version of the new formula or cask.") - createCmd.Flags().Bool("tap", false, "Generate the new formula within the given tap") - createCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + createCmd.Flags().Bool("set-license", false, "Explicitly set the of the new formula.") + createCmd.Flags().Bool("set-name", false, "Explicitly set the of the new formula or cask.") + createCmd.Flags().Bool("set-version", false, "Explicitly set the of the new formula or cask.") + createCmd.Flags().Bool("tap", false, "Generate the new formula within the given tap, specified as `/`.") + createCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(createCmd) } diff --git a/completers/brew_completer/cmd/deps.go b/completers/brew_completer/cmd/deps.go index 4870eec19e..76fbc92cfa 100644 --- a/completers/brew_completer/cmd/deps.go +++ b/completers/brew_completer/cmd/deps.go @@ -7,46 +7,41 @@ import ( ) var depsCmd = &cobra.Command{ - Use: "deps", - Short: "Show dependencies for formula", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "deps", + Short: "Show dependencies for ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(depsCmd).Standalone() - depsCmd.Flags().BoolS("1", "1", false, "Show only the direct dependencies declared in the formula") - depsCmd.Flags().Bool("HEAD", false, "Show dependencies for HEAD version instead of stable version") - depsCmd.Flags().Bool("annotate", false, "Mark any build, test, implicit, optional, or recommended dependencies") - depsCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - depsCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - depsCmd.Flags().BoolP("debug", "d", false, "Display any debugging information") - depsCmd.Flags().Bool("declared", false, "Show only the direct dependencies declared in the formula") - depsCmd.Flags().Bool("direct", false, "Show only the direct dependencies declared in the formula") - depsCmd.Flags().Bool("dot", false, "Show text-based graph description in DOT format") - depsCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks") - depsCmd.Flags().Bool("for-each", false, "List dependencies for each provided formula, one formula per line") - depsCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - depsCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - depsCmd.Flags().Bool("full-name", false, "List dependencies by their full name") - depsCmd.Flags().Bool("graph", false, "Show dependencies as a directed graph") - depsCmd.Flags().BoolP("help", "h", false, "Show this message") - depsCmd.Flags().Bool("include-build", false, "Include :build dependencies for formula") - depsCmd.Flags().Bool("include-optional", false, "Include :optional dependencies for formula") - depsCmd.Flags().Bool("include-requirements", false, "Include requirements in addition to dependencies for formula") - depsCmd.Flags().Bool("include-test", false, "Include :test dependencies for formula") - depsCmd.Flags().Bool("installed", false, "List dependencies for formulae that are currently installed") - depsCmd.Flags().Bool("missing", false, "Show only missing dependencies") - depsCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - depsCmd.Flags().Bool("skip-recommended", false, "Skip :recommended dependencies for formula") - depsCmd.Flags().BoolP("topological", "n", false, "Sort dependencies in topological order") - depsCmd.Flags().Bool("tree", false, "Show dependencies as a tree") - depsCmd.Flags().Bool("union", false, "Show the union of dependencies for multiple formula") - depsCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose") + depsCmd.Flags().Bool("HEAD", false, "Show dependencies for HEAD version instead of stable version.") + depsCmd.Flags().Bool("annotate", false, "Mark any build, test, implicit, optional, or recommended dependencies as such in the output.") + depsCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + depsCmd.Flags().Bool("debug", false, "Display any debugging information.") + depsCmd.Flags().Bool("direct", false, "Show only the direct dependencies declared in the formula.") + depsCmd.Flags().Bool("dot", false, "Show text-based graph description in DOT format.") + depsCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to list their dependencies.") + depsCmd.Flags().Bool("for-each", false, "Switch into the mode used by the `--eval-all` option, but only list dependencies for each provided , one formula per line. This is used for debugging the `--installed`/`--eval-all` display mode.") + depsCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + depsCmd.Flags().Bool("full-name", false, "List dependencies by their full name.") + depsCmd.Flags().Bool("graph", false, "Show dependencies as a directed graph.") + depsCmd.Flags().Bool("help", false, "Show this message.") + depsCmd.Flags().Bool("include-build", false, "Include `:build` dependencies for .") + depsCmd.Flags().Bool("include-optional", false, "Include `:optional` dependencies for .") + depsCmd.Flags().Bool("include-requirements", false, "Include requirements in addition to dependencies for .") + depsCmd.Flags().Bool("include-test", false, "Include `:test` dependencies for (non-recursive).") + depsCmd.Flags().Bool("installed", false, "List dependencies for formulae that are currently installed. If is specified, list only its dependencies that are currently installed.") + depsCmd.Flags().Bool("missing", false, "Show only missing dependencies.") + depsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + depsCmd.Flags().Bool("skip-recommended", false, "Skip `:recommended` dependencies for .") + depsCmd.Flags().Bool("topological", false, "Sort dependencies in topological order.") + depsCmd.Flags().Bool("tree", false, "Show dependencies as a tree. When given multiple formula arguments, show individual trees for each formula.") + depsCmd.Flags().Bool("union", false, "Show the union of dependencies for multiple , instead of the intersection.") + depsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(depsCmd) - depsCmd.MarkFlagsMutuallyExclusive("1", "direct", "declared") - carapace.Gen(depsCmd).PositionalAnyCompletion( action.ActionSearch(depsCmd).FilterArgs(), ) diff --git a/completers/brew_completer/cmd/desc.go b/completers/brew_completer/cmd/desc.go index 7c0f47e2ee..e9870c06c4 100644 --- a/completers/brew_completer/cmd/desc.go +++ b/completers/brew_completer/cmd/desc.go @@ -7,26 +7,25 @@ import ( ) var descCmd = &cobra.Command{ - Use: "desc", - Short: "Display formula's name and one-line description", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "desc", + Short: "Display 's name and one-line description", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(descCmd).Standalone() - descCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - descCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - descCmd.Flags().Bool("debug", false, "Display any debugging information") - descCmd.Flags().BoolP("description", "d", false, "Search just descriptions for text") - descCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks") - descCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - descCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - descCmd.Flags().BoolP("help", "h", false, "Show this message") - descCmd.Flags().BoolP("name", "n", false, "Search just names for text") - descCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - descCmd.Flags().BoolP("search", "s", false, "Search both names and descriptions for text") - descCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose") + descCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + descCmd.Flags().Bool("debug", false, "Display any debugging information.") + descCmd.Flags().Bool("description", false, "Search just descriptions for . If is flanked by slashes, it is interpreted as a regular expression.") + descCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `HOMEBREW_EVAL_ALL` is set.") + descCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + descCmd.Flags().Bool("help", false, "Show this message.") + descCmd.Flags().Bool("name", false, "Search just names for . If is flanked by slashes, it is interpreted as a regular expression.") + descCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + descCmd.Flags().Bool("search", false, "Search both names and descriptions for . If is flanked by slashes, it is interpreted as a regular expression.") + descCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(descCmd) carapace.Gen(descCmd).PositionalAnyCompletion( diff --git a/completers/brew_completer/cmd/determineTestRunners.go b/completers/brew_completer/cmd/determineTestRunners.go new file mode 100644 index 0000000000..e9cdc40d1e --- /dev/null +++ b/completers/brew_completer/cmd/determineTestRunners.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var determineTestRunnersCmd = &cobra.Command{ + Use: "determine-test-runners", + Short: "Determines the runners used to test formulae or their dependents", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(determineTestRunnersCmd).Standalone() + + determineTestRunnersCmd.Flags().Bool("all-supported", false, "Instead of selecting runners based on the chosen formula, return all supported runners.") + determineTestRunnersCmd.Flags().Bool("debug", false, "Display any debugging information.") + determineTestRunnersCmd.Flags().Bool("dependents", false, "Determine runners for testing dependents. Requires `--eval-all` or `HOMEBREW_EVAL_ALL`.") + determineTestRunnersCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae, whether installed or not, to determine testing dependents.") + determineTestRunnersCmd.Flags().Bool("help", false, "Show this message.") + determineTestRunnersCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + determineTestRunnersCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(determineTestRunnersCmd) +} diff --git a/completers/brew_completer/cmd/developer.go b/completers/brew_completer/cmd/developer.go index ad30d42051..050cf07954 100644 --- a/completers/brew_completer/cmd/developer.go +++ b/completers/brew_completer/cmd/developer.go @@ -7,18 +7,19 @@ import ( ) var developerCmd = &cobra.Command{ - Use: "developer", - Short: "Control Homebrew's developer mode", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "developer", + Short: "Control Homebrew's developer mode", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(developerCmd).Standalone() - developerCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - developerCmd.Flags().BoolP("help", "h", false, "Show this message.") - developerCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - developerCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + developerCmd.Flags().Bool("debug", false, "Display any debugging information.") + developerCmd.Flags().Bool("help", false, "Show this message.") + developerCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + developerCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(developerCmd) carapace.Gen(developerCmd).PositionalCompletion( diff --git a/completers/brew_completer/cmd/dispatchBuildBottle.go b/completers/brew_completer/cmd/dispatchBuildBottle.go new file mode 100644 index 0000000000..e159eee9b6 --- /dev/null +++ b/completers/brew_completer/cmd/dispatchBuildBottle.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var dispatchBuildBottleCmd = &cobra.Command{ + Use: "dispatch-build-bottle", + Short: "Build bottles for these formulae with GitHub Actions", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(dispatchBuildBottleCmd).Standalone() + + dispatchBuildBottleCmd.Flags().Bool("debug", false, "Display any debugging information.") + dispatchBuildBottleCmd.Flags().Bool("help", false, "Show this message.") + dispatchBuildBottleCmd.Flags().Bool("issue", false, "If specified, post a comment to this issue number if the job fails.") + dispatchBuildBottleCmd.Flags().Bool("linux", false, "Dispatch bottle for Linux (using GitHub runners).") + dispatchBuildBottleCmd.Flags().Bool("linux-self-hosted", false, "Dispatch bottle for Linux (using self-hosted runner).") + dispatchBuildBottleCmd.Flags().Bool("linux-wheezy", false, "Use Debian Wheezy container for building the bottle on Linux.") + dispatchBuildBottleCmd.Flags().Bool("macos", false, "macOS version (or comma-separated list of versions) the bottle should be built for.") + dispatchBuildBottleCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + dispatchBuildBottleCmd.Flags().Bool("tap", false, "Target tap repository (default: `homebrew/core`).") + dispatchBuildBottleCmd.Flags().Bool("timeout", false, "Build timeout (in minutes, default: 60).") + dispatchBuildBottleCmd.Flags().Bool("upload", false, "Upload built bottles.") + dispatchBuildBottleCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + dispatchBuildBottleCmd.Flags().Bool("workflow", false, "Dispatch specified workflow (default: `dispatch-build-bottle.yml`).") + rootCmd.AddCommand(dispatchBuildBottleCmd) +} diff --git a/completers/brew_completer/cmd/docs.go b/completers/brew_completer/cmd/docs.go index 5acc28cb9d..fceca31e92 100644 --- a/completers/brew_completer/cmd/docs.go +++ b/completers/brew_completer/cmd/docs.go @@ -6,17 +6,18 @@ import ( ) var docsCmd = &cobra.Command{ - Use: "docs", - Short: "Open Homebrew's online documentation", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "docs", + Short: "Open Homebrew's online documentation at in a browser", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(docsCmd).Standalone() - docsCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - docsCmd.Flags().BoolP("help", "h", false, "Show this message.") - docsCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - docsCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + docsCmd.Flags().Bool("debug", false, "Display any debugging information.") + docsCmd.Flags().Bool("help", false, "Show this message.") + docsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + docsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(docsCmd) } diff --git a/completers/brew_completer/cmd/doctor.go b/completers/brew_completer/cmd/doctor.go index 28e787e8fb..dcf465e266 100644 --- a/completers/brew_completer/cmd/doctor.go +++ b/completers/brew_completer/cmd/doctor.go @@ -6,19 +6,20 @@ import ( ) var doctorCmd = &cobra.Command{ - Use: "doctor", - Short: "Check your system for potential problems", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "doctor", + Short: "Check your system for potential problems", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(doctorCmd).Standalone() - doctorCmd.Flags().BoolP("audit-debug", "D", false, "Enable debugging and profiling of audit methods") - doctorCmd.Flags().BoolP("debug", "d", false, "Display any debugging information") - doctorCmd.Flags().BoolP("help", "h", false, "Show this message") - doctorCmd.Flags().Bool("list-checks", false, "List all audit methods, which can be run individually if provided as arguments") - doctorCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - doctorCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose") + doctorCmd.Flags().Bool("audit-debug", false, "Enable debugging and profiling of audit methods.") + doctorCmd.Flags().Bool("debug", false, "Display any debugging information.") + doctorCmd.Flags().Bool("help", false, "Show this message.") + doctorCmd.Flags().Bool("list-checks", false, "List all audit methods, which can be run individually if provided as arguments.") + doctorCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + doctorCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(doctorCmd) } diff --git a/completers/brew_completer/cmd/dr.go b/completers/brew_completer/cmd/dr.go new file mode 100644 index 0000000000..f85167f0b3 --- /dev/null +++ b/completers/brew_completer/cmd/dr.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var drCmd = &cobra.Command{ + Use: "dr", + Short: "Check your system for potential problems", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(drCmd).Standalone() + + drCmd.Flags().Bool("audit-debug", false, "Enable debugging and profiling of audit methods.") + drCmd.Flags().Bool("debug", false, "Display any debugging information.") + drCmd.Flags().Bool("help", false, "Show this message.") + drCmd.Flags().Bool("list-checks", false, "List all audit methods, which can be run individually if provided as arguments.") + drCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + drCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(drCmd) +} diff --git a/completers/brew_completer/cmd/edit.go b/completers/brew_completer/cmd/edit.go index 356514b490..59f95c2ac8 100644 --- a/completers/brew_completer/cmd/edit.go +++ b/completers/brew_completer/cmd/edit.go @@ -8,7 +8,7 @@ import ( var editCmd = &cobra.Command{ Use: "edit", - Short: "Open a formula or cask in the editor", + Short: "Open a , or in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the Homebrew repository for editing if no argument is provided", Run: func(cmd *cobra.Command, args []string) {}, } @@ -16,14 +16,12 @@ func init() { carapace.Gen(editCmd).Standalone() editCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") - editCmd.Flags().Bool("casks", false, "Treat all named arguments as casks.") - editCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") + editCmd.Flags().Bool("debug", false, "Display any debugging information.") editCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") - editCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae.") - editCmd.Flags().BoolP("help", "h", false, "Show this message.") - editCmd.Flags().Bool("print-path", false, "Print the file path to be edited") - editCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - editCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") + editCmd.Flags().Bool("help", false, "Show this message.") + editCmd.Flags().Bool("print-path", false, "Print the file path to be edited, without opening an editor.") + editCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + editCmd.Flags().Bool("verbose", false, "Make some output more verbose.") rootCmd.AddCommand(editCmd) carapace.Gen(editCmd).PositionalAnyCompletion( diff --git a/completers/brew_completer/cmd/environment.go b/completers/brew_completer/cmd/environment.go new file mode 100644 index 0000000000..80405f8871 --- /dev/null +++ b/completers/brew_completer/cmd/environment.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var environmentCmd = &cobra.Command{ + Use: "environment", + Short: "Summarise Homebrew's build environment as a plain list", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(environmentCmd).Standalone() + + environmentCmd.Flags().Bool("debug", false, "Display any debugging information.") + environmentCmd.Flags().Bool("help", false, "Show this message.") + environmentCmd.Flags().Bool("plain", false, "Generate plain output even when piped.") + environmentCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + environmentCmd.Flags().Bool("shell", false, "Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell.") + environmentCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(environmentCmd) +} diff --git a/completers/brew_completer/cmd/extract.go b/completers/brew_completer/cmd/extract.go new file mode 100644 index 0000000000..4ec7a66c67 --- /dev/null +++ b/completers/brew_completer/cmd/extract.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var extractCmd = &cobra.Command{ + Use: "extract", + Short: "Look through repository history to find the most recent version of and create a copy in ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(extractCmd).Standalone() + + extractCmd.Flags().Bool("debug", false, "Display any debugging information.") + extractCmd.Flags().Bool("force", false, "Overwrite the destination formula if it already exists.") + extractCmd.Flags().Bool("help", false, "Show this message.") + extractCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + extractCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + extractCmd.Flags().Bool("version", false, "Extract the specified of instead of the most recent.") + rootCmd.AddCommand(extractCmd) +} diff --git a/completers/brew_completer/cmd/fetch.go b/completers/brew_completer/cmd/fetch.go index 635a1ab401..787a2868ef 100644 --- a/completers/brew_completer/cmd/fetch.go +++ b/completers/brew_completer/cmd/fetch.go @@ -7,34 +7,33 @@ import ( ) var fetchCmd = &cobra.Command{ - Use: "fetch", - Short: "Download a bottle or source packages for formulae and binaries for casks", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "fetch", + Short: "Download a bottle (if available) or source packages for e and binaries for s", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(fetchCmd).Standalone() - fetchCmd.Flags().Bool("HEAD", false, "Fetch HEAD version instead of stable version") - fetchCmd.Flags().Bool("arch", false, "Download for the given CPU architecture") - fetchCmd.Flags().Bool("bottle-tag", false, "Download a bottle for given tag") - fetchCmd.Flags().Bool("build-bottle", false, "Download source packages rather than a bottle") - fetchCmd.Flags().BoolP("build-from-source", "s", false, "Download source packages rather than a bottle") - fetchCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - fetchCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - fetchCmd.Flags().BoolP("debug", "d", false, "Display any debugging information") - fetchCmd.Flags().Bool("deps", false, "Also download dependencies for any listed formula") - fetchCmd.Flags().BoolP("force", "f", false, "Remove a previously cached version and re-fetch") - fetchCmd.Flags().Bool("force-bottle", false, "Download a bottle if it exists for the current or newest version of macOS") - fetchCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - fetchCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - fetchCmd.Flags().BoolP("help", "h", false, "Show this message") - fetchCmd.Flags().Bool("no-quarantine", false, "Disable quarantining of downloads") - fetchCmd.Flags().Bool("os", false, "Download for the given operating system") - fetchCmd.Flags().Bool("quarantine", false, "Enable quarantining of downloads") - fetchCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - fetchCmd.Flags().Bool("retry", false, "Retry if downloading fails") - fetchCmd.Flags().BoolP("verbose", "v", false, "Do a verbose VCS checkout, if the URL represents a VCS") + fetchCmd.Flags().Bool("HEAD", false, "Fetch HEAD version instead of stable version.") + fetchCmd.Flags().Bool("arch", false, "Download for the given CPU architecture. (Pass `all` to download for all architectures.)") + fetchCmd.Flags().Bool("bottle-tag", false, "Download a bottle for given tag.") + fetchCmd.Flags().Bool("build-bottle", false, "Download source packages (for eventual bottling) rather than a bottle.") + fetchCmd.Flags().Bool("build-from-source", false, "Download source packages rather than a bottle.") + fetchCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + fetchCmd.Flags().Bool("debug", false, "Display any debugging information.") + fetchCmd.Flags().Bool("deps", false, "Also download dependencies for any listed .") + fetchCmd.Flags().Bool("force", false, "Remove a previously cached version and re-fetch.") + fetchCmd.Flags().Bool("force-bottle", false, "Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation.") + fetchCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + fetchCmd.Flags().Bool("help", false, "Show this message.") + fetchCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + fetchCmd.Flags().Bool("os", false, "Download for the given operating system. (Pass `all` to download for all operating systems.)") + fetchCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + fetchCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + fetchCmd.Flags().Bool("retry", false, "Retry if downloading fails or re-download if the checksum of a previously cached version no longer matches. Tries at most 5 times with exponential backoff.") + fetchCmd.Flags().Bool("verbose", false, "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for seeing if an existing VCS cache has been updated.") rootCmd.AddCommand(fetchCmd) carapace.Gen(fetchCmd).PositionalAnyCompletion( diff --git a/completers/brew_completer/cmd/flagCache.go b/completers/brew_completer/cmd/flagCache.go new file mode 100644 index 0000000000..f7aa15c9c3 --- /dev/null +++ b/completers/brew_completer/cmd/flagCache.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagCacheCmd = &cobra.Command{ + Use: "cache", + Short: "Display Homebrew's download cache", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagCacheCmd).Standalone() + + flagCacheCmd.Flags().Bool("HEAD", false, "Show the cache file used when building from HEAD.") + flagCacheCmd.Flags().Bool("arch", false, "Show cache file for the given CPU architecture. (Pass `all` to show cache files for all architectures.)") + flagCacheCmd.Flags().Bool("bottle-tag", false, "Show the cache file used when pouring a bottle for the given tag.") + flagCacheCmd.Flags().Bool("build-from-source", false, "Show the cache file used when building from source.") + flagCacheCmd.Flags().Bool("cask", false, "Only show cache files for casks.") + flagCacheCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagCacheCmd.Flags().Bool("force-bottle", false, "Show the cache file used when pouring a bottle.") + flagCacheCmd.Flags().Bool("formula", false, "Only show cache files for formulae.") + flagCacheCmd.Flags().Bool("help", false, "Show this message.") + flagCacheCmd.Flags().Bool("os", false, "Show cache file for the given operating system. (Pass `all` to show cache files for all operating systems.)") + flagCacheCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagCacheCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagCaskroom.go b/completers/brew_completer/cmd/flagCaskroom.go new file mode 100644 index 0000000000..44b6e325b2 --- /dev/null +++ b/completers/brew_completer/cmd/flagCaskroom.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagCaskroomCmd = &cobra.Command{ + Use: "caskroom", + Short: "Display Homebrew's Caskroom path", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagCaskroomCmd).Standalone() + + flagCaskroomCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagCaskroomCmd.Flags().Bool("help", false, "Show this message.") + flagCaskroomCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagCaskroomCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagCellar.go b/completers/brew_completer/cmd/flagCellar.go new file mode 100644 index 0000000000..80871bf6d6 --- /dev/null +++ b/completers/brew_completer/cmd/flagCellar.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagCellarCmd = &cobra.Command{ + Use: "cellar", + Short: "Display Homebrew's Cellar path", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagCellarCmd).Standalone() + + flagCellarCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagCellarCmd.Flags().Bool("help", false, "Show this message.") + flagCellarCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagCellarCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagConfig.go b/completers/brew_completer/cmd/flagConfig.go new file mode 100644 index 0000000000..bd6b332f96 --- /dev/null +++ b/completers/brew_completer/cmd/flagConfig.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagConfigCmd = &cobra.Command{ + Use: "config", + Short: "Show Homebrew and system configuration info useful for debugging", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagConfigCmd).Standalone() + + flagConfigCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagConfigCmd.Flags().Bool("help", false, "Show this message.") + flagConfigCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagConfigCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagEnv.go b/completers/brew_completer/cmd/flagEnv.go new file mode 100644 index 0000000000..164760da96 --- /dev/null +++ b/completers/brew_completer/cmd/flagEnv.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagEnvCmd = &cobra.Command{ + Use: "env", + Short: "Summarise Homebrew's build environment as a plain list", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagEnvCmd).Standalone() + + flagEnvCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagEnvCmd.Flags().Bool("help", false, "Show this message.") + flagEnvCmd.Flags().Bool("plain", false, "Generate plain output even when piped.") + flagEnvCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagEnvCmd.Flags().Bool("shell", false, "Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell.") + flagEnvCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagPrefix.go b/completers/brew_completer/cmd/flagPrefix.go new file mode 100644 index 0000000000..9e8babc534 --- /dev/null +++ b/completers/brew_completer/cmd/flagPrefix.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagPrefixCmd = &cobra.Command{ + Use: "prefix", + Short: "Display Homebrew's install path", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagPrefixCmd).Standalone() + + flagPrefixCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagPrefixCmd.Flags().Bool("help", false, "Show this message.") + flagPrefixCmd.Flags().Bool("installed", false, "Outputs nothing and returns a failing status code if is not installed.") + flagPrefixCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagPrefixCmd.Flags().Bool("unbrewed", false, "List files in Homebrew's prefix not installed by Homebrew.") + flagPrefixCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagRepo.go b/completers/brew_completer/cmd/flagRepo.go new file mode 100644 index 0000000000..bfd726caea --- /dev/null +++ b/completers/brew_completer/cmd/flagRepo.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagRepoCmd = &cobra.Command{ + Use: "repo", + Short: "Display where Homebrew's Git repository is located", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagRepoCmd).Standalone() + + flagRepoCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagRepoCmd.Flags().Bool("help", false, "Show this message.") + flagRepoCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagRepoCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagRepository.go b/completers/brew_completer/cmd/flagRepository.go new file mode 100644 index 0000000000..e37b3d92f2 --- /dev/null +++ b/completers/brew_completer/cmd/flagRepository.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagRepositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Display where Homebrew's Git repository is located", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagRepositoryCmd).Standalone() + + flagRepositoryCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagRepositoryCmd.Flags().Bool("help", false, "Show this message.") + flagRepositoryCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagRepositoryCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/flagS.go b/completers/brew_completer/cmd/flagS.go new file mode 100644 index 0000000000..c1d0ec2fdf --- /dev/null +++ b/completers/brew_completer/cmd/flagS.go @@ -0,0 +1,37 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var flagSCmd = &cobra.Command{ + Use: "S", + Aliases: []string{"S"}, + Short: "Perform a substring search of cask tokens and formula names for ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(flagSCmd).Standalone() + + flagSCmd.Flags().Bool("archlinux", false, "Search for in the given database.") + flagSCmd.Flags().Bool("cask", false, "Search for casks.") + flagSCmd.Flags().Bool("closed", false, "Search for only closed GitHub pull requests.") + flagSCmd.Flags().Bool("debian", false, "Search for in the given database.") + flagSCmd.Flags().Bool("debug", false, "Display any debugging information.") + flagSCmd.Flags().Bool("desc", false, "Search for formulae with a description matching and casks with a name or description matching .") + flagSCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `HOMEBREW_EVAL_ALL` is set.") + flagSCmd.Flags().Bool("fedora", false, "Search for in the given database.") + flagSCmd.Flags().Bool("fink", false, "Search for in the given database.") + flagSCmd.Flags().Bool("formula", false, "Search for formulae.") + flagSCmd.Flags().Bool("help", false, "Show this message.") + flagSCmd.Flags().Bool("macports", false, "Search for in the given database.") + flagSCmd.Flags().Bool("open", false, "Search for only open GitHub pull requests.") + flagSCmd.Flags().Bool("opensuse", false, "Search for in the given database.") + flagSCmd.Flags().Bool("pull-request", false, "Search for GitHub pull requests containing .") + flagSCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + flagSCmd.Flags().Bool("repology", false, "Search for in the given database.") + flagSCmd.Flags().Bool("ubuntu", false, "Search for in the given database.") + flagSCmd.Flags().Bool("verbose", false, "Make some output more verbose.") +} diff --git a/completers/brew_completer/cmd/formula.go b/completers/brew_completer/cmd/formula.go new file mode 100644 index 0000000000..e5f174ced7 --- /dev/null +++ b/completers/brew_completer/cmd/formula.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var formulaCmd = &cobra.Command{ + Use: "formula", + Short: "Display the path where is located", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(formulaCmd).Standalone() + + formulaCmd.Flags().Bool("debug", false, "Display any debugging information.") + formulaCmd.Flags().Bool("help", false, "Show this message.") + formulaCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + formulaCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(formulaCmd) +} diff --git a/completers/brew_completer/cmd/formulae.go b/completers/brew_completer/cmd/formulae.go deleted file mode 100644 index b4fd6e91bd..0000000000 --- a/completers/brew_completer/cmd/formulae.go +++ /dev/null @@ -1,18 +0,0 @@ -package cmd - -import ( - "github.com/rsteube/carapace" - "github.com/spf13/cobra" -) - -var formulaeCmd = &cobra.Command{ - Use: "formulae", - Short: "List all locally installable formulae including short names", - Run: func(cmd *cobra.Command, args []string) {}, -} - -func init() { - carapace.Gen(formulaeCmd).Standalone() - - rootCmd.AddCommand(formulaeCmd) -} diff --git a/completers/brew_completer/cmd/generateCaskApi.go b/completers/brew_completer/cmd/generateCaskApi.go new file mode 100644 index 0000000000..e9cb543868 --- /dev/null +++ b/completers/brew_completer/cmd/generateCaskApi.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var generateCaskApiCmd = &cobra.Command{ + Use: "generate-cask-api", + Short: "Generate `homebrew/cask` API data files for ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(generateCaskApiCmd).Standalone() + + generateCaskApiCmd.Flags().Bool("debug", false, "Display any debugging information.") + generateCaskApiCmd.Flags().Bool("dry-run", false, "Generate API data without writing it to files.") + generateCaskApiCmd.Flags().Bool("help", false, "Show this message.") + generateCaskApiCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + generateCaskApiCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(generateCaskApiCmd) +} diff --git a/completers/brew_completer/cmd/generateFormulaApi.go b/completers/brew_completer/cmd/generateFormulaApi.go new file mode 100644 index 0000000000..310089b01a --- /dev/null +++ b/completers/brew_completer/cmd/generateFormulaApi.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var generateFormulaApiCmd = &cobra.Command{ + Use: "generate-formula-api", + Short: "Generate `homebrew/core` API data files for ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(generateFormulaApiCmd).Standalone() + + generateFormulaApiCmd.Flags().Bool("debug", false, "Display any debugging information.") + generateFormulaApiCmd.Flags().Bool("dry-run", false, "Generate API data without writing it to files.") + generateFormulaApiCmd.Flags().Bool("help", false, "Show this message.") + generateFormulaApiCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + generateFormulaApiCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(generateFormulaApiCmd) +} diff --git a/completers/brew_completer/cmd/generateManCompletions.go b/completers/brew_completer/cmd/generateManCompletions.go new file mode 100644 index 0000000000..a5401fbdf5 --- /dev/null +++ b/completers/brew_completer/cmd/generateManCompletions.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var generateManCompletionsCmd = &cobra.Command{ + Use: "generate-man-completions", + Short: "Generate Homebrew's manpages and shell completions", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(generateManCompletionsCmd).Standalone() + + generateManCompletionsCmd.Flags().Bool("debug", false, "Display any debugging information.") + generateManCompletionsCmd.Flags().Bool("help", false, "Show this message.") + generateManCompletionsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + generateManCompletionsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(generateManCompletionsCmd) +} diff --git a/completers/brew_completer/cmd/gistLogs.go b/completers/brew_completer/cmd/gistLogs.go new file mode 100644 index 0000000000..4de7e3c5b7 --- /dev/null +++ b/completers/brew_completer/cmd/gistLogs.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var gistLogsCmd = &cobra.Command{ + Use: "gist-logs", + Short: "Upload logs for a failed build of to a new Gist", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(gistLogsCmd).Standalone() + + gistLogsCmd.Flags().Bool("debug", false, "Display any debugging information.") + gistLogsCmd.Flags().Bool("help", false, "Show this message.") + gistLogsCmd.Flags().Bool("new-issue", false, "Automatically create a new issue in the appropriate GitHub repository after creating the Gist.") + gistLogsCmd.Flags().Bool("private", false, "The Gist will be marked private and will not appear in listings but will be accessible with its link.") + gistLogsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + gistLogsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + gistLogsCmd.Flags().Bool("with-hostname", false, "Include the hostname in the Gist.") + rootCmd.AddCommand(gistLogsCmd) +} diff --git a/completers/brew_completer/cmd/home.go b/completers/brew_completer/cmd/home.go new file mode 100644 index 0000000000..578e57e6a4 --- /dev/null +++ b/completers/brew_completer/cmd/home.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var homeCmd = &cobra.Command{ + Use: "home", + Short: "Open a or 's homepage in a browser, or open Homebrew's own homepage if no argument is provided", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(homeCmd).Standalone() + + homeCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + homeCmd.Flags().Bool("debug", false, "Display any debugging information.") + homeCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + homeCmd.Flags().Bool("help", false, "Show this message.") + homeCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + homeCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(homeCmd) +} diff --git a/completers/brew_completer/cmd/homepage.go b/completers/brew_completer/cmd/homepage.go new file mode 100644 index 0000000000..c736ccb63b --- /dev/null +++ b/completers/brew_completer/cmd/homepage.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var homepageCmd = &cobra.Command{ + Use: "homepage", + Short: "Open a or 's homepage in a browser, or open Homebrew's own homepage if no argument is provided", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(homepageCmd).Standalone() + + homepageCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + homepageCmd.Flags().Bool("debug", false, "Display any debugging information.") + homepageCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + homepageCmd.Flags().Bool("help", false, "Show this message.") + homepageCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + homepageCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(homepageCmd) +} diff --git a/completers/brew_completer/cmd/info.go b/completers/brew_completer/cmd/info.go index 4e2689962f..be46ce819a 100644 --- a/completers/brew_completer/cmd/info.go +++ b/completers/brew_completer/cmd/info.go @@ -7,29 +7,29 @@ import ( ) var infoCmd = &cobra.Command{ - Use: "info", - Short: "Display brief statistics for your Homebrew installation", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "info", + Short: "Display brief statistics for your Homebrew installation", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(infoCmd).Standalone() - infoCmd.Flags().Bool("all", false, "Print JSON of all available formulae") - infoCmd.Flags().Bool("analytics", false, "List global Homebrew analytics data") - infoCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - infoCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - infoCmd.Flags().String("category", "", "Which type of analytics data to retrieve") - infoCmd.Flags().String("days", "", "How many days of analytics data to retrieve") - infoCmd.Flags().BoolP("debug", "d", false, "Display any debugging information") - infoCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - infoCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - infoCmd.Flags().Bool("github", false, "Open the GitHub source page for formula and cask in a browser") - infoCmd.Flags().BoolP("help", "h", false, "Show this message") - infoCmd.Flags().Bool("installed", false, "Print JSON of formulae that are currently installed") - infoCmd.Flags().Bool("json", false, "Print a JSON representation") - infoCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") - infoCmd.Flags().BoolP("verbose", "v", false, "Show more verbose analytics data for formula") + infoCmd.Flags().Bool("analytics", false, "List global Homebrew analytics data or, if specified, installation and build error data for (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set).") + infoCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + infoCmd.Flags().Bool("category", false, "Which type of analytics data to retrieve. The value for must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if is not. The default is `install`.") + infoCmd.Flags().Bool("days", false, "How many days of analytics data to retrieve. The value for must be `30`, `90` or `365`. The default is `30`.") + infoCmd.Flags().Bool("debug", false, "Display any debugging information.") + infoCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `HOMEBREW_EVAL_ALL` is set.") + infoCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + infoCmd.Flags().Bool("github", false, "Open the GitHub source page for and in a browser. To view the history locally: `brew log -p` or ") + infoCmd.Flags().Bool("help", false, "Show this message.") + infoCmd.Flags().Bool("installed", false, "Print JSON of formulae that are currently installed.") + infoCmd.Flags().Bool("json", false, "Print a JSON representation. Currently the default value for is `v1` for . For and use `v2`. See the docs for examples of using the JSON output: ") + infoCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + infoCmd.Flags().Bool("variations", false, "Include the variations hash in each formula's JSON output.") + infoCmd.Flags().Bool("verbose", false, "Show more verbose analytics data for .") rootCmd.AddCommand(infoCmd) carapace.Gen(infoCmd).FlagCompletion(carapace.ActionMap{ diff --git a/completers/brew_completer/cmd/instal.go b/completers/brew_completer/cmd/instal.go new file mode 100644 index 0000000000..b169d9a932 --- /dev/null +++ b/completers/brew_completer/cmd/instal.go @@ -0,0 +1,67 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var instalCmd = &cobra.Command{ + Use: "instal", + Short: "Install a or ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(instalCmd).Standalone() + + instalCmd.Flags().Bool("HEAD", false, "If defines it, install the HEAD version, aka. main, trunk, unstable, master.") + instalCmd.Flags().Bool("adopt", false, "Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`.") + instalCmd.Flags().Bool("appdir", false, "Target location for Applications (default: `/Applications`).") + instalCmd.Flags().Bool("audio-unit-plugindir", false, "Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`).") + instalCmd.Flags().Bool("binaries", false, "Disable/enable linking of helper executables (default: enabled).") + instalCmd.Flags().Bool("bottle-arch", false, "Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on.") + instalCmd.Flags().Bool("build-bottle", false, "Prepare the formula for eventual bottling during installation, skipping any post-install steps.") + instalCmd.Flags().Bool("build-from-source", false, "Compile from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available.") + instalCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + instalCmd.Flags().Bool("cc", false, "Attempt to compile using the specified , which should be the name of the compiler's executable, e.g. `gcc-7` for GCC 7. In order to use LLVM's clang, specify `llvm_clang`. To use the Apple-provided clang, specify `clang`. This option will only accept compilers that are provided by Homebrew or bundled with macOS. Please do not file issues if you encounter errors while using this option.") + instalCmd.Flags().Bool("colorpickerdir", false, "Target location for Color Pickers (default: `~/Library/ColorPickers`).") + instalCmd.Flags().Bool("debug", false, "If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.") + instalCmd.Flags().Bool("debug-symbols", false, "Generate debug symbols on build. Source will be retained in a cache directory.") + instalCmd.Flags().Bool("dictionarydir", false, "Target location for Dictionaries (default: `~/Library/Dictionaries`).") + instalCmd.Flags().Bool("display-times", false, "Print install times for each package at the end of the run.") + instalCmd.Flags().Bool("dry-run", false, "Show what would be installed, but do not actually install anything.") + instalCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.") + instalCmd.Flags().Bool("fontdir", false, "Target location for Fonts (default: `~/Library/Fonts`).") + instalCmd.Flags().Bool("force", false, "Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask).") + instalCmd.Flags().Bool("force-bottle", false, "Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation.") + instalCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + instalCmd.Flags().Bool("git", false, "Create a Git repository, useful for creating patches to the software.") + instalCmd.Flags().Bool("help", false, "Show this message.") + instalCmd.Flags().Bool("ignore-dependencies", false, "An unsupported Homebrew development option to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this option.") + instalCmd.Flags().Bool("include-test", false, "Install testing dependencies required to run `brew test` .") + instalCmd.Flags().Bool("input-methoddir", false, "Target location for Input Methods (default: `~/Library/Input Methods`).") + instalCmd.Flags().Bool("interactive", false, "Download and patch , then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package.") + instalCmd.Flags().Bool("internet-plugindir", false, "Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`).") + instalCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation.") + instalCmd.Flags().Bool("keyboard-layoutdir", false, "Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`).") + instalCmd.Flags().Bool("language", false, "Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask's default language. The default value is the language of your system.") + instalCmd.Flags().Bool("mdimporterdir", false, "Target location for Spotlight Plugins (default: `~/Library/Spotlight`).") + instalCmd.Flags().Bool("no-binaries", false, "Disable/enable linking of helper executables (default: enabled).") + instalCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + instalCmd.Flags().Bool("only-dependencies", false, "Install the dependencies with specified options but do not install the formula itself.") + instalCmd.Flags().Bool("overwrite", false, "Delete files that already exist in the prefix while linking.") + instalCmd.Flags().Bool("prefpanedir", false, "Target location for Preference Panes (default: `~/Library/PreferencePanes`).") + instalCmd.Flags().Bool("qlplugindir", false, "Target location for Quick Look Plugins (default: `~/Library/QuickLook`).") + instalCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + instalCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + instalCmd.Flags().Bool("require-sha", false, "Require all casks to have a checksum.") + instalCmd.Flags().Bool("screen-saverdir", false, "Target location for Screen Savers (default: `~/Library/Screen Savers`).") + instalCmd.Flags().Bool("servicedir", false, "Target location for Services (default: `~/Library/Services`).") + instalCmd.Flags().Bool("skip-cask-deps", false, "Skip installing cask dependencies.") + instalCmd.Flags().Bool("skip-post-install", false, "Install but skip any post-install steps.") + instalCmd.Flags().Bool("verbose", false, "Print the verification and post-install steps.") + instalCmd.Flags().Bool("vst-plugindir", false, "Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`).") + instalCmd.Flags().Bool("vst3-plugindir", false, "Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`).") + instalCmd.Flags().Bool("zap", false, "For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*") + rootCmd.AddCommand(instalCmd) +} diff --git a/completers/brew_completer/cmd/install.go b/completers/brew_completer/cmd/install.go index c5d91f8999..12d6cd3a17 100644 --- a/completers/brew_completer/cmd/install.go +++ b/completers/brew_completer/cmd/install.go @@ -7,59 +7,64 @@ import ( ) var installCmd = &cobra.Command{ - Use: "install", - Short: "Install a formula or cask", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "install", + Short: "Install a or ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(installCmd).Standalone() - installCmd.Flags().Bool("HEAD", false, "If formula defines it, install the HEAD version") - installCmd.Flags().String("appdir", "", "Target location for Applications") - installCmd.Flags().String("audio-unit-plugindir", "", "Target location for Audio Unit Plugins") - installCmd.Flags().Bool("binaries", false, "Enable linking of helper executables") - installCmd.Flags().String("bottle-arch", "", "Optimise bottles for the specified architecture") - installCmd.Flags().Bool("build-bottle", false, "Prepare the formula for eventual bottling during installation") - installCmd.Flags().BoolP("build-from-source", "s", false, "Compile formula from source even if a bottle is provided") - installCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - installCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - installCmd.Flags().Bool("cc", false, "Attempt to compile using the specified compiler") - installCmd.Flags().String("colorpickerdir", "", "Target location for Color Pickers") - installCmd.Flags().BoolP("debug", "d", false, "If brewing fails, open an interactive debugging session") - installCmd.Flags().String("dictionarydir", "", "Target location for Dictionaries (default:") - installCmd.Flags().Bool("display-times", false, "Print install times for each package at the end of the run") - installCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation of the formula is outdated") - installCmd.Flags().String("fontdir", "", "Target location for Fonts (default:") - installCmd.Flags().BoolP("force", "f", false, "Install formulae without checking for previously installed") - installCmd.Flags().Bool("force-bottle", false, "Install from a bottle even if it would not normally be used for installation") - installCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - installCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - installCmd.Flags().BoolP("git", "g", false, "Create a Git repository") - installCmd.Flags().BoolP("help", "h", false, "Show this message.") - installCmd.Flags().Bool("ignore-dependencies", false, "An unsupported Homebrew development flag to skip installing any dependencies") - installCmd.Flags().Bool("include-test", false, "Install testing dependencies required to run brew test formula") - installCmd.Flags().String("input-methoddir", "", "Target location for Input Methods (default:") - installCmd.Flags().BoolP("interactive", "i", false, "Download and patch formula, then open a shell") - installCmd.Flags().String("internet-plugindir", "", "Target location for Internet Plugins") - installCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation") - installCmd.Flags().String("language", "", "Comma-separated list of language codes to prefer for cask installation") - installCmd.Flags().String("mdimporterdir", "", "Target location for Spotlight Plugins") - installCmd.Flags().Bool("no-binaries", false, "Disable linking of helper executables") - installCmd.Flags().Bool("no-quarantine", false, "Disable quarantining of downloads") - installCmd.Flags().Bool("only-dependencies", false, "Install the dependencies with specified options") - installCmd.Flags().Bool("overwrite", false, "Delete files that already exist in the prefix while linking") - installCmd.Flags().String("prefpanedir", "", "Target location for Preference Panes") - installCmd.Flags().String("qlplugindir", "", "Target location for QuickLook Plugins") - installCmd.Flags().Bool("quarantine", false, "Enable quarantining of downloads") - installCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") + installCmd.Flags().Bool("HEAD", false, "If defines it, install the HEAD version, aka. main, trunk, unstable, master.") + installCmd.Flags().Bool("adopt", false, "Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`.") + installCmd.Flags().Bool("appdir", false, "Target location for Applications (default: `/Applications`).") + installCmd.Flags().Bool("audio-unit-plugindir", false, "Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`).") + installCmd.Flags().Bool("binaries", false, "Disable/enable linking of helper executables (default: enabled).") + installCmd.Flags().Bool("bottle-arch", false, "Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on.") + installCmd.Flags().Bool("build-bottle", false, "Prepare the formula for eventual bottling during installation, skipping any post-install steps.") + installCmd.Flags().Bool("build-from-source", false, "Compile from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available.") + installCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + installCmd.Flags().Bool("cc", false, "Attempt to compile using the specified , which should be the name of the compiler's executable, e.g. `gcc-7` for GCC 7. In order to use LLVM's clang, specify `llvm_clang`. To use the Apple-provided clang, specify `clang`. This option will only accept compilers that are provided by Homebrew or bundled with macOS. Please do not file issues if you encounter errors while using this option.") + installCmd.Flags().Bool("colorpickerdir", false, "Target location for Color Pickers (default: `~/Library/ColorPickers`).") + installCmd.Flags().Bool("debug", false, "If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.") + installCmd.Flags().Bool("debug-symbols", false, "Generate debug symbols on build. Source will be retained in a cache directory.") + installCmd.Flags().Bool("dictionarydir", false, "Target location for Dictionaries (default: `~/Library/Dictionaries`).") + installCmd.Flags().Bool("display-times", false, "Print install times for each package at the end of the run.") + installCmd.Flags().Bool("dry-run", false, "Show what would be installed, but do not actually install anything.") + installCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.") + installCmd.Flags().Bool("fontdir", false, "Target location for Fonts (default: `~/Library/Fonts`).") + installCmd.Flags().Bool("force", false, "Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask).") + installCmd.Flags().Bool("force-bottle", false, "Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation.") + installCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + installCmd.Flags().Bool("git", false, "Create a Git repository, useful for creating patches to the software.") + installCmd.Flags().Bool("help", false, "Show this message.") + installCmd.Flags().Bool("ignore-dependencies", false, "An unsupported Homebrew development option to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this option.") + installCmd.Flags().Bool("include-test", false, "Install testing dependencies required to run `brew test` .") + installCmd.Flags().Bool("input-methoddir", false, "Target location for Input Methods (default: `~/Library/Input Methods`).") + installCmd.Flags().Bool("interactive", false, "Download and patch , then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package.") + installCmd.Flags().Bool("internet-plugindir", false, "Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`).") + installCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation.") + installCmd.Flags().Bool("keyboard-layoutdir", false, "Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`).") + installCmd.Flags().Bool("language", false, "Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask's default language. The default value is the language of your system.") + installCmd.Flags().Bool("mdimporterdir", false, "Target location for Spotlight Plugins (default: `~/Library/Spotlight`).") + installCmd.Flags().Bool("no-binaries", false, "Disable/enable linking of helper executables (default: enabled).") + installCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + installCmd.Flags().Bool("only-dependencies", false, "Install the dependencies with specified options but do not install the formula itself.") + installCmd.Flags().Bool("overwrite", false, "Delete files that already exist in the prefix while linking.") + installCmd.Flags().Bool("prefpanedir", false, "Target location for Preference Panes (default: `~/Library/PreferencePanes`).") + installCmd.Flags().Bool("qlplugindir", false, "Target location for Quick Look Plugins (default: `~/Library/QuickLook`).") + installCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + installCmd.Flags().Bool("quiet", false, "Make some output more quiet.") installCmd.Flags().Bool("require-sha", false, "Require all casks to have a checksum.") - installCmd.Flags().String("screen-saverdir", "", "Target location for Screen Savers (default:") - installCmd.Flags().String("servicedir", "", "Target location for Services (default:") - installCmd.Flags().Bool("skip-cask-deps", false, "Skip installing cask dependencies") - installCmd.Flags().BoolP("verbose", "v", false, "Print the verification and postinstall steps") - installCmd.Flags().String("vst-plugindir", "", "Target location for VST Plugins (default:") - installCmd.Flags().String("vst3-plugindir", "", "Target location for VST3 Plugins (default:") + installCmd.Flags().Bool("screen-saverdir", false, "Target location for Screen Savers (default: `~/Library/Screen Savers`).") + installCmd.Flags().Bool("servicedir", false, "Target location for Services (default: `~/Library/Services`).") + installCmd.Flags().Bool("skip-cask-deps", false, "Skip installing cask dependencies.") + installCmd.Flags().Bool("skip-post-install", false, "Install but skip any post-install steps.") + installCmd.Flags().Bool("verbose", false, "Print the verification and post-install steps.") + installCmd.Flags().Bool("vst-plugindir", false, "Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`).") + installCmd.Flags().Bool("vst3-plugindir", false, "Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`).") + installCmd.Flags().Bool("zap", false, "For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*") rootCmd.AddCommand(installCmd) carapace.Gen(installCmd).FlagCompletion(carapace.ActionMap{ diff --git a/completers/brew_completer/cmd/installBundlerGems.go b/completers/brew_completer/cmd/installBundlerGems.go new file mode 100644 index 0000000000..607892daf1 --- /dev/null +++ b/completers/brew_completer/cmd/installBundlerGems.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var installBundlerGemsCmd = &cobra.Command{ + Use: "install-bundler-gems", + Short: "Install Homebrew's Bundler gems", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(installBundlerGemsCmd).Standalone() + + installBundlerGemsCmd.Flags().Bool("add-groups", false, "Installs the specified comma-separated list of gem groups, in addition to those already installed.") + installBundlerGemsCmd.Flags().Bool("debug", false, "Display any debugging information.") + installBundlerGemsCmd.Flags().Bool("groups", false, "Installs the specified comma-separated list of gem groups (default: last used). Replaces any previously installed groups.") + installBundlerGemsCmd.Flags().Bool("help", false, "Show this message.") + installBundlerGemsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + installBundlerGemsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(installBundlerGemsCmd) +} diff --git a/completers/brew_completer/cmd/irb.go b/completers/brew_completer/cmd/irb.go new file mode 100644 index 0000000000..6a82668e02 --- /dev/null +++ b/completers/brew_completer/cmd/irb.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var irbCmd = &cobra.Command{ + Use: "irb", + Short: "Enter the interactive Homebrew Ruby shell", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(irbCmd).Standalone() + + irbCmd.Flags().Bool("debug", false, "Display any debugging information.") + irbCmd.Flags().Bool("examples", false, "Show several examples.") + irbCmd.Flags().Bool("help", false, "Show this message.") + irbCmd.Flags().Bool("pry", false, "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set.") + irbCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + irbCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(irbCmd) +} diff --git a/completers/brew_completer/cmd/lc.go b/completers/brew_completer/cmd/lc.go new file mode 100644 index 0000000000..bebc7963af --- /dev/null +++ b/completers/brew_completer/cmd/lc.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var lcCmd = &cobra.Command{ + Use: "lc", + Short: "Check for newer versions of formulae and/or casks from upstream", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(lcCmd).Standalone() + + lcCmd.Flags().Bool("cask", false, "Only check casks.") + lcCmd.Flags().Bool("debug", false, "Display any debugging information.") + lcCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to check them.") + lcCmd.Flags().Bool("formula", false, "Only check formulae.") + lcCmd.Flags().Bool("full-name", false, "Print formulae and casks with fully-qualified names.") + lcCmd.Flags().Bool("help", false, "Show this message.") + lcCmd.Flags().Bool("installed", false, "Check formulae and casks that are currently installed.") + lcCmd.Flags().Bool("json", false, "Output information in JSON format.") + lcCmd.Flags().Bool("newer-only", false, "Show the latest version only if it's newer than the formula/cask.") + lcCmd.Flags().Bool("quiet", false, "Suppress warnings, don't print a progress bar for JSON output.") + lcCmd.Flags().Bool("resources", false, "Also check resources for formulae.") + lcCmd.Flags().Bool("tap", false, "Check formulae and casks within the given tap, specified as `/`.") + lcCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(lcCmd) +} diff --git a/completers/brew_completer/cmd/leaves.go b/completers/brew_completer/cmd/leaves.go new file mode 100644 index 0000000000..a1734ba2fb --- /dev/null +++ b/completers/brew_completer/cmd/leaves.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var leavesCmd = &cobra.Command{ + Use: "leaves", + Short: "List installed formulae that are not dependencies of another installed formula or cask", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(leavesCmd).Standalone() + + leavesCmd.Flags().Bool("debug", false, "Display any debugging information.") + leavesCmd.Flags().Bool("help", false, "Show this message.") + leavesCmd.Flags().Bool("installed-as-dependency", false, "Only list leaves that were installed as dependencies.") + leavesCmd.Flags().Bool("installed-on-request", false, "Only list leaves that were manually installed.") + leavesCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + leavesCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(leavesCmd) +} diff --git a/completers/brew_completer/cmd/link.go b/completers/brew_completer/cmd/link.go new file mode 100644 index 0000000000..6987e58b4c --- /dev/null +++ b/completers/brew_completer/cmd/link.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var linkCmd = &cobra.Command{ + Use: "link", + Short: "Symlink all of 's installed files into Homebrew's prefix", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(linkCmd).Standalone() + + linkCmd.Flags().Bool("HEAD", false, "Link the HEAD version of the formula if it is installed.") + linkCmd.Flags().Bool("debug", false, "Display any debugging information.") + linkCmd.Flags().Bool("dry-run", false, "List files which would be linked or deleted by `brew link --overwrite` without actually linking or deleting any files.") + linkCmd.Flags().Bool("force", false, "Allow keg-only formulae to be linked.") + linkCmd.Flags().Bool("help", false, "Show this message.") + linkCmd.Flags().Bool("overwrite", false, "Delete files that already exist in the prefix while linking.") + linkCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + linkCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(linkCmd) +} diff --git a/completers/brew_completer/cmd/linkage.go b/completers/brew_completer/cmd/linkage.go new file mode 100644 index 0000000000..880edb1b22 --- /dev/null +++ b/completers/brew_completer/cmd/linkage.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var linkageCmd = &cobra.Command{ + Use: "linkage", + Short: "Check the library links from the given kegs", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(linkageCmd).Standalone() + + linkageCmd.Flags().Bool("cached", false, "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous `brew linkage` run.") + linkageCmd.Flags().Bool("debug", false, "Display any debugging information.") + linkageCmd.Flags().Bool("help", false, "Show this message.") + linkageCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + linkageCmd.Flags().Bool("reverse", false, "For every library that a keg references, print its dylib path followed by the binaries that link to it.") + linkageCmd.Flags().Bool("strict", false, "Exit with a non-zero status if any undeclared dependencies with linkage are found.") + linkageCmd.Flags().Bool("test", false, "Show only missing libraries and exit with a non-zero status if any missing libraries are found.") + linkageCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(linkageCmd) +} diff --git a/completers/brew_completer/cmd/list.go b/completers/brew_completer/cmd/list.go index 85362844c7..8980aa2f04 100644 --- a/completers/brew_completer/cmd/list.go +++ b/completers/brew_completer/cmd/list.go @@ -7,31 +7,29 @@ import ( ) var listCmd = &cobra.Command{ - Use: "list", - Short: "List all installed formulae and casks", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "list", + Short: "List all installed formulae and casks", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(listCmd).Standalone() - listCmd.Flags().BoolS("1", "1", false, "Force output to be one entry per line") + listCmd.Flags().BoolS("1", "1", false, "Force output to be one entry per line. This is the default when output is not to a terminal.") listCmd.Flags().Bool("cask", false, "List only casks, or treat all named arguments as casks.") - listCmd.Flags().Bool("casks", false, "List only casks, or treat all named arguments as casks.") - listCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") + listCmd.Flags().Bool("debug", false, "Display any debugging information.") listCmd.Flags().Bool("formula", false, "List only formulae, or treat all named arguments as formulae.") - listCmd.Flags().Bool("formulae", false, "List only formulae, or treat all named arguments as formulae.") - listCmd.Flags().Bool("full-name", false, "Print formulae with fully-qualified names.") - listCmd.Flags().BoolP("help", "h", false, "Show this message.") - listCmd.Flags().BoolS("l", "l", false, "List formulae and/or casks in long format.") - listCmd.Flags().Bool("multiple", false, "Only show formulae with multiple versions installed") - listCmd.Flags().Bool("pinned", false, "List only pinned formulae") - listCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - listCmd.Flags().BoolS("r", "r", false, "Reverse the order of the formulae") - listCmd.Flags().BoolS("t", "t", false, "Sort formulae and/or casks by time modified") - listCmd.Flags().Bool("unbrewed", false, "List files in Homebrew's prefix not installed by Homebrew.") - listCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") - listCmd.Flags().Bool("versions", false, "Show the version number for installed formulae") + listCmd.Flags().Bool("full-name", false, "Print formulae with fully-qualified names. Unless `--full-name`, `--versions` or `--pinned` are passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output.") + listCmd.Flags().Bool("help", false, "Show this message.") + listCmd.Flags().BoolS("l", "l", false, "List formulae and/or casks in long format. Has no effect when a formula or cask name is passed as an argument.") + listCmd.Flags().Bool("multiple", false, "Only show formulae with multiple versions installed.") + listCmd.Flags().Bool("pinned", false, "List only pinned formulae, or only the specified (pinned) formulae if are provided. See also `pin`, `unpin`.") + listCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + listCmd.Flags().BoolS("r", "r", false, "Reverse the order of the formulae and/or casks sort to list the oldest entries first. Has no effect when a formula or cask name is passed as an argument.") + listCmd.Flags().BoolS("t", "t", false, "Sort formulae and/or casks by time modified, listing most recently modified first. Has no effect when a formula or cask name is passed as an argument.") + listCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + listCmd.Flags().Bool("versions", false, "Show the version number for installed formulae, or only the specified formulae if are provided.") rootCmd.AddCommand(listCmd) carapace.Gen(listCmd).PositionalAnyCompletion( diff --git a/completers/brew_completer/cmd/livecheck.go b/completers/brew_completer/cmd/livecheck.go new file mode 100644 index 0000000000..9894077e86 --- /dev/null +++ b/completers/brew_completer/cmd/livecheck.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var livecheckCmd = &cobra.Command{ + Use: "livecheck", + Short: "Check for newer versions of formulae and/or casks from upstream", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(livecheckCmd).Standalone() + + livecheckCmd.Flags().Bool("cask", false, "Only check casks.") + livecheckCmd.Flags().Bool("debug", false, "Display any debugging information.") + livecheckCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to check them.") + livecheckCmd.Flags().Bool("formula", false, "Only check formulae.") + livecheckCmd.Flags().Bool("full-name", false, "Print formulae and casks with fully-qualified names.") + livecheckCmd.Flags().Bool("help", false, "Show this message.") + livecheckCmd.Flags().Bool("installed", false, "Check formulae and casks that are currently installed.") + livecheckCmd.Flags().Bool("json", false, "Output information in JSON format.") + livecheckCmd.Flags().Bool("newer-only", false, "Show the latest version only if it's newer than the formula/cask.") + livecheckCmd.Flags().Bool("quiet", false, "Suppress warnings, don't print a progress bar for JSON output.") + livecheckCmd.Flags().Bool("resources", false, "Also check resources for formulae.") + livecheckCmd.Flags().Bool("tap", false, "Check formulae and casks within the given tap, specified as `/`.") + livecheckCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(livecheckCmd) +} diff --git a/completers/brew_completer/cmd/ln.go b/completers/brew_completer/cmd/ln.go new file mode 100644 index 0000000000..18dc3d13b6 --- /dev/null +++ b/completers/brew_completer/cmd/ln.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var lnCmd = &cobra.Command{ + Use: "ln", + Short: "Symlink all of 's installed files into Homebrew's prefix", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(lnCmd).Standalone() + + lnCmd.Flags().Bool("HEAD", false, "Link the HEAD version of the formula if it is installed.") + lnCmd.Flags().Bool("debug", false, "Display any debugging information.") + lnCmd.Flags().Bool("dry-run", false, "List files which would be linked or deleted by `brew link --overwrite` without actually linking or deleting any files.") + lnCmd.Flags().Bool("force", false, "Allow keg-only formulae to be linked.") + lnCmd.Flags().Bool("help", false, "Show this message.") + lnCmd.Flags().Bool("overwrite", false, "Delete files that already exist in the prefix while linking.") + lnCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + lnCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(lnCmd) +} diff --git a/completers/brew_completer/cmd/log.go b/completers/brew_completer/cmd/log.go new file mode 100644 index 0000000000..100c583583 --- /dev/null +++ b/completers/brew_completer/cmd/log.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var logCmd = &cobra.Command{ + Use: "log", + Short: "Show the `git log` for or , or show the log for the Homebrew repository if no formula or cask is provided", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(logCmd).Standalone() + + logCmd.Flags().BoolS("1", "1", false, "Print only one commit.") + logCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + logCmd.Flags().Bool("debug", false, "Display any debugging information.") + logCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + logCmd.Flags().Bool("help", false, "Show this message.") + logCmd.Flags().Bool("max-count", false, "Print only a specified number of commits.") + logCmd.Flags().Bool("oneline", false, "Print only one line per commit.") + logCmd.Flags().Bool("patch", false, "Also print patch from commit.") + logCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + logCmd.Flags().Bool("stat", false, "Also print diffstat from commit.") + logCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(logCmd) +} diff --git a/completers/brew_completer/cmd/ls.go b/completers/brew_completer/cmd/ls.go new file mode 100644 index 0000000000..7ddba6f582 --- /dev/null +++ b/completers/brew_completer/cmd/ls.go @@ -0,0 +1,32 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var lsCmd = &cobra.Command{ + Use: "ls", + Short: "List all installed formulae and casks", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(lsCmd).Standalone() + + lsCmd.Flags().BoolS("1", "1", false, "Force output to be one entry per line. This is the default when output is not to a terminal.") + lsCmd.Flags().Bool("cask", false, "List only casks, or treat all named arguments as casks.") + lsCmd.Flags().Bool("debug", false, "Display any debugging information.") + lsCmd.Flags().Bool("formula", false, "List only formulae, or treat all named arguments as formulae.") + lsCmd.Flags().Bool("full-name", false, "Print formulae with fully-qualified names. Unless `--full-name`, `--versions` or `--pinned` are passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output.") + lsCmd.Flags().Bool("help", false, "Show this message.") + lsCmd.Flags().BoolS("l", "l", false, "List formulae and/or casks in long format. Has no effect when a formula or cask name is passed as an argument.") + lsCmd.Flags().Bool("multiple", false, "Only show formulae with multiple versions installed.") + lsCmd.Flags().Bool("pinned", false, "List only pinned formulae, or only the specified (pinned) formulae if are provided. See also `pin`, `unpin`.") + lsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + lsCmd.Flags().BoolS("r", "r", false, "Reverse the order of the formulae and/or casks sort to list the oldest entries first. Has no effect when a formula or cask name is passed as an argument.") + lsCmd.Flags().BoolS("t", "t", false, "Sort formulae and/or casks by time modified, listing most recently modified first. Has no effect when a formula or cask name is passed as an argument.") + lsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + lsCmd.Flags().Bool("versions", false, "Show the version number for installed formulae, or only the specified formulae if are provided.") + rootCmd.AddCommand(lsCmd) +} diff --git a/completers/brew_completer/cmd/migrate.go b/completers/brew_completer/cmd/migrate.go new file mode 100644 index 0000000000..b1edb54697 --- /dev/null +++ b/completers/brew_completer/cmd/migrate.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var migrateCmd = &cobra.Command{ + Use: "migrate", + Short: "Migrate renamed packages to new names, where are old names of packages", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(migrateCmd).Standalone() + + migrateCmd.Flags().Bool("cask", false, "Only migrate casks.") + migrateCmd.Flags().Bool("debug", false, "Display any debugging information.") + migrateCmd.Flags().Bool("dry-run", false, "Show what would be migrated, but do not actually migrate anything.") + migrateCmd.Flags().Bool("force", false, "Treat installed and provided as if they are from the same taps and migrate them anyway.") + migrateCmd.Flags().Bool("formula", false, "Only migrate formulae.") + migrateCmd.Flags().Bool("help", false, "Show this message.") + migrateCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + migrateCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(migrateCmd) +} diff --git a/completers/brew_completer/cmd/missing.go b/completers/brew_completer/cmd/missing.go new file mode 100644 index 0000000000..79280f8684 --- /dev/null +++ b/completers/brew_completer/cmd/missing.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var missingCmd = &cobra.Command{ + Use: "missing", + Short: "Check the given kegs for missing dependencies", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(missingCmd).Standalone() + + missingCmd.Flags().Bool("debug", false, "Display any debugging information.") + missingCmd.Flags().Bool("help", false, "Show this message.") + missingCmd.Flags().Bool("hide", false, "Act as if none of the specified are installed. should be a comma-separated list of formulae.") + missingCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + missingCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(missingCmd) +} diff --git a/completers/brew_completer/cmd/nodenvSync.go b/completers/brew_completer/cmd/nodenvSync.go new file mode 100644 index 0000000000..05e4b6822a --- /dev/null +++ b/completers/brew_completer/cmd/nodenvSync.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var nodenvSyncCmd = &cobra.Command{ + Use: "nodenv-sync", + Short: "Create symlinks for Homebrew's installed NodeJS versions in `~/.nodenv/versions`", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(nodenvSyncCmd).Standalone() + + nodenvSyncCmd.Flags().Bool("debug", false, "Display any debugging information.") + nodenvSyncCmd.Flags().Bool("help", false, "Show this message.") + nodenvSyncCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + nodenvSyncCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(nodenvSyncCmd) +} diff --git a/completers/brew_completer/cmd/options.go b/completers/brew_completer/cmd/options.go new file mode 100644 index 0000000000..04c89ae1b8 --- /dev/null +++ b/completers/brew_completer/cmd/options.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var optionsCmd = &cobra.Command{ + Use: "options", + Short: "Show install options specific to ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(optionsCmd).Standalone() + + optionsCmd.Flags().Bool("command", false, "Show options for the specified .") + optionsCmd.Flags().Bool("compact", false, "Show all options on a single line separated by spaces.") + optionsCmd.Flags().Bool("debug", false, "Display any debugging information.") + optionsCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to show their options.") + optionsCmd.Flags().Bool("help", false, "Show this message.") + optionsCmd.Flags().Bool("installed", false, "Show options for formulae that are currently installed.") + optionsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + optionsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(optionsCmd) +} diff --git a/completers/brew_completer/cmd/outdated.go b/completers/brew_completer/cmd/outdated.go new file mode 100644 index 0000000000..1133a45340 --- /dev/null +++ b/completers/brew_completer/cmd/outdated.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var outdatedCmd = &cobra.Command{ + Use: "outdated", + Short: "List installed casks and formulae that have an updated version available", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(outdatedCmd).Standalone() + + outdatedCmd.Flags().Bool("cask", false, "List only outdated casks.") + outdatedCmd.Flags().Bool("debug", false, "Display any debugging information.") + outdatedCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.") + outdatedCmd.Flags().Bool("formula", false, "List only outdated formulae.") + outdatedCmd.Flags().Bool("greedy", false, "Also include outdated casks with `auto_updates true` or `version :latest`.") + outdatedCmd.Flags().Bool("greedy-auto-updates", false, "Also include outdated casks including those with `auto_updates true`.") + outdatedCmd.Flags().Bool("greedy-latest", false, "Also include outdated casks including those with `version :latest`.") + outdatedCmd.Flags().Bool("help", false, "Show this message.") + outdatedCmd.Flags().Bool("json", false, "Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated formulae and casks.") + outdatedCmd.Flags().Bool("quiet", false, "List only the names of outdated kegs (takes precedence over `--verbose`).") + outdatedCmd.Flags().Bool("verbose", false, "Include detailed version information.") + rootCmd.AddCommand(outdatedCmd) +} diff --git a/completers/brew_completer/cmd/pin.go b/completers/brew_completer/cmd/pin.go new file mode 100644 index 0000000000..f1d5f8ac7a --- /dev/null +++ b/completers/brew_completer/cmd/pin.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var pinCmd = &cobra.Command{ + Use: "pin", + Short: "Pin the specified , preventing them from being upgraded when issuing the `brew upgrade` command", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(pinCmd).Standalone() + + pinCmd.Flags().Bool("debug", false, "Display any debugging information.") + pinCmd.Flags().Bool("help", false, "Show this message.") + pinCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + pinCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(pinCmd) +} diff --git a/completers/brew_completer/cmd/post_install.go b/completers/brew_completer/cmd/post_install.go new file mode 100644 index 0000000000..932b1f4978 --- /dev/null +++ b/completers/brew_completer/cmd/post_install.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var post_installCmd = &cobra.Command{ + Use: "post_install", + Short: "Rerun the post-install steps for ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(post_installCmd).Standalone() + + post_installCmd.Flags().Bool("debug", false, "Display any debugging information.") + post_installCmd.Flags().Bool("help", false, "Show this message.") + post_installCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + post_installCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(post_installCmd) +} diff --git a/completers/brew_completer/cmd/postgresqlUpgradeDatabase.go b/completers/brew_completer/cmd/postgresqlUpgradeDatabase.go new file mode 100644 index 0000000000..97b0b4d887 --- /dev/null +++ b/completers/brew_completer/cmd/postgresqlUpgradeDatabase.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var postgresqlUpgradeDatabaseCmd = &cobra.Command{ + Use: "postgresql-upgrade-database", + Short: "Upgrades the database for the `postgresql` formula", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(postgresqlUpgradeDatabaseCmd).Standalone() + + postgresqlUpgradeDatabaseCmd.Flags().Bool("debug", false, "Display any debugging information.") + postgresqlUpgradeDatabaseCmd.Flags().Bool("help", false, "Show this message.") + postgresqlUpgradeDatabaseCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + postgresqlUpgradeDatabaseCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(postgresqlUpgradeDatabaseCmd) +} diff --git a/completers/brew_completer/cmd/postinstall.go b/completers/brew_completer/cmd/postinstall.go new file mode 100644 index 0000000000..28b23726d3 --- /dev/null +++ b/completers/brew_completer/cmd/postinstall.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var postinstallCmd = &cobra.Command{ + Use: "postinstall", + Short: "Rerun the post-install steps for ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(postinstallCmd).Standalone() + + postinstallCmd.Flags().Bool("debug", false, "Display any debugging information.") + postinstallCmd.Flags().Bool("help", false, "Show this message.") + postinstallCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + postinstallCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(postinstallCmd) +} diff --git a/completers/brew_completer/cmd/prAutomerge.go b/completers/brew_completer/cmd/prAutomerge.go new file mode 100644 index 0000000000..f0c8096662 --- /dev/null +++ b/completers/brew_completer/cmd/prAutomerge.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var prAutomergeCmd = &cobra.Command{ + Use: "pr-automerge", + Short: "Find pull requests that can be automatically merged using `brew pr-publish`", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(prAutomergeCmd).Standalone() + + prAutomergeCmd.Flags().Bool("autosquash", false, "Instruct `brew pr-publish` to automatically reformat and reword commits in the pull request to the preferred format.") + prAutomergeCmd.Flags().Bool("debug", false, "Display any debugging information.") + prAutomergeCmd.Flags().Bool("help", false, "Show this message.") + prAutomergeCmd.Flags().Bool("ignore-failures", false, "Include pull requests that have failing status checks.") + prAutomergeCmd.Flags().Bool("publish", false, "Run `brew pr-publish` on matching pull requests.") + prAutomergeCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + prAutomergeCmd.Flags().Bool("tap", false, "Target tap repository (default: `homebrew/core`).") + prAutomergeCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + prAutomergeCmd.Flags().Bool("with-label", false, "Pull requests must have this label.") + prAutomergeCmd.Flags().Bool("without-approval", false, "Pull requests do not require approval to be merged.") + prAutomergeCmd.Flags().Bool("without-labels", false, "Pull requests must not have these labels (default: `do not merge`, `new formula`, `automerge-skip`, `pre-release`, `CI-published-bottle-commits`).") + prAutomergeCmd.Flags().Bool("workflow", false, "Workflow file to use with `brew pr-publish`.") + rootCmd.AddCommand(prAutomergeCmd) +} diff --git a/completers/brew_completer/cmd/prPublish.go b/completers/brew_completer/cmd/prPublish.go new file mode 100644 index 0000000000..c5f9639673 --- /dev/null +++ b/completers/brew_completer/cmd/prPublish.go @@ -0,0 +1,28 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var prPublishCmd = &cobra.Command{ + Use: "pr-publish", + Short: "Publish bottles for a pull request with GitHub Actions", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(prPublishCmd).Standalone() + + prPublishCmd.Flags().Bool("autosquash", false, "If supported on the target tap, automatically reformat and reword commits to our preferred format.") + prPublishCmd.Flags().Bool("branch", false, "Branch to use the workflow from (default: `master`).") + prPublishCmd.Flags().Bool("debug", false, "Display any debugging information.") + prPublishCmd.Flags().Bool("help", false, "Show this message.") + prPublishCmd.Flags().Bool("large-runner", false, "Run the upload job on a large runner.") + prPublishCmd.Flags().Bool("message", false, "Message to include when autosquashing revision bumps, deletions, and rebuilds.") + prPublishCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + prPublishCmd.Flags().Bool("tap", false, "Target tap repository (default: `homebrew/core`).") + prPublishCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + prPublishCmd.Flags().Bool("workflow", false, "Target workflow filename (default: `publish-commit-bottles.yml`).") + rootCmd.AddCommand(prPublishCmd) +} diff --git a/completers/brew_completer/cmd/prPull.go b/completers/brew_completer/cmd/prPull.go new file mode 100644 index 0000000000..1a4d66a35e --- /dev/null +++ b/completers/brew_completer/cmd/prPull.go @@ -0,0 +1,41 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var prPullCmd = &cobra.Command{ + Use: "pr-pull", + Short: "Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(prPullCmd).Standalone() + + prPullCmd.Flags().Bool("artifact", false, "Download artifacts with the specified name (default: `bottles`).") + prPullCmd.Flags().Bool("autosquash", false, "Automatically reformat and reword commits in the pull request to our preferred format.") + prPullCmd.Flags().Bool("branch-okay", false, "Do not warn if pulling to a branch besides the repository default (useful for testing).") + prPullCmd.Flags().Bool("clean", false, "Do not amend the commits from pull requests.") + prPullCmd.Flags().Bool("committer", false, "Specify a committer name and email in `git`'s standard author format.") + prPullCmd.Flags().Bool("debug", false, "Display any debugging information.") + prPullCmd.Flags().Bool("dry-run", false, "Print what would be done rather than doing it.") + prPullCmd.Flags().Bool("help", false, "Show this message.") + prPullCmd.Flags().Bool("ignore-missing-artifacts", false, "Comma-separated list of workflows which can be ignored if they have not been run.") + prPullCmd.Flags().Bool("keep-old", false, "If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.") + prPullCmd.Flags().Bool("message", false, "Message to include when autosquashing revision bumps, deletions, and rebuilds.") + prPullCmd.Flags().Bool("no-cherry-pick", false, "Do not cherry-pick commits from the pull request branch.") + prPullCmd.Flags().Bool("no-commit", false, "Do not generate a new commit before uploading.") + prPullCmd.Flags().Bool("no-upload", false, "Download the bottles but don't upload them.") + prPullCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + prPullCmd.Flags().Bool("resolve", false, "When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.") + prPullCmd.Flags().Bool("retain-bottle-dir", false, "Does not clean up the tmp directory for the bottle so it can be used later.") + prPullCmd.Flags().Bool("root-url", false, "Use the specified as the root of the bottle's URL instead of Homebrew's default.") + prPullCmd.Flags().Bool("root-url-using", false, "Use the specified download strategy class for downloading the bottle's URL instead of Homebrew's default.") + prPullCmd.Flags().Bool("tap", false, "Target tap repository (default: `homebrew/core`).") + prPullCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + prPullCmd.Flags().Bool("warn-on-upload-failure", false, "Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed.") + prPullCmd.Flags().Bool("workflows", false, "Retrieve artifacts from the specified workflow (default: `tests.yml`). Can be a comma-separated list to include multiple workflows.") + rootCmd.AddCommand(prPullCmd) +} diff --git a/completers/brew_completer/cmd/prUpload.go b/completers/brew_completer/cmd/prUpload.go new file mode 100644 index 0000000000..871cedf9e8 --- /dev/null +++ b/completers/brew_completer/cmd/prUpload.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var prUploadCmd = &cobra.Command{ + Use: "pr-upload", + Short: "Apply the bottle commit and publish bottles to a host", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(prUploadCmd).Standalone() + + prUploadCmd.Flags().Bool("committer", false, "Specify a committer name and email in `git`'s standard author format.") + prUploadCmd.Flags().Bool("debug", false, "Display any debugging information.") + prUploadCmd.Flags().Bool("dry-run", false, "Print what would be done rather than doing it.") + prUploadCmd.Flags().Bool("help", false, "Show this message.") + prUploadCmd.Flags().Bool("keep-old", false, "If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.") + prUploadCmd.Flags().Bool("no-commit", false, "Do not generate a new commit before uploading.") + prUploadCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + prUploadCmd.Flags().Bool("root-url", false, "Use the specified as the root of the bottle's URL instead of Homebrew's default.") + prUploadCmd.Flags().Bool("root-url-using", false, "Use the specified download strategy class for downloading the bottle's URL instead of Homebrew's default.") + prUploadCmd.Flags().Bool("upload-only", false, "Skip running `brew bottle` before uploading.") + prUploadCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + prUploadCmd.Flags().Bool("warn-on-upload-failure", false, "Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed.") + rootCmd.AddCommand(prUploadCmd) +} diff --git a/completers/brew_completer/cmd/prof.go b/completers/brew_completer/cmd/prof.go new file mode 100644 index 0000000000..f420dd6c7c --- /dev/null +++ b/completers/brew_completer/cmd/prof.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var profCmd = &cobra.Command{ + Use: "prof", + Short: "Run Homebrew with a Ruby profiler", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(profCmd).Standalone() + + profCmd.Flags().Bool("debug", false, "Display any debugging information.") + profCmd.Flags().Bool("help", false, "Show this message.") + profCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + profCmd.Flags().Bool("stackprof", false, "Use `stackprof` instead of `ruby-prof` (the default).") + profCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(profCmd) +} diff --git a/completers/brew_completer/cmd/pyenvSync.go b/completers/brew_completer/cmd/pyenvSync.go new file mode 100644 index 0000000000..10c50f7a5c --- /dev/null +++ b/completers/brew_completer/cmd/pyenvSync.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var pyenvSyncCmd = &cobra.Command{ + Use: "pyenv-sync", + Short: "Create symlinks for Homebrew's installed Python versions in `~/.pyenv/versions`", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(pyenvSyncCmd).Standalone() + + pyenvSyncCmd.Flags().Bool("debug", false, "Display any debugging information.") + pyenvSyncCmd.Flags().Bool("help", false, "Show this message.") + pyenvSyncCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + pyenvSyncCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(pyenvSyncCmd) +} diff --git a/completers/brew_completer/cmd/rbenvSync.go b/completers/brew_completer/cmd/rbenvSync.go new file mode 100644 index 0000000000..5eb75e02df --- /dev/null +++ b/completers/brew_completer/cmd/rbenvSync.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var rbenvSyncCmd = &cobra.Command{ + Use: "rbenv-sync", + Short: "Create symlinks for Homebrew's installed Ruby versions in `~/.rbenv/versions`", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(rbenvSyncCmd).Standalone() + + rbenvSyncCmd.Flags().Bool("debug", false, "Display any debugging information.") + rbenvSyncCmd.Flags().Bool("help", false, "Show this message.") + rbenvSyncCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + rbenvSyncCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(rbenvSyncCmd) +} diff --git a/completers/brew_completer/cmd/readall.go b/completers/brew_completer/cmd/readall.go new file mode 100644 index 0000000000..5762eae1b2 --- /dev/null +++ b/completers/brew_completer/cmd/readall.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var readallCmd = &cobra.Command{ + Use: "readall", + Short: "Import all items from the specified , or from all installed taps if none is provided", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(readallCmd).Standalone() + + readallCmd.Flags().Bool("aliases", false, "Verify any alias symlinks in each tap.") + readallCmd.Flags().Bool("arch", false, "Read using the given CPU architecture. (Pass `all` to simulate all architectures.)") + readallCmd.Flags().Bool("debug", false, "Display any debugging information.") + readallCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not. Implied if `HOMEBREW_EVAL_ALL` is set.") + readallCmd.Flags().Bool("help", false, "Show this message.") + readallCmd.Flags().Bool("no-simulate", false, "Don't simulate other system configurations when checking formulae and casks.") + readallCmd.Flags().Bool("os", false, "Read using the given operating system. (Pass `all` to simulate all operating systems.)") + readallCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + readallCmd.Flags().Bool("syntax", false, "Syntax-check all of Homebrew's Ruby files (if no is passed).") + readallCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(readallCmd) +} diff --git a/completers/brew_completer/cmd/reinstall.go b/completers/brew_completer/cmd/reinstall.go new file mode 100644 index 0000000000..6076fbe2f6 --- /dev/null +++ b/completers/brew_completer/cmd/reinstall.go @@ -0,0 +1,57 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reinstallCmd = &cobra.Command{ + Use: "reinstall", + Short: "Uninstall and then reinstall a or using the same options it was originally installed with, plus any appended options specific to a ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reinstallCmd).Standalone() + + reinstallCmd.Flags().Bool("adopt", false, "Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`.") + reinstallCmd.Flags().Bool("appdir", false, "Target location for Applications (default: `/Applications`).") + reinstallCmd.Flags().Bool("audio-unit-plugindir", false, "Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`).") + reinstallCmd.Flags().Bool("binaries", false, "Disable/enable linking of helper executables (default: enabled).") + reinstallCmd.Flags().Bool("build-from-source", false, "Compile from source even if a bottle is available.") + reinstallCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + reinstallCmd.Flags().Bool("colorpickerdir", false, "Target location for Color Pickers (default: `~/Library/ColorPickers`).") + reinstallCmd.Flags().Bool("debug", false, "If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.") + reinstallCmd.Flags().Bool("debug-symbols", false, "Generate debug symbols on build. Source will be retained in a cache directory.") + reinstallCmd.Flags().Bool("dictionarydir", false, "Target location for Dictionaries (default: `~/Library/Dictionaries`).") + reinstallCmd.Flags().Bool("display-times", false, "Print install times for each formula at the end of the run.") + reinstallCmd.Flags().Bool("fontdir", false, "Target location for Fonts (default: `~/Library/Fonts`).") + reinstallCmd.Flags().Bool("force", false, "Install without checking for previously installed keg-only or non-migrated versions.") + reinstallCmd.Flags().Bool("force-bottle", false, "Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation.") + reinstallCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + reinstallCmd.Flags().Bool("git", false, "Create a Git repository, useful for creating patches to the software.") + reinstallCmd.Flags().Bool("help", false, "Show this message.") + reinstallCmd.Flags().Bool("input-methoddir", false, "Target location for Input Methods (default: `~/Library/Input Methods`).") + reinstallCmd.Flags().Bool("interactive", false, "Download and patch , then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package.") + reinstallCmd.Flags().Bool("internet-plugindir", false, "Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`).") + reinstallCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation.") + reinstallCmd.Flags().Bool("keyboard-layoutdir", false, "Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`).") + reinstallCmd.Flags().Bool("language", false, "Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask's default language. The default value is the language of your system.") + reinstallCmd.Flags().Bool("mdimporterdir", false, "Target location for Spotlight Plugins (default: `~/Library/Spotlight`).") + reinstallCmd.Flags().Bool("no-binaries", false, "Disable/enable linking of helper executables (default: enabled).") + reinstallCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + reinstallCmd.Flags().Bool("prefpanedir", false, "Target location for Preference Panes (default: `~/Library/PreferencePanes`).") + reinstallCmd.Flags().Bool("qlplugindir", false, "Target location for Quick Look Plugins (default: `~/Library/QuickLook`).") + reinstallCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + reinstallCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + reinstallCmd.Flags().Bool("require-sha", false, "Require all casks to have a checksum.") + reinstallCmd.Flags().Bool("screen-saverdir", false, "Target location for Screen Savers (default: `~/Library/Screen Savers`).") + reinstallCmd.Flags().Bool("servicedir", false, "Target location for Services (default: `~/Library/Services`).") + reinstallCmd.Flags().Bool("skip-cask-deps", false, "Skip installing cask dependencies.") + reinstallCmd.Flags().Bool("verbose", false, "Print the verification and post-install steps.") + reinstallCmd.Flags().Bool("vst-plugindir", false, "Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`).") + reinstallCmd.Flags().Bool("vst3-plugindir", false, "Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`).") + reinstallCmd.Flags().Bool("zap", false, "For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*") + rootCmd.AddCommand(reinstallCmd) +} diff --git a/completers/brew_completer/cmd/release.go b/completers/brew_completer/cmd/release.go new file mode 100644 index 0000000000..2803877f45 --- /dev/null +++ b/completers/brew_completer/cmd/release.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var releaseCmd = &cobra.Command{ + Use: "release", + Short: "Create a new draft Homebrew/brew release with the appropriate version number and release notes", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(releaseCmd).Standalone() + + releaseCmd.Flags().Bool("debug", false, "Display any debugging information.") + releaseCmd.Flags().Bool("help", false, "Show this message.") + releaseCmd.Flags().Bool("major", false, "Create a major release.") + releaseCmd.Flags().Bool("minor", false, "Create a minor release.") + releaseCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + releaseCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(releaseCmd) +} diff --git a/completers/brew_completer/cmd/remove.go b/completers/brew_completer/cmd/remove.go new file mode 100644 index 0000000000..5b48f2d0d4 --- /dev/null +++ b/completers/brew_completer/cmd/remove.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var removeCmd = &cobra.Command{ + Use: "remove", + Short: "Uninstall a or ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(removeCmd).Standalone() + + removeCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + removeCmd.Flags().Bool("debug", false, "Display any debugging information.") + removeCmd.Flags().Bool("force", false, "Delete all installed versions of . Uninstall even if is not installed, overwrite existing files and ignore errors when removing files.") + removeCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + removeCmd.Flags().Bool("help", false, "Show this message.") + removeCmd.Flags().Bool("ignore-dependencies", false, "Don't fail uninstall, even if is a dependency of any installed formulae.") + removeCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + removeCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + removeCmd.Flags().Bool("zap", false, "Remove all files associated with a . *May remove files which are shared between applications.*") + rootCmd.AddCommand(removeCmd) +} diff --git a/completers/brew_completer/cmd/rm.go b/completers/brew_completer/cmd/rm.go new file mode 100644 index 0000000000..2a4953b1fe --- /dev/null +++ b/completers/brew_completer/cmd/rm.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var rmCmd = &cobra.Command{ + Use: "rm", + Short: "Uninstall a or ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(rmCmd).Standalone() + + rmCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + rmCmd.Flags().Bool("debug", false, "Display any debugging information.") + rmCmd.Flags().Bool("force", false, "Delete all installed versions of . Uninstall even if is not installed, overwrite existing files and ignore errors when removing files.") + rmCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + rmCmd.Flags().Bool("help", false, "Show this message.") + rmCmd.Flags().Bool("ignore-dependencies", false, "Don't fail uninstall, even if is a dependency of any installed formulae.") + rmCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + rmCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rmCmd.Flags().Bool("zap", false, "Remove all files associated with a . *May remove files which are shared between applications.*") + rootCmd.AddCommand(rmCmd) +} diff --git a/completers/brew_completer/cmd/root.go b/completers/brew_completer/cmd/root.go index c31fb9dfc4..73fce1c1df 100644 --- a/completers/brew_completer/cmd/root.go +++ b/completers/brew_completer/cmd/root.go @@ -2,6 +2,7 @@ package cmd import ( "github.com/rsteube/carapace" + "github.com/rsteube/carapace-bin/pkg/util/embed" "github.com/spf13/cobra" ) @@ -15,7 +16,26 @@ var rootCmd = &cobra.Command{ func Execute() error { return rootCmd.Execute() } + func init() { carapace.Gen(rootCmd).Standalone() + rootCmd.AddGroup( + &cobra.Group{ID: "main", Title: "main commands"}, + &cobra.Group{ID: "developer", Title: "developer commands"}, + &cobra.Group{ID: "external", Title: "external commands"}, + ) + + embed.SubcommandsAsFlags(rootCmd, + flagCacheCmd, + flagCaskroomCmd, + flagCellarCmd, + flagConfigCmd, + flagEnvCmd, + flagPrefixCmd, + flagRepoCmd, + flagRepositoryCmd, + ) + embed.SubcommandsAsFlagsS(rootCmd, flagSCmd) + // TODO external commands } diff --git a/completers/brew_completer/cmd/ruby.go b/completers/brew_completer/cmd/ruby.go new file mode 100644 index 0000000000..aee9c7ee1b --- /dev/null +++ b/completers/brew_completer/cmd/ruby.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var rubyCmd = &cobra.Command{ + Use: "ruby", + Short: "Run a Ruby instance with Homebrew's libraries loaded", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(rubyCmd).Standalone() + + rubyCmd.Flags().Bool("debug", false, "Display any debugging information.") + rubyCmd.Flags().BoolS("e", "e", false, "Execute the given text string as a script.") + rubyCmd.Flags().Bool("help", false, "Show this message.") + rubyCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + rubyCmd.Flags().BoolS("r", "r", false, "Load a library using `require`.") + rubyCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(rubyCmd) +} diff --git a/completers/brew_completer/cmd/search.go b/completers/brew_completer/cmd/search.go index ea859b77a3..c54425eadc 100644 --- a/completers/brew_completer/cmd/search.go +++ b/completers/brew_completer/cmd/search.go @@ -5,32 +5,34 @@ import ( "github.com/spf13/cobra" ) -var Cmd = &cobra.Command{ - Use: "search", - Short: "Perform a substring search of cask tokens and formula names", - Run: func(cmd *cobra.Command, args []string) {}, +var searchCmd = &cobra.Command{ + Use: "search", + Short: "Perform a substring search of cask tokens and formula names for ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { - carapace.Gen(Cmd).Standalone() + carapace.Gen(searchCmd).Standalone() - Cmd.Flags().Bool("archlinux", false, "Search for text in the given database.") - Cmd.Flags().String("cask", "", "Search online and locally for casks.") - Cmd.Flags().Bool("closed", false, "Search for only closed GitHub pull requests.") - Cmd.Flags().Bool("debian", false, "Search for text in the given database.") - Cmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - Cmd.Flags().Bool("desc", false, "Search for formulae with a description") - Cmd.Flags().Bool("fedora", false, "Search for text in the given database.") - Cmd.Flags().Bool("fink", false, "Search for text in the given database.") - Cmd.Flags().String("formula", "", "Search online and locally for formulae.") - Cmd.Flags().BoolP("help", "h", false, "Show this message.") - Cmd.Flags().Bool("macports", false, "Search for text in the given database.") - Cmd.Flags().Bool("open", false, "Search for only open GitHub pull requests.") - Cmd.Flags().Bool("opensuse", false, "Search for text in the given database.") - Cmd.Flags().Bool("pull-request", false, "Search for GitHub pull requests containing") - Cmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - Cmd.Flags().Bool("repology", false, "Search for text in the given database.") - Cmd.Flags().Bool("ubuntu", false, "Search for text in the given database.") - Cmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") - rootCmd.AddCommand(Cmd) + searchCmd.Flags().Bool("archlinux", false, "Search for in the given database.") + searchCmd.Flags().Bool("cask", false, "Search for casks.") + searchCmd.Flags().Bool("closed", false, "Search for only closed GitHub pull requests.") + searchCmd.Flags().Bool("debian", false, "Search for in the given database.") + searchCmd.Flags().Bool("debug", false, "Display any debugging information.") + searchCmd.Flags().Bool("desc", false, "Search for formulae with a description matching and casks with a name or description matching .") + searchCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `HOMEBREW_EVAL_ALL` is set.") + searchCmd.Flags().Bool("fedora", false, "Search for in the given database.") + searchCmd.Flags().Bool("fink", false, "Search for in the given database.") + searchCmd.Flags().Bool("formula", false, "Search for formulae.") + searchCmd.Flags().Bool("help", false, "Show this message.") + searchCmd.Flags().Bool("macports", false, "Search for in the given database.") + searchCmd.Flags().Bool("open", false, "Search for only open GitHub pull requests.") + searchCmd.Flags().Bool("opensuse", false, "Search for in the given database.") + searchCmd.Flags().Bool("pull-request", false, "Search for GitHub pull requests containing .") + searchCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + searchCmd.Flags().Bool("repology", false, "Search for in the given database.") + searchCmd.Flags().Bool("ubuntu", false, "Search for in the given database.") + searchCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(searchCmd) } diff --git a/completers/brew_completer/cmd/sh.go b/completers/brew_completer/cmd/sh.go new file mode 100644 index 0000000000..8d12fb4590 --- /dev/null +++ b/completers/brew_completer/cmd/sh.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var shCmd = &cobra.Command{ + Use: "sh", + Short: "Enter an interactive shell for Homebrew's build environment", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(shCmd).Standalone() + + shCmd.Flags().Bool("cmd", false, "Execute commands in a non-interactive shell.") + shCmd.Flags().Bool("debug", false, "Display any debugging information.") + shCmd.Flags().Bool("env", false, "Use the standard `PATH` instead of superenv's when `std` is passed.") + shCmd.Flags().Bool("help", false, "Show this message.") + shCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + shCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(shCmd) +} diff --git a/completers/brew_completer/cmd/style.go b/completers/brew_completer/cmd/style.go new file mode 100644 index 0000000000..a84edf513f --- /dev/null +++ b/completers/brew_completer/cmd/style.go @@ -0,0 +1,28 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var styleCmd = &cobra.Command{ + Use: "style", + Short: "Check formulae or files for conformance to Homebrew style guidelines", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(styleCmd).Standalone() + + styleCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + styleCmd.Flags().Bool("debug", false, "Display any debugging information.") + styleCmd.Flags().Bool("except-cops", false, "Specify a comma-separated list to skip checking for violations of the listed RuboCop cops.") + styleCmd.Flags().Bool("fix", false, "Fix style violations automatically using RuboCop's auto-correct feature.") + styleCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + styleCmd.Flags().Bool("help", false, "Show this message.") + styleCmd.Flags().Bool("only-cops", false, "Specify a comma-separated list to check for violations of only the listed RuboCop cops.") + styleCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + styleCmd.Flags().Bool("reset-cache", false, "Reset the RuboCop cache.") + styleCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(styleCmd) +} diff --git a/completers/brew_completer/cmd/tap.go b/completers/brew_completer/cmd/tap.go new file mode 100644 index 0000000000..861a47c878 --- /dev/null +++ b/completers/brew_completer/cmd/tap.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var tapCmd = &cobra.Command{ + Use: "tap", + Short: "Tap a formula repository", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(tapCmd).Standalone() + + tapCmd.Flags().Bool("custom-remote", false, "Install or change a tap with a custom remote. Useful for mirrors.") + tapCmd.Flags().Bool("debug", false, "Display any debugging information.") + tapCmd.Flags().Bool("eval-all", false, "Evaluate all the formulae, casks and aliases in the new tap to check validity. Implied if `HOMEBREW_EVAL_ALL` is set.") + tapCmd.Flags().Bool("force", false, "Force install core taps even under API mode.") + tapCmd.Flags().Bool("force-auto-update", false, "Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).") + tapCmd.Flags().Bool("help", false, "Show this message.") + tapCmd.Flags().Bool("no-force-auto-update", false, "Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).") + tapCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + tapCmd.Flags().Bool("repair", false, "Migrate tapped formulae from symlink-based to directory-based structure.") + tapCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(tapCmd) +} diff --git a/completers/brew_completer/cmd/tapInfo.go b/completers/brew_completer/cmd/tapInfo.go new file mode 100644 index 0000000000..82cc4bd00b --- /dev/null +++ b/completers/brew_completer/cmd/tapInfo.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var tapInfoCmd = &cobra.Command{ + Use: "tap-info", + Short: "Show detailed information about one or more s", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(tapInfoCmd).Standalone() + + tapInfoCmd.Flags().Bool("debug", false, "Display any debugging information.") + tapInfoCmd.Flags().Bool("help", false, "Show this message.") + tapInfoCmd.Flags().Bool("installed", false, "Show information on each installed tap.") + tapInfoCmd.Flags().Bool("json", false, "Print a JSON representation of . Currently the default and only accepted value for is `v1`. See the docs for examples of using the JSON output: ") + tapInfoCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + tapInfoCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(tapInfoCmd) +} diff --git a/completers/brew_completer/cmd/tapNew.go b/completers/brew_completer/cmd/tapNew.go new file mode 100644 index 0000000000..63a17b0c5f --- /dev/null +++ b/completers/brew_completer/cmd/tapNew.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var tapNewCmd = &cobra.Command{ + Use: "tap-new", + Short: "Generate the template files for a new tap", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(tapNewCmd).Standalone() + + tapNewCmd.Flags().Bool("branch", false, "Initialize Git repository and setup GitHub Actions workflows with the specified branch name (default: `main`).") + tapNewCmd.Flags().Bool("debug", false, "Display any debugging information.") + tapNewCmd.Flags().Bool("github-packages", false, "Upload bottles to GitHub Packages.") + tapNewCmd.Flags().Bool("help", false, "Show this message.") + tapNewCmd.Flags().Bool("no-git", false, "Don't initialize a Git repository for the tap.") + tapNewCmd.Flags().Bool("pull-label", false, "Label name for pull requests ready to be pulled (default: `pr-pull`).") + tapNewCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + tapNewCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(tapNewCmd) +} diff --git a/completers/brew_completer/cmd/tc.go b/completers/brew_completer/cmd/tc.go new file mode 100644 index 0000000000..860453ed25 --- /dev/null +++ b/completers/brew_completer/cmd/tc.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var tcCmd = &cobra.Command{ + Use: "tc", + Short: "Check for typechecking errors using Sorbet", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(tcCmd).Standalone() + + tcCmd.Flags().Bool("debug", false, "Display any debugging information.") + tcCmd.Flags().Bool("dir", false, "Typecheck all files in a specific directory.") + tcCmd.Flags().Bool("file", false, "Typecheck a single file.") + tcCmd.Flags().Bool("fix", false, "Automatically fix type errors.") + tcCmd.Flags().Bool("help", false, "Show this message.") + tcCmd.Flags().Bool("ignore", false, "Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet).") + tcCmd.Flags().Bool("quiet", false, "Silence all non-critical errors.") + tcCmd.Flags().Bool("suggest-typed", false, "Try upgrading `typed` sigils.") + tcCmd.Flags().Bool("update", false, "Update RBI files.") + tcCmd.Flags().Bool("update-all", false, "Update all RBI files rather than just updated gems.") + tcCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(tcCmd) +} diff --git a/completers/brew_completer/cmd/test.go b/completers/brew_completer/cmd/test.go new file mode 100644 index 0000000000..4920ad9d7b --- /dev/null +++ b/completers/brew_completer/cmd/test.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var testCmd = &cobra.Command{ + Use: "test", + Short: "Run the test method provided by an installed formula", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(testCmd).Standalone() + + testCmd.Flags().Bool("HEAD", false, "Test the HEAD version of a formula.") + testCmd.Flags().Bool("debug", false, "Display any debugging information.") + testCmd.Flags().Bool("force", false, "Test formulae even if they are unlinked.") + testCmd.Flags().Bool("help", false, "Show this message.") + testCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created for the test.") + testCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + testCmd.Flags().Bool("retry", false, "Retry if a testing fails.") + testCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(testCmd) +} diff --git a/completers/brew_completer/cmd/tests.go b/completers/brew_completer/cmd/tests.go new file mode 100644 index 0000000000..fac89a3170 --- /dev/null +++ b/completers/brew_completer/cmd/tests.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var testsCmd = &cobra.Command{ + Use: "tests", + Short: "Run Homebrew's unit and integration tests", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(testsCmd).Standalone() + + testsCmd.Flags().Bool("byebug", false, "Enable debugging using byebug.") + testsCmd.Flags().Bool("changed", false, "Only runs tests on files that were changed from the master branch.") + testsCmd.Flags().Bool("coverage", false, "Generate code coverage reports.") + testsCmd.Flags().Bool("debug", false, "Display any debugging information.") + testsCmd.Flags().Bool("fail-fast", false, "Exit early on the first failing test.") + testsCmd.Flags().Bool("generic", false, "Run only OS-agnostic tests.") + testsCmd.Flags().Bool("help", false, "Show this message.") + testsCmd.Flags().Bool("online", false, "Include tests that use the GitHub API and tests that use any of the taps for official external commands.") + testsCmd.Flags().Bool("only", false, "Run only `_spec.rb`. Appending `:` will start at a specific line.") + testsCmd.Flags().Bool("profile", false, "Run the test suite serially to find the slowest tests.") + testsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + testsCmd.Flags().Bool("seed", false, "Randomise tests with the specified instead of a random seed.") + testsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(testsCmd) +} diff --git a/completers/brew_completer/cmd/typecheck.go b/completers/brew_completer/cmd/typecheck.go new file mode 100644 index 0000000000..94d2c23d76 --- /dev/null +++ b/completers/brew_completer/cmd/typecheck.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var typecheckCmd = &cobra.Command{ + Use: "typecheck", + Short: "Check for typechecking errors using Sorbet", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(typecheckCmd).Standalone() + + typecheckCmd.Flags().Bool("debug", false, "Display any debugging information.") + typecheckCmd.Flags().Bool("dir", false, "Typecheck all files in a specific directory.") + typecheckCmd.Flags().Bool("file", false, "Typecheck a single file.") + typecheckCmd.Flags().Bool("fix", false, "Automatically fix type errors.") + typecheckCmd.Flags().Bool("help", false, "Show this message.") + typecheckCmd.Flags().Bool("ignore", false, "Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet).") + typecheckCmd.Flags().Bool("quiet", false, "Silence all non-critical errors.") + typecheckCmd.Flags().Bool("suggest-typed", false, "Try upgrading `typed` sigils.") + typecheckCmd.Flags().Bool("update", false, "Update RBI files.") + typecheckCmd.Flags().Bool("update-all", false, "Update all RBI files rather than just updated gems.") + typecheckCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(typecheckCmd) +} diff --git a/completers/brew_completer/cmd/unbottled.go b/completers/brew_completer/cmd/unbottled.go new file mode 100644 index 0000000000..713a314337 --- /dev/null +++ b/completers/brew_completer/cmd/unbottled.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var unbottledCmd = &cobra.Command{ + Use: "unbottled", + Short: "Show the unbottled dependents of formulae", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(unbottledCmd).Standalone() + + unbottledCmd.Flags().Bool("debug", false, "Display any debugging information.") + unbottledCmd.Flags().Bool("dependents", false, "Skip getting analytics data and sort by number of dependents instead.") + unbottledCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to check them. Implied if `HOMEBREW_EVAL_ALL` is set.") + unbottledCmd.Flags().Bool("help", false, "Show this message.") + unbottledCmd.Flags().Bool("lost", false, "Print the `homebrew/core` commits where bottles were lost in the last week.") + unbottledCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + unbottledCmd.Flags().Bool("tag", false, "Use the specified bottle tag (e.g. `big_sur`) instead of the current OS.") + unbottledCmd.Flags().Bool("total", false, "Print the number of unbottled and total formulae.") + unbottledCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(unbottledCmd) +} diff --git a/completers/brew_completer/cmd/uninstal.go b/completers/brew_completer/cmd/uninstal.go new file mode 100644 index 0000000000..8497cd291c --- /dev/null +++ b/completers/brew_completer/cmd/uninstal.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var uninstalCmd = &cobra.Command{ + Use: "uninstal", + Short: "Uninstall a or ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(uninstalCmd).Standalone() + + uninstalCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") + uninstalCmd.Flags().Bool("debug", false, "Display any debugging information.") + uninstalCmd.Flags().Bool("force", false, "Delete all installed versions of . Uninstall even if is not installed, overwrite existing files and ignore errors when removing files.") + uninstalCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") + uninstalCmd.Flags().Bool("help", false, "Show this message.") + uninstalCmd.Flags().Bool("ignore-dependencies", false, "Don't fail uninstall, even if is a dependency of any installed formulae.") + uninstalCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + uninstalCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + uninstalCmd.Flags().Bool("zap", false, "Remove all files associated with a . *May remove files which are shared between applications.*") + rootCmd.AddCommand(uninstalCmd) +} diff --git a/completers/brew_completer/cmd/uninstall.go b/completers/brew_completer/cmd/uninstall.go index f1c4def256..cd75f9fde1 100644 --- a/completers/brew_completer/cmd/uninstall.go +++ b/completers/brew_completer/cmd/uninstall.go @@ -7,25 +7,24 @@ import ( ) var uninstallCmd = &cobra.Command{ - Use: "uninstall", - Short: "Uninstall a formula or cask", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "uninstall", + Short: "Uninstall a or ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(uninstallCmd).Standalone() uninstallCmd.Flags().Bool("cask", false, "Treat all named arguments as casks.") - uninstallCmd.Flags().Bool("casks", false, "Treat all named arguments as casks.") - uninstallCmd.Flags().BoolP("debug", "d", false, "Display any debugging information.") - uninstallCmd.Flags().BoolP("force", "f", false, "Delete all installed versions of formula.") + uninstallCmd.Flags().Bool("debug", false, "Display any debugging information.") + uninstallCmd.Flags().Bool("force", false, "Delete all installed versions of . Uninstall even if is not installed, overwrite existing files and ignore errors when removing files.") uninstallCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae.") - uninstallCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae.") - uninstallCmd.Flags().BoolP("help", "h", false, "Show this message.") - uninstallCmd.Flags().Bool("ignore-dependencies", false, "Don't fail uninstall , even if formula is a dependency") - uninstallCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet.") - uninstallCmd.Flags().BoolP("verbose", "v", false, "Make some output more verbose.") - uninstallCmd.Flags().Bool("zap", false, "Remove all files associated with a cask.") + uninstallCmd.Flags().Bool("help", false, "Show this message.") + uninstallCmd.Flags().Bool("ignore-dependencies", false, "Don't fail uninstall, even if is a dependency of any installed formulae.") + uninstallCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + uninstallCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + uninstallCmd.Flags().Bool("zap", false, "Remove all files associated with a . *May remove files which are shared between applications.*") rootCmd.AddCommand(uninstallCmd) carapace.Gen(uninstallCmd).PositionalAnyCompletion( diff --git a/completers/brew_completer/cmd/unlink.go b/completers/brew_completer/cmd/unlink.go new file mode 100644 index 0000000000..a503b5ad08 --- /dev/null +++ b/completers/brew_completer/cmd/unlink.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var unlinkCmd = &cobra.Command{ + Use: "unlink", + Short: "Remove symlinks for from Homebrew's prefix", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(unlinkCmd).Standalone() + + unlinkCmd.Flags().Bool("debug", false, "Display any debugging information.") + unlinkCmd.Flags().Bool("dry-run", false, "List files which would be unlinked without actually unlinking or deleting any files.") + unlinkCmd.Flags().Bool("help", false, "Show this message.") + unlinkCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + unlinkCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(unlinkCmd) +} diff --git a/completers/brew_completer/cmd/unpack.go b/completers/brew_completer/cmd/unpack.go new file mode 100644 index 0000000000..9a821f9ca4 --- /dev/null +++ b/completers/brew_completer/cmd/unpack.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var unpackCmd = &cobra.Command{ + Use: "unpack", + Short: "Unpack the source files for into subdirectories of the current working directory", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(unpackCmd).Standalone() + + unpackCmd.Flags().Bool("debug", false, "Display any debugging information.") + unpackCmd.Flags().Bool("destdir", false, "Create subdirectories in the directory named by instead.") + unpackCmd.Flags().Bool("force", false, "Overwrite the destination directory if it already exists.") + unpackCmd.Flags().Bool("git", false, "Initialise a Git repository in the unpacked source. This is useful for creating patches for the software.") + unpackCmd.Flags().Bool("help", false, "Show this message.") + unpackCmd.Flags().Bool("patch", false, "Patches for will be applied to the unpacked source.") + unpackCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + unpackCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(unpackCmd) +} diff --git a/completers/brew_completer/cmd/unpin.go b/completers/brew_completer/cmd/unpin.go new file mode 100644 index 0000000000..2f1b59d972 --- /dev/null +++ b/completers/brew_completer/cmd/unpin.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var unpinCmd = &cobra.Command{ + Use: "unpin", + Short: "Unpin , allowing them to be upgraded by `brew upgrade` ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(unpinCmd).Standalone() + + unpinCmd.Flags().Bool("debug", false, "Display any debugging information.") + unpinCmd.Flags().Bool("help", false, "Show this message.") + unpinCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + unpinCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(unpinCmd) +} diff --git a/completers/brew_completer/cmd/untap.go b/completers/brew_completer/cmd/untap.go new file mode 100644 index 0000000000..e5f73ea6b1 --- /dev/null +++ b/completers/brew_completer/cmd/untap.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var untapCmd = &cobra.Command{ + Use: "untap", + Short: "Remove a tapped formula repository", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(untapCmd).Standalone() + + untapCmd.Flags().Bool("debug", false, "Display any debugging information.") + untapCmd.Flags().Bool("force", false, "Untap even if formulae or casks from this tap are currently installed.") + untapCmd.Flags().Bool("help", false, "Show this message.") + untapCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + untapCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(untapCmd) +} diff --git a/completers/brew_completer/cmd/up.go b/completers/brew_completer/cmd/up.go new file mode 100644 index 0000000000..f513c8756a --- /dev/null +++ b/completers/brew_completer/cmd/up.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var upCmd = &cobra.Command{ + Use: "up", + Short: "Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(upCmd).Standalone() + + upCmd.Flags().Bool("auto-update", false, "Run on auto-updates (e.g. before `brew install`). Skips some slower steps.") + upCmd.Flags().Bool("debug", false, "Display a trace of all shell commands as they are executed.") + upCmd.Flags().Bool("force", false, "Always do a slower, full update check (even if unnecessary).") + upCmd.Flags().Bool("help", false, "Show this message.") + upCmd.Flags().Bool("merge", false, "Use `git merge` to apply updates (rather than `git rebase`).") + upCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + upCmd.Flags().Bool("verbose", false, "Print the directories checked and `git` operations performed.") + rootCmd.AddCommand(upCmd) +} diff --git a/completers/brew_completer/cmd/update.go b/completers/brew_completer/cmd/update.go index 38f27de581..128ee3994c 100644 --- a/completers/brew_completer/cmd/update.go +++ b/completers/brew_completer/cmd/update.go @@ -6,19 +6,21 @@ import ( ) var updateCmd = &cobra.Command{ - Use: "update", - Short: "Fetch the newest version of Homebrew and all formulae", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "update", + Short: "Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(updateCmd).Standalone() - updateCmd.Flags().BoolP("debug", "d", false, "Display a trace of all shell commands as they are executed") - updateCmd.Flags().BoolP("force", "f", false, "Always do a slower, full update check") - updateCmd.Flags().BoolP("help", "h", false, "Show this message") - updateCmd.Flags().Bool("merge", false, "Use git merge to apply updates") - updateCmd.Flags().Bool("preinstall", false, "Run on auto-updates") - updateCmd.Flags().BoolP("verbose", "v", false, "Print the directories checked and git operations performed") + updateCmd.Flags().Bool("auto-update", false, "Run on auto-updates (e.g. before `brew install`). Skips some slower steps.") + updateCmd.Flags().Bool("debug", false, "Display a trace of all shell commands as they are executed.") + updateCmd.Flags().Bool("force", false, "Always do a slower, full update check (even if unnecessary).") + updateCmd.Flags().Bool("help", false, "Show this message.") + updateCmd.Flags().Bool("merge", false, "Use `git merge` to apply updates (rather than `git rebase`).") + updateCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateCmd.Flags().Bool("verbose", false, "Print the directories checked and `git` operations performed.") rootCmd.AddCommand(updateCmd) } diff --git a/completers/brew_completer/cmd/updateLicenseData.go b/completers/brew_completer/cmd/updateLicenseData.go new file mode 100644 index 0000000000..bb5e9a68c6 --- /dev/null +++ b/completers/brew_completer/cmd/updateLicenseData.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updateLicenseDataCmd = &cobra.Command{ + Use: "update-license-data", + Short: "Update SPDX license data in the Homebrew repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updateLicenseDataCmd).Standalone() + + updateLicenseDataCmd.Flags().Bool("debug", false, "Display any debugging information.") + updateLicenseDataCmd.Flags().Bool("help", false, "Show this message.") + updateLicenseDataCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateLicenseDataCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(updateLicenseDataCmd) +} diff --git a/completers/brew_completer/cmd/updateMaintainers.go b/completers/brew_completer/cmd/updateMaintainers.go new file mode 100644 index 0000000000..ff55f14a4a --- /dev/null +++ b/completers/brew_completer/cmd/updateMaintainers.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updateMaintainersCmd = &cobra.Command{ + Use: "update-maintainers", + Short: "Update the list of maintainers in the `Homebrew/brew` README", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updateMaintainersCmd).Standalone() + + updateMaintainersCmd.Flags().Bool("debug", false, "Display any debugging information.") + updateMaintainersCmd.Flags().Bool("help", false, "Show this message.") + updateMaintainersCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateMaintainersCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(updateMaintainersCmd) +} diff --git a/completers/brew_completer/cmd/updatePythonResources.go b/completers/brew_completer/cmd/updatePythonResources.go new file mode 100644 index 0000000000..96d887659f --- /dev/null +++ b/completers/brew_completer/cmd/updatePythonResources.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updatePythonResourcesCmd = &cobra.Command{ + Use: "update-python-resources", + Short: "Update versions for PyPI resource blocks in ", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updatePythonResourcesCmd).Standalone() + + updatePythonResourcesCmd.Flags().Bool("debug", false, "Display any debugging information.") + updatePythonResourcesCmd.Flags().Bool("exclude-packages", false, "Exclude these packages when finding resources.") + updatePythonResourcesCmd.Flags().Bool("extra-packages", false, "Include these additional packages when finding resources.") + updatePythonResourcesCmd.Flags().Bool("help", false, "Show this message.") + updatePythonResourcesCmd.Flags().Bool("ignore-non-pypi-packages", false, "Don't fail if is not a PyPI package.") + updatePythonResourcesCmd.Flags().Bool("package-name", false, "Use the specified when finding resources for . If no package name is specified, it will be inferred from the formula's stable URL.") + updatePythonResourcesCmd.Flags().Bool("print-only", false, "Print the updated resource blocks instead of changing .") + updatePythonResourcesCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updatePythonResourcesCmd.Flags().Bool("silent", false, "Suppress any output.") + updatePythonResourcesCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + updatePythonResourcesCmd.Flags().Bool("version", false, "Use the specified when finding resources for . If no version is specified, the current version for will be used.") + rootCmd.AddCommand(updatePythonResourcesCmd) +} diff --git a/completers/brew_completer/cmd/updateReport.go b/completers/brew_completer/cmd/updateReport.go new file mode 100644 index 0000000000..ad4807f19a --- /dev/null +++ b/completers/brew_completer/cmd/updateReport.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updateReportCmd = &cobra.Command{ + Use: "update-report", + Short: "The Ruby implementation of `brew update`", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updateReportCmd).Standalone() + + updateReportCmd.Flags().Bool("auto-update", false, "Run in 'auto-update' mode (faster, less output).") + updateReportCmd.Flags().Bool("debug", false, "Display any debugging information.") + updateReportCmd.Flags().Bool("force", false, "Treat installed and updated formulae as if they are from the same taps and migrate them anyway.") + updateReportCmd.Flags().Bool("help", false, "Show this message.") + updateReportCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateReportCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(updateReportCmd) +} diff --git a/completers/brew_completer/cmd/updateSponsors.go b/completers/brew_completer/cmd/updateSponsors.go new file mode 100644 index 0000000000..9b485dc101 --- /dev/null +++ b/completers/brew_completer/cmd/updateSponsors.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updateSponsorsCmd = &cobra.Command{ + Use: "update-sponsors", + Short: "Update the list of GitHub Sponsors in the `Homebrew/brew` README", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updateSponsorsCmd).Standalone() + + updateSponsorsCmd.Flags().Bool("debug", false, "Display any debugging information.") + updateSponsorsCmd.Flags().Bool("help", false, "Show this message.") + updateSponsorsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateSponsorsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(updateSponsorsCmd) +} diff --git a/completers/brew_completer/cmd/updateTest.go b/completers/brew_completer/cmd/updateTest.go new file mode 100644 index 0000000000..1ee96582b3 --- /dev/null +++ b/completers/brew_completer/cmd/updateTest.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var updateTestCmd = &cobra.Command{ + Use: "update-test", + Short: "Run a test of `brew update` with a new repository clone", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(updateTestCmd).Standalone() + + updateTestCmd.Flags().Bool("before", false, "Use the commit at the specified as the start commit.") + updateTestCmd.Flags().Bool("commit", false, "Use the specified as the start commit.") + updateTestCmd.Flags().Bool("debug", false, "Display any debugging information.") + updateTestCmd.Flags().Bool("help", false, "Show this message.") + updateTestCmd.Flags().Bool("keep-tmp", false, "Retain the temporary directory containing the new repository clone.") + updateTestCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + updateTestCmd.Flags().Bool("to-tag", false, "Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags.") + updateTestCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(updateTestCmd) +} diff --git a/completers/brew_completer/cmd/upgrade.go b/completers/brew_completer/cmd/upgrade.go index 42a2ce2746..af57ab8e29 100644 --- a/completers/brew_completer/cmd/upgrade.go +++ b/completers/brew_completer/cmd/upgrade.go @@ -7,55 +7,55 @@ import ( ) var upgradeCmd = &cobra.Command{ - Use: "upgrade", - Short: "Upgrade outdated casks and outdated, unpinned formulae", - Run: func(cmd *cobra.Command, args []string) {}, + Use: "upgrade", + Short: "Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(upgradeCmd).Standalone() - upgradeCmd.Flags().String("appdir", "", "Target location for Applications") - upgradeCmd.Flags().String("audio-unit-plugindir", "", "Target location for Audio Unit Plugins") - upgradeCmd.Flags().Bool("binaries", false, "Disable/enable linking of helper executables") - upgradeCmd.Flags().BoolP("build-from-source", "s", false, "Compile formula from source even if a bottle is available") - upgradeCmd.Flags().Bool("cask", false, "Treat all named arguments as casks") - upgradeCmd.Flags().Bool("casks", false, "Treat all named arguments as casks") - upgradeCmd.Flags().String("colorpickerdir", "", "Target location for Color Pickers") - upgradeCmd.Flags().BoolP("debug", "d", false, "If brewing fails, open an interactive debugging session") - upgradeCmd.Flags().String("dictionarydir", "", "Target location for Dictionaries") - upgradeCmd.Flags().Bool("display-times", false, "Print install times for each package at the end of the run") - upgradeCmd.Flags().BoolP("dry-run", "n", false, "Show what would be upgraded") - upgradeCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation is outdated") - upgradeCmd.Flags().String("fontdir", "", "Target location for Fonts") - upgradeCmd.Flags().BoolP("force", "f", false, "Install formulae without checking for previously installed versions") - upgradeCmd.Flags().Bool("force-bottle", false, "Install from a bottle even if it would not normally be used") - upgradeCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae") - upgradeCmd.Flags().Bool("formulae", false, "Treat all named arguments as formulae") - upgradeCmd.Flags().Bool("greedy", false, "Also include casks with auto_updates true") - upgradeCmd.Flags().Bool("greedy-auto-updates", false, "Also include casks with auto_updates true.") - upgradeCmd.Flags().Bool("greedy-latest", false, "Also include casks with version :latest.") - upgradeCmd.Flags().BoolP("help", "h", false, "Show this message.") - upgradeCmd.Flags().Bool("ignore-pinned", false, "Set a successful exit status even if pinned formulae are not upgraded") - upgradeCmd.Flags().String("input-methoddir", "", "Target location for Input Methods") - upgradeCmd.Flags().BoolP("interactive", "i", false, "Download and patch formula") - upgradeCmd.Flags().String("internet-plugindir", "", "Target location for Internet Plugins") - upgradeCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation") - upgradeCmd.Flags().Bool("language", false, "Comma-separated list of language codes to prefer") - upgradeCmd.Flags().String("mdimporterdir", "", "Target location for Spotlight Plugins") - upgradeCmd.Flags().Bool("no-binaries", false, "Disable/enable linking of helper executables") - upgradeCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads") - upgradeCmd.Flags().String("prefpanedir", "", "Target location for Preference Panes") - upgradeCmd.Flags().String("qlplugindir", "", "Target location for QuickLook Plugins") - upgradeCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads") - upgradeCmd.Flags().BoolP("quiet", "q", false, "Make some output more quiet") + upgradeCmd.Flags().Bool("appdir", false, "Target location for Applications (default: `/Applications`).") + upgradeCmd.Flags().Bool("audio-unit-plugindir", false, "Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`).") + upgradeCmd.Flags().Bool("binaries", false, "Disable/enable linking of helper executables (default: enabled).") + upgradeCmd.Flags().Bool("build-from-source", false, "Compile from source even if a bottle is available.") + upgradeCmd.Flags().Bool("cask", false, "Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks.") + upgradeCmd.Flags().Bool("colorpickerdir", false, "Target location for Color Pickers (default: `~/Library/ColorPickers`).") + upgradeCmd.Flags().Bool("debug", false, "If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.") + upgradeCmd.Flags().Bool("debug-symbols", false, "Generate debug symbols on build. Source will be retained in a cache directory.") + upgradeCmd.Flags().Bool("dictionarydir", false, "Target location for Dictionaries (default: `~/Library/Dictionaries`).") + upgradeCmd.Flags().Bool("display-times", false, "Print install times for each package at the end of the run.") + upgradeCmd.Flags().Bool("dry-run", false, "Show what would be upgraded, but do not actually upgrade anything.") + upgradeCmd.Flags().Bool("fetch-HEAD", false, "Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.") + upgradeCmd.Flags().Bool("fontdir", false, "Target location for Fonts (default: `~/Library/Fonts`).") + upgradeCmd.Flags().Bool("force", false, "Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask).") + upgradeCmd.Flags().Bool("force-bottle", false, "Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation.") + upgradeCmd.Flags().Bool("formula", false, "Treat all named arguments as formulae. If no named arguments are specified, upgrade only outdated formulae.") + upgradeCmd.Flags().Bool("greedy", false, "Also include casks with `auto_updates true` or `version :latest`.") + upgradeCmd.Flags().Bool("greedy-auto-updates", false, "Also include casks with `auto_updates true`.") + upgradeCmd.Flags().Bool("greedy-latest", false, "Also include casks with `version :latest`.") + upgradeCmd.Flags().Bool("help", false, "Show this message.") + upgradeCmd.Flags().Bool("input-methoddir", false, "Target location for Input Methods (default: `~/Library/Input Methods`).") + upgradeCmd.Flags().Bool("interactive", false, "Download and patch , then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package.") + upgradeCmd.Flags().Bool("internet-plugindir", false, "Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`).") + upgradeCmd.Flags().Bool("keep-tmp", false, "Retain the temporary files created during installation.") + upgradeCmd.Flags().Bool("keyboard-layoutdir", false, "Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`).") + upgradeCmd.Flags().Bool("language", false, "Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask's default language. The default value is the language of your system.") + upgradeCmd.Flags().Bool("mdimporterdir", false, "Target location for Spotlight Plugins (default: `~/Library/Spotlight`).") + upgradeCmd.Flags().Bool("no-binaries", false, "Disable/enable linking of helper executables (default: enabled).") + upgradeCmd.Flags().Bool("no-quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + upgradeCmd.Flags().Bool("prefpanedir", false, "Target location for Preference Panes (default: `~/Library/PreferencePanes`).") + upgradeCmd.Flags().Bool("qlplugindir", false, "Target location for Quick Look Plugins (default: `~/Library/QuickLook`).") + upgradeCmd.Flags().Bool("quarantine", false, "Disable/enable quarantining of downloads (default: enabled).") + upgradeCmd.Flags().Bool("quiet", false, "Make some output more quiet.") upgradeCmd.Flags().Bool("require-sha", false, "Require all casks to have a checksum.") - upgradeCmd.Flags().String("screen-saverdir", "", "Target location for Screen Savers") - upgradeCmd.Flags().String("servicedir", "", "Target location for Services") + upgradeCmd.Flags().Bool("screen-saverdir", false, "Target location for Screen Savers (default: `~/Library/Screen Savers`).") + upgradeCmd.Flags().Bool("servicedir", false, "Target location for Services (default: `~/Library/Services`).") upgradeCmd.Flags().Bool("skip-cask-deps", false, "Skip installing cask dependencies.") - upgradeCmd.Flags().BoolP("verbose", "v", false, "Print the verification and postinstall steps") - upgradeCmd.Flags().String("vst-plugindir", "", "Target location for VST Plugins") - upgradeCmd.Flags().String("vst3-plugindir", "", "Target location for VST3 Plugins") + upgradeCmd.Flags().Bool("verbose", false, "Print the verification and post-install steps.") + upgradeCmd.Flags().Bool("vst-plugindir", false, "Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`).") + upgradeCmd.Flags().Bool("vst3-plugindir", false, "Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`).") rootCmd.AddCommand(upgradeCmd) carapace.Gen(upgradeCmd).FlagCompletion(carapace.ActionMap{ diff --git a/completers/brew_completer/cmd/uses.go b/completers/brew_completer/cmd/uses.go new file mode 100644 index 0000000000..95c4341a7d --- /dev/null +++ b/completers/brew_completer/cmd/uses.go @@ -0,0 +1,33 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var usesCmd = &cobra.Command{ + Use: "uses", + Short: "Show formulae and casks that specify as a dependency; that is, show dependents of ", + GroupID: "main", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(usesCmd).Standalone() + + usesCmd.Flags().Bool("cask", false, "Include only casks.") + usesCmd.Flags().Bool("debug", false, "Display any debugging information.") + usesCmd.Flags().Bool("eval-all", false, "Evaluate all available formulae and casks, whether installed or not, to show their dependents.") + usesCmd.Flags().Bool("formula", false, "Include only formulae.") + usesCmd.Flags().Bool("help", false, "Show this message.") + usesCmd.Flags().Bool("include-build", false, "Include formulae that specify as a `:build` dependency.") + usesCmd.Flags().Bool("include-optional", false, "Include formulae that specify as an `:optional` dependency.") + usesCmd.Flags().Bool("include-test", false, "Include formulae that specify as a `:test` dependency.") + usesCmd.Flags().Bool("installed", false, "Only list formulae and casks that are currently installed.") + usesCmd.Flags().Bool("missing", false, "Only list formulae and casks that are not currently installed.") + usesCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + usesCmd.Flags().Bool("recursive", false, "Resolve more than one level of dependencies.") + usesCmd.Flags().Bool("skip-recommended", false, "Skip all formulae that specify as a `:recommended` dependency.") + usesCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(usesCmd) +} diff --git a/completers/brew_completer/cmd/vendorGems.go b/completers/brew_completer/cmd/vendorGems.go new file mode 100644 index 0000000000..133088da4d --- /dev/null +++ b/completers/brew_completer/cmd/vendorGems.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var vendorGemsCmd = &cobra.Command{ + Use: "vendor-gems", + Short: "Install and commit Homebrew's vendored gems", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(vendorGemsCmd).Standalone() + + vendorGemsCmd.Flags().Bool("debug", false, "Display any debugging information.") + vendorGemsCmd.Flags().Bool("help", false, "Show this message.") + vendorGemsCmd.Flags().Bool("no-commit", false, "Do not generate a new commit upon completion.") + vendorGemsCmd.Flags().Bool("quiet", false, "Make some output more quiet.") + vendorGemsCmd.Flags().Bool("update", false, "Update the specified list of vendored gems to the latest version.") + vendorGemsCmd.Flags().Bool("verbose", false, "Make some output more verbose.") + rootCmd.AddCommand(vendorGemsCmd) +}