From b7e6af6c4e26428fb6d37473fb5dee3b0b7744bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Gy=C3=B6ngy=C3=B6si?= Date: Wed, 18 Dec 2024 03:45:51 +0100 Subject: [PATCH] feat: add `-R` shorthand to `--role` (#405) * feat: add `-R` shorthand to `--role` * fix: use correct flag definition function Co-authored-by: Carlos Alexandro Becker --------- Co-authored-by: Carlos Alexandro Becker --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index e997c6f1..042689c3 100644 --- a/main.go +++ b/main.go @@ -252,7 +252,7 @@ func initFlags() { flags.BoolVar(&config.ResetSettings, "reset-settings", config.ResetSettings, stdoutStyles().FlagDesc.Render(help["reset-settings"])) flags.BoolVar(&config.Settings, "settings", false, stdoutStyles().FlagDesc.Render(help["settings"])) flags.BoolVar(&config.Dirs, "dirs", false, stdoutStyles().FlagDesc.Render(help["dirs"])) - flags.StringVar(&config.Role, "role", config.Role, stdoutStyles().FlagDesc.Render(help["role"])) + flags.StringVarP(&config.Role, "role", "R", config.Role, stdoutStyles().FlagDesc.Render(help["role"])) flags.BoolVar(&config.ListRoles, "list-roles", config.ListRoles, stdoutStyles().FlagDesc.Render(help["list-roles"])) flags.StringVar(&config.Theme, "theme", "charm", stdoutStyles().FlagDesc.Render(help["theme"])) flags.Lookup("prompt").NoOptDefVal = "-1"