Skip to content

Commit 6a71df0

Browse files
authored
Add -n as an alias for -namespace (#291)
-namespace is quite long and I've wished for a shorter version multiple times now. Apparently, though, introducing an alias can be controversial if all you have is single-dash flags like `-namespace` (vs. `--namespace`), since `-namespace` could then be interpreted as `-n -a -m -e ...` etc. Not sure whether that's an _actual_ concern though, since we do have single-letter flags already (`-v` and `-j`, for example).
1 parent 060a147 commit 6a71df0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/src/campaigns_common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ func newCampaignsApplyFlags(flagSet *flag.FlagSet, cacheDir string) *campaignsAp
6868
&caf.namespace, "namespace", "",
6969
"The user of organization namespace to place the campaign within.",
7070
)
71+
flagSet.StringVar(&caf.namespace, "n", "", "Alias for -namespace.")
72+
7173
flagSet.IntVar(
7274
&caf.parallelism, "j", 0,
7375
"The maximum number of parallel jobs. (Default: GOMAXPROCS.)",

0 commit comments

Comments
 (0)