framesurge / perseus

A state-driven web development framework for Rust with full support for server-side rendering and static generation.
https://framesurge.sh/perseus/en-US
MIT License
2.18k stars 89 forks source link

Add compile time completion generation #328

Open willwill2will54 opened 4 months ago

willwill2will54 commented 4 months ago

Adds completions that are generated at compile time and stored under the perseus-cli package in version control. Fulfulls feature request #325. TBD is deciding the story on distribution and writing up documentation. @arctic-hen7 I would suggest we add the files to the automated GitHub release. Instructions would instruct users to download the file, copy to a sensible location, and update the shell environment files appropriately, with a subsection for each supported shell. If you I agree I can handle adding that to the CD workflow and write up the completion installation as a addendum to the existing "Installing Perseus" page.

arctic-hen7 commented 4 months ago

This is looking wonderful, thank you so much! I'm not that familiar with clap's completion system, so should the completion files be checked into Git as they currently are?

Apart from that, everything you've said about distribution and documentation sounds really good! Is the elegance of a perseus completions <shell-name> command possible with what you've done so far, or would that be a runtime system? Happy to help with getting the files into the GitHub release if you need.