From 74902e39e44f7b002d30f54e68857838711239e1 Mon Sep 17 00:00:00 2001 From: rsteube Date: Mon, 25 Apr 2022 11:09:51 +0200 Subject: [PATCH] elvish: updates from v0.18.0 --- completers/elvish_completer/cmd/root.go | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/completers/elvish_completer/cmd/root.go b/completers/elvish_completer/cmd/root.go index 8ee4a4ca41..0d2f37bffd 100644 --- a/completers/elvish_completer/cmd/root.go +++ b/completers/elvish_completer/cmd/root.go @@ -13,35 +13,35 @@ var rootCmd = &cobra.Command{ } func Execute() error { + carapace.Override(carapace.Opts{ + LongShorthand: true, + }) return rootCmd.Execute() } func init() { carapace.Gen(rootCmd).Standalone() - rootCmd.Flags().String("bin", "", "path to the elvish binary") - rootCmd.Flags().Bool("buildinfo", false, "show build info and quit") - rootCmd.Flags().BoolS("c", "c", false, "take first argument as code to execute") - rootCmd.Flags().Bool("compileonly", false, "Parse/Compile but do not execute") - rootCmd.Flags().String("cpuprofile", "", "write cpu profile to file") - rootCmd.Flags().Bool("daemon", false, "run daemon instead of shell") - rootCmd.Flags().String("db", "", "path to the database") - rootCmd.Flags().Bool("help", false, "show usage help and quit") - rootCmd.Flags().Bool("json", false, "show output in JSON. Useful with --buildinfo.") - rootCmd.Flags().String("log", "", "a file to write debug log to") - rootCmd.Flags().String("logprefix", "", "the prefix for the daemon log file") - rootCmd.Flags().Bool("norc", false, "run elvish without invoking rc.elv") - rootCmd.Flags().String("port", "", "the port of the web backend (default 3171)") - rootCmd.Flags().Bool("show-deprecations", false, "whether to show deprecations") - rootCmd.Flags().String("sock", "", "path to the daemon socket") - rootCmd.Flags().Bool("version", false, "show version and quit") - rootCmd.Flags().Bool("web", false, "run backend of web interface") + rootCmd.Flags().Bool("buildinfo", false, "Output information about the Elvish build and quit") + rootCmd.Flags().Bool("c", false, "Treat the first argument as code to execute") + rootCmd.Flags().Bool("compileonly", false, "Parse and compile Elvish code without executing it") + rootCmd.Flags().Bool("daemon", false, "[internal flag] Run the storage daemon instead of an Elvish shell") + rootCmd.Flags().String("db", "", "[internal flag] Path to the database file") + rootCmd.Flags().String("deprecation-level", "", "Show warnings for all features deprecated as of version 0.X (default 18)") + rootCmd.Flags().Bool("help", false, "Show usage help and quit") + rootCmd.Flags().Bool("i", false, "A no-op flag, introduced for POSIX compatibility") + rootCmd.Flags().Bool("json", false, "Show the output from -buildinfo, -compileonly or -version in JSON") + rootCmd.Flags().String("log", "", "Path to a file to write debug logs") + rootCmd.Flags().Bool("lsp", false, "Run the builtin language server") + rootCmd.Flags().Bool("norc", false, "Don't read the RC file when running interactively") + rootCmd.Flags().String("rc", "", "Path to the RC file when running interactively") + rootCmd.Flags().String("sock", "", "[internal flag] Path to the daemon's UNIX socket") + rootCmd.Flags().Bool("version", false, "Output the Elvish version and quit") carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{ - "bin": carapace.ActionFiles(), - "cpuprofile": carapace.ActionFiles(), - "db": carapace.ActionFiles(), - "log": carapace.ActionFiles(), - "sock": carapace.ActionFiles(), + "db": carapace.ActionFiles(), + "log": carapace.ActionFiles(), + "rc": carapace.ActionFiles(), + "sock": carapace.ActionFiles(), }) carapace.Gen(rootCmd).PositionalCompletion(