Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: index out of range on leading -n #53

Open
arkadijs opened this issue Apr 23, 2019 · 1 comment
Open

panic: runtime error: index out of range on leading -n #53

arkadijs opened this issue Apr 23, 2019 · 1 comment

Comments

@arkadijs
Copy link

$ kube-prompt 
kube-prompt v1.0.6 (rev-298f692)
Please use `exit` or `Ctrl-D` to exit this program.
>>> get pod -n automation-hub
NAME                                                       READY   STATUS    RESTARTS   AGE
api-59bf57744b-n9kv4                                       1/1     Running   0          5d1h
...
>>> -nBye!
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/c-bata/kube-prompt/kube.(*Completer).argumentsCompleter(0xc0002d15e0, 0xc00038e5b2, 0xb, 0xc00032b400, 0x0, 0x2, 0x0, 0x0, 0x0)
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/kube/arguments.go:98 +0x8955
github.com/c-bata/kube-prompt/kube.(*Completer).Complete(0xc0002d15e0, 0xc0005b4c6c, 0x3, 0x3, 0x0, 0xffffffffffffffff, 0xc0004bbcf8)
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/kube/completer.go:83 +0x38c
github.com/c-bata/kube-prompt/kube.(*Completer).Complete-fm(0xc0005b4c6c, 0x3, 0x3, 0x1c12280, 0xc000398401, 0xc00032b380)
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/main.go:35 +0x48
github.com/c-bata/kube-prompt/vendor/github.com/c-bata/go-prompt.(*CompletionManager).Update(0xc00043c820, 0xc0005b4c6c, 0x3, 0x3)
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/vendor/github.com/c-bata/go-prompt/completion.go:69 +0x48
github.com/c-bata/kube-prompt/vendor/github.com/c-bata/go-prompt.(*Prompt).Run(0xc000395400)
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/vendor/github.com/c-bata/go-prompt/prompt.go:85 +0x625
main.main()
	/Users/a14737/go/src/github.com/c-bata/kube-prompt/main.go:41 +0x37a
@c-bata
Copy link
Owner

c-bata commented Apr 23, 2019

Thanks for reporting.

memo: This error raised at

return prompt.FilterHasPrefix(commands, args[0], true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants