Tuckr icon indicating copy to clipboard operation
Tuckr copied to clipboard

Feature request: shell completions

Open yonas opened this issue 2 years ago • 4 comments

You could use clap complete to generate shell completions.

yonas avatar Mar 30 '23 05:03 yonas

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 avatar Mar 30 '23 10:03 RaphGL

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: https://github.com/clap-rs/clap/issues/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 avatar Jun 17 '23 11:06 RaphGL

See the issue: https://github.com/clap-rs/clap/issues/1232

Looks like clap supports dynamic completion now!

jasha-hrp avatar Sep 06 '24 19:09 jasha-hrp

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.

RaphGL avatar Sep 06 '24 20:09 RaphGL