Skip to content

Commit

Permalink
Add shorthand letter for --config and --ui-size
Browse files Browse the repository at this point in the history
Now we can use `-c` instead of `--config` and `-u` instead of `--ui-size`

Signed-off-by: Yarden Shoham <[email protected]>
  • Loading branch information
yardenshoham committed Jan 2, 2024
1 parent e70741d commit 763edbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func NewCli() *Cli {
func (cli *Cli) setFlags() {
kubeconfig := flag.String("kubeconfig", filepath.Join(homeDir(), ".kube", "config"), "(optional) absolute path to the kubeconfig file")
flags := cli.rootCmd.PersistentFlags()
flags.StringVar(&cfgFile, "config", *kubeconfig, "path of kubeconfig")
flags.IntVar(&uiSize, "ui-size", 4, "number of list items to show in menu at once")
flags.StringVarP(&cfgFile, "config", "c", *kubeconfig, "path of kubeconfig")
flags.IntVarP(&uiSize, "ui-size", "u", 4, "number of list items to show in menu at once")
flags.BoolVarP(&silenceTable, "silence-table", "s", false, "enable/disable output of context table on successful config update")
flags.BoolVarP(&macNotify, "mac-notify", "m", false, "enable to display Mac notification banner")
}
Expand Down

0 comments on commit 763edbb

Please sign in to comment.