all: add optional shorthand to flags
General MR
Summary
Allows setting an optional "shorthand" command to all command line flags. E.g. -A
will alias --all-namespaces
.
Relevant logs/screenshots
Temporarily added an -a
to audit and tested:
+++ b/cmd/violations.go
@@ -145,7 +145,7 @@ func NewViolationsCmd(factory bbUtil.Factory) (*cobra.Command, error) {
flagError := configClient.SetAndBindFlag(
"audit",
- "",
+ "a",
false,
"list violations in audit mode",
)
Flags:
-a, --audit list violations in audit mode
-h, --help help for violations
Linked Issue
Wanted for #196 (closed)
Upgrade Notices
N/A