1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-07 19:31:42 +00:00

Include shell completions in the executable

This commit is contained in:
einfachIrgendwer0815
2024-11-15 19:43:39 +01:00
parent f81d4dc321
commit dbe25ba5e6
6 changed files with 53 additions and 0 deletions
+11
View File
@@ -564,6 +564,17 @@ pub fn build_app(interactive_output: bool) -> Command {
.help("Do not load custom assets"),
);
#[cfg(feature = "application")]
{
app = app.arg(
Arg::new("completion")
.long("completion")
.value_name("SHELL")
.value_parser(["bash", "fish", "ps1", "zsh"])
.help("Show shell completion for a certain shell. [possible values: bash, fish, zsh, ps1]"),
);
}
#[cfg(feature = "lessopen")]
{
app = app