diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-03-26 12:15:15 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-03-26 15:15:24 +0200 |
commit | 1ff26b2ded7052d87617ea6f38b727e34e646ee9 (patch) | |
tree | 40daae65452c9ecb761f6479355cc5b1b847960c /tool/build.rs | |
parent | a1b1ccd7d85f453e16cc11b38884759df306d4fa (diff) |
tool: Create completion scripts for bash and fish.
Diffstat (limited to 'tool/build.rs')
-rw-r--r-- | tool/build.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tool/build.rs b/tool/build.rs new file mode 100644 index 00000000..7517a2fb --- /dev/null +++ b/tool/build.rs @@ -0,0 +1,17 @@ +extern crate clap; + +use std::env; +use clap::Shell; + +include!("src/cli.rs"); + +fn main() { + let outdir = match env::var_os("OUT_DIR") { + None => return, + Some(outdir) => outdir, + }; + let mut app = build(); + for shell in &[Shell::Bash, Shell::Fish] { + app.gen_completions("sq", *shell, &outdir); + } +} |