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

Tab completion improvements #32

Open
woodruffw opened this issue May 28, 2020 · 2 comments
Open

Tab completion improvements #32

woodruffw opened this issue May 28, 2020 · 2 comments
Labels
C:cli enhancement New feature or request help wanted Extra attention is needed

Comments

@woodruffw
Copy link
Owner

woodruffw commented May 28, 2020

kbs2 currently generates tab completions via --completions=SHELL, enabling users to do something like this in their shell profile/initialization file:

eval "$(kbs2 --completions=bash)"

This is pleasant, but limited: the clap-generated completions don't support intelligent positional expansion, e.g.:

  • All available record labels for <label>
  • All available generators for <generator>
  • Possible external subcommands (found by searching PATH for kbs2-*)

We should investigate to see whether clap can populate these correctly and, if not, how difficult it would be to implement (either in clap or on our own).

@woodruffw woodruffw added enhancement New feature or request help wanted Extra attention is needed C:cli labels May 28, 2020
@woodruffw
Copy link
Owner Author

clap-rs/clap#1232 will probably enable this at some point.

@woodruffw
Copy link
Owner Author

Looks like clap is learning argument "hints", which will probably help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:cli enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant