intermodal/bin/generate-completions
Casey Rodarmor 8c30205b02
Add shell completion scripts
Shell completion scripts can be generated for `bash`, `elvish`, `fish`,
`powershell`, and `zsh` with the `completions` subcommand:

    $ imdl completions --shell zsh > imdl.zsh

The same scripts are available in the `completions` directory. Please
refer to your shell's documentation for more information on how to
install and use completion scripts.

type: added
2020-04-07 19:01:37 -07:00

9 lines
152 B
Bash
Executable File

#!/usr/bin/env bash
set -euxo pipefail
for script in completions/*; do
shell=${script##*.}
cargo run -- completions --shell $shell > $script
done