Skip to content

Commit

Permalink
add shorthand cm for configmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
lojies committed Jul 27, 2016
1 parent b7e8791 commit 79f09cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ __custom_func() {
// and add a short forms entry in expandResourceShortcut() when appropriate.
valid_resources = `Valid resource types include:
* componentstatuses (aka 'cs')
* configmaps
* configmaps (aka 'cm')
* daemonsets (aka 'ds')
* deployments (aka 'deploy')
* events (aka 'ev')
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (aka 'po'), services (aka 'svc'), deployments (aka 'deploy'),
replicasets (aka 'rs'), replicationcontrollers (aka 'rc'), nodes (aka 'no'), events (aka 'ev'), limitranges (aka 'limits'),
persistentvolumes (aka 'pv'), persistentvolumeclaims (aka 'pvc'), resourcequotas (aka 'quota'), namespaces (aka 'ns'),
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps,
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps (aka 'cm'),
componentstatuses (aka 'cs), endpoints (aka 'ep'), petsets (alpha feature, may be unstable) and secrets.`
)

Expand Down Expand Up @@ -148,6 +148,7 @@ var shortForms = map[string]string{
// Please keep this alphabetized
// If you add an entry here, please also take a look at pkg/kubectl/cmd/cmd.go
// and add an entry to valid_resources when appropriate.
"cm": "configmaps",
"cs": "componentstatuses",
"deploy": "deployments",
"ds": "daemonsets",
Expand Down

0 comments on commit 79f09cb

Please sign in to comment.