mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-05-28 04:35:50 -04:00
Merge pull request #131586 from ardaguclu/kuberc-completion
Continue alias creation when __completion is used to enable completion Kubernetes-commit: 893486dfd16ff8c628c6f33bb2bea869ad86115f
This commit is contained in:
commit
bb3c0d9f3a
2 changed files with 3 additions and 1 deletions
2
go.mod
2
go.mod
|
|
@ -92,3 +92,5 @@ require (
|
|||
sigs.k8s.io/kustomize/api v0.19.0 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
)
|
||||
|
||||
replace k8s.io/code-generator => k8s.io/code-generator v0.0.0-20250503071920-ec35be305d73
|
||||
|
|
|
|||
|
|
@ -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