-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
config_get.go
30 lines (24 loc) · 879 Bytes
/
config_get.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)
var config_getCmd = &cobra.Command{
Use: "get",
Short: "",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(config_getCmd).Standalone()
config_getCmd.Flags().String("format", "", "Display format")
config_getCmd.Flags().BoolP("help", "h", false, "Print help")
config_getCmd.Flags().String("merged", "", "Whether or not to merge config values")
config_getCmd.Flags().Bool("show-origin", false, "Display where the config value is defined")
configCmd.AddCommand(config_getCmd)
carapace.Gen(config_getCmd).FlagCompletion(carapace.ActionMap{
"format": carapace.ActionValues("toml", "json", "json-value"),
"merged": carapace.ActionValues("yes", "no").StyleF(style.ForKeyword),
})
// TODO config keys
}