c-bata / go-prompt

Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
https://godoc.org/github.com/c-bata/go-prompt
MIT License
5.27k stars 347 forks source link

Does it support sub command? #186

Open jievince opened 4 years ago

jievince commented 4 years ago

Feature Request

Please write your suggestion here.

c-bata commented 4 years ago

You can complete subcommands like kube-prompt. Please check the implementation for details. https://github.com/c-bata/kube-prompt/blob/c654ccb6120568574b600b134a746d925ee74473/kube/arguments.go#L96

jievince commented 4 years ago

Thanks. But why go-prompt doesn't support sub command? go-prompt also doesn't support ctrl+R search while python-prompt-toolkit support them.

0x41337 commented 2 years ago

You can complete subcommands like kube-prompt. Please check the implementation for details. https://github.com/c-bata/kube-prompt/blob/c654ccb6120568574b600b134a746d925ee74473/kube/arguments.go#L96

add in the examples I didn't quite understand how to increment this