moss::cli: Add dynamic shell completions - #815
Conversation
d35b040 to
5595903
Compare
|
@ermo I've been fiddling with this PR after migration to rustqlite and I think it's ready for review. This one is a little more involved and requires some changes to the moss stone.yaml file for the completions. I'll attach the commands below for each shell to use to export the runtime completions for local testing too. This is my first time working with criterion and the database code for moss so let me know if I'm committing any anti-patterns. Right now the dynamic completion is enabled for |
698b032 to
6040173
Compare
6040173 to
403bf18
Compare
|
Made some improvements to the completion output. When testing on my machine, I discovered that fish shell has implemented their own moss completion script with dynamic completion populated using native fish functions by filtering through The fish completions provided both package name and package summary as part of their completions which inspired me to borrow their approach:
|

This PR uses the unstable dynamic completion feature of
clap_completeto provide completion candidates at runtime for certainmosscommands. This PR adds package names as completion candidates to the subcommandsmoss installandmoss removeand introduces some simple benchmarks withcriterion. I'll keep this as a draft for now until the rustqlite migration is complete.