Skip to content

Commit

Permalink
Merge pull request #1055 from rsteube/elvish-updates
Browse files Browse the repository at this point in the history
elvish: updates from v0.18.0
  • Loading branch information
rsteube authored Apr 25, 2022
2 parents 058b1a3 + 74902e3 commit 2c1e1a9
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions completers/elvish_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2c1e1a9

Please sign in to comment.