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: shell completions #19

Open
yonas opened this issue Mar 30, 2023 · 4 comments
Open

Feature request: shell completions #19

yonas opened this issue Mar 30, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@yonas
Copy link

yonas commented Mar 30, 2023

You could use clap complete to generate shell completions.

@RaphGL
Copy link
Owner

RaphGL commented Mar 30, 2023

I used it before, but I didn't understand quite well how to use it. I managed to get completions for commands but I lost the ability to get completions for files in the current directory. If I could make it complete for groups and files depending on what the command needs that'd be great.

@RaphGL RaphGL added the enhancement New feature or request label Mar 30, 2023
@RaphGL RaphGL changed the title Feature request: shell compeltions Feature request: shell completions Jun 17, 2023
@RaphGL
Copy link
Owner

RaphGL commented Jun 17, 2023

So went into researching why I couldn't understand how to get proper completions and apparently besides the basic stuff clap_complete does not yet support dynamic completions, so making autocompletion work as intended would take much more effort from my end to maintain it for all the different shells it supports.
See the issue: clap-rs/clap#1232

I'm considering waiting it out until clap complete is ready. If someone is willing to submit a PR with completion scripts for their preferred shells they'd be welcome as well.

@RaphGL RaphGL added the help wanted Extra attention is needed label Jun 17, 2023
@jasha-hrp
Copy link

See the issue: clap-rs/clap#1232

Looks like clap supports dynamic completion now!

@RaphGL
Copy link
Owner

RaphGL commented Sep 6, 2024

the dynamic completion stuff looks promising but it's still behind an unstable feature flag, I wonder if it would be worth experimenting now or just waiting out for stabilization.

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

No branches or pull requests

3 participants