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

Feature Request: bash/zsh completion implemented inside App #726

Closed
yschimke opened this issue Jun 15, 2019 · 3 comments
Closed

Feature Request: bash/zsh completion implemented inside App #726

yschimke opened this issue Jun 15, 2019 · 3 comments
Labels
theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module

Comments

@yschimke
Copy link

yschimke commented Jun 15, 2019

As mentioned in #725, calling into the app can provide a lot richer completions.

I've implemented this myself in my own apps, but it's very specific code with caching, but with graal startup speeds it's probably possible to do a much simpler implementation.

image

@yschimke yschimke changed the title Feature Request: bash/fish completion implemented inside App Feature Request: bash/zsh completion implemented inside App Jun 16, 2019
@yschimke
Copy link
Author

Feel free to close, this is a suggestion, I don't have plans to actively work on this.

@remkop
Copy link
Owner

remkop commented Jun 16, 2019

Can you expand a bit on the "inside App"?

One idea is to have a command that generates the completion script (#456).
Another idea is to let the Bash completion script call the app itself to get completion candidates (#506) - this requires the Bash completion script to be able to invoke the command, so path, classpath etc. needs to be set up correctly.

Is this what you have in mind?

@yschimke
Copy link
Author

#506 is exactly it. I think it’s a safe assumption if you can output as part of usage help a command name, that at completion time you can call that command and it should work. You can see how I do it for fish in the other issue I raised.

@remkop remkop added theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module labels Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module
Projects
None yet
Development

No branches or pull requests

2 participants