mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
Merge pull request #131586 from ardaguclu/kuberc-completion
Continue alias creation when __completion is used to enable completion
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user