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

Bash completion #35

Closed
jkremser opened this issue Jan 13, 2017 · 2 comments
Closed

Bash completion #35

jkremser opened this issue Jan 13, 2017 · 2 comments

Comments

@jkremser
Copy link

jkremser commented Jan 13, 2017

If this is implemented, this would be a killer feature. I like the way the args can be declaratively described by the hash. From that hash it would be possible to create the bash completion script. If this script is added to /etc/bash_completion.d it can complete the allowed args when pressing TAB.

yargs has something like that, but it's low lvl api and user needs to implement it basically itself. But these bash completion scripts could be generated. Btw. this is very nice way to do that almost mechanically: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/completion.go
and the result is similar to this:
https://github.com/janetkuo/kubernetes/blob/b673920ccf83c9448398243ff5ea3afab989d5fc/contrib/completions/bash/kubectl

@75lb
Copy link
Owner

75lb commented Jan 13, 2017

interesting, thanks.. could be good for command-line-commands too.. will look into it.

@75lb
Copy link
Owner

75lb commented Feb 1, 2017

closing this for now as I don't see myself implementing it any time soon.. however, feel free to work on it and share the results here!

@75lb 75lb closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants