Skip to content

Commit

Permalink
feat: add -R shorthand to --role (#405)
Browse files Browse the repository at this point in the history
* feat: add `-R` shorthand to `--role`

* fix: use correct flag definition function

Co-authored-by: Carlos Alexandro Becker <[email protected]>

---------

Co-authored-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
gy-mate and caarlos0 authored Dec 18, 2024
1 parent 9b63a4a commit b7e6af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b7e6af6

Please sign in to comment.