Continue alias creation when __completion is used to enable completion
Kubernetes-commit: f6d0498017fc71c72891ad9455c4391aa63c6e71
This commit is contained in:
parent
3323e167c5
commit
b0f5f0c0aa
|
@ -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 New Issue