Shell Completions in Rust

Shell Completions in Rust

Writing shell completions in bash means you get easy integration with , plus you can use the same distribution mechanism as most other shell completion scripts, which limits the chances of surprising your users. Completion scripts for a feature-ful command line application can get quite large, so having the Rust compiler around to check your work can be handy. For authors of Rust command line parsing libraries, there is the option of creating derive macros to generate completion scripts for your users (CLI app authors), and since you are creating the scripts in Rust rather than bash, you can use all the standard Rust codegen tooling rather than trying to generate completion scripts in bash.

Source: www.joshmcguigan.com