From e058ab61aff8ed0937db85bbe995fc2520561f79 Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 22 Dec 2023 23:24:34 +0100 Subject: [PATCH] tmp --- cmd/carapace/cmd/root.go | 16 ++++++++-------- docs/src/release_notes/v0.29.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/carapace/cmd/root.go b/cmd/carapace/cmd/root.go index 2c1d232de4..e5dc75ead7 100644 --- a/cmd/carapace/cmd/root.go +++ b/cmd/carapace/cmd/root.go @@ -239,13 +239,13 @@ func Execute(version string) error { func init() { rootCmd.Flags().Bool("codegen", false, "generate code from spec file") + rootCmd.Flags().BoolP("help", "h", false, "help for carapace") rootCmd.Flags().Bool("list", false, "list completers") rootCmd.Flags().Bool("macro", false, "list or execute macros") - rootCmd.Flags().BoolP("help", "h", false, "help for carapace") - rootCmd.Flags().BoolP("version", "v", false, "version for carapace") rootCmd.Flags().Bool("run", false, "run spec") rootCmd.Flags().Bool("schema", false, "json schema for spec files") rootCmd.Flags().Bool("style", false, "set style") + rootCmd.Flags().BoolP("version", "v", false, "version for carapace") rootCmd.MarkFlagsMutuallyExclusive( "codegen", @@ -275,22 +275,22 @@ func init() { return carapace.ActionExecute(invokeCmd) } switch c.Args[0] { - case "--macro": - return carapace.ActionExecute(macroCmd).Shift(1) + case "--codegen": + return carapace.ActionExecute(codegenCmd).Shift(1) case "--help": return carapace.ActionValues() - case "-v", "--version": - return carapace.ActionValues() case "--list": return carapace.ActionExecute(listCmd).Shift(1).Usage("list") + case "--macro": + return carapace.ActionExecute(macroCmd).Shift(1) case "--run": return carapace.ActionExecute(runCmd).Shift(1) case "--schema": return carapace.ActionExecute(schemaCmd).Shift(1) - case "--scrape": - return carapace.ActionExecute(codegenCmd).Shift(1) case "--style": return carapace.ActionExecute(styleCmd).Shift(1) + case "-v", "--version": + return carapace.ActionValues() default: return carapace.ActionValues() } diff --git a/docs/src/release_notes/v0.29.md b/docs/src/release_notes/v0.29.md index e1fc2e9bdb..39440b801d 100644 --- a/docs/src/release_notes/v0.29.md +++ b/docs/src/release_notes/v0.29.md @@ -2,7 +2,7 @@ ![](./v0.29/banner.png) -One step further to exchange completions _loosely coupled_ between commands. +One step further to exchange completions between commands. ## Root Command