mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
Merge pull request #131586 from ardaguclu/kuberc-completion
Continue alias creation when __completion is used to enable completion
This commit is contained in:
commit
893486dfd1
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ func (p *Preferences) applyAliases(rootCmd *cobra.Command, kuberc *config.Prefer
|
|||
var commandName string // first "non-flag" arguments
|
||||
var commandIndex int
|
||||
for index, arg := range args[1:] {
|
||||
if !strings.HasPrefix(arg, "-") {
|
||||
if !strings.HasPrefix(arg, "-") && !strings.HasPrefix(arg, cobra.ShellCompRequestCmd) {
|
||||
commandName = arg
|
||||
commandIndex = index + 1
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in a new issue