aboutsummaryrefslogtreecommitdiff
path: root/src/cli/spec/completion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/spec/completion.rs')
-rw-r--r--src/cli/spec/completion.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cli/spec/completion.rs b/src/cli/spec/completion.rs
new file mode 100644
index 00000000..8cc27d7b
--- /dev/null
+++ b/src/cli/spec/completion.rs
@@ -0,0 +1,14 @@
+use clap::{Arg, Command};
+
+pub(super) fn command() -> Command {
+ Command::new("completion")
+ .visible_alias("completions")
+ .about("Generate shell completion scripts")
+ .arg(
+ Arg::new("shell")
+ .value_name("SHELL")
+ .required(true)
+ .value_parser(super::super::completion::SUPPORTED_SHELLS)
+ .help("Shell to generate completions for"),
+ )
+}