1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01: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

View File

@@ -63,5 +63,22 @@ pub fn gen_man_and_comp() -> anyhow::Result<()> {
out_dir.join("assets/completions/bat.zsh"),
)?;
println!(
"cargo:rustc-env=BAT_GENERATED_COMPLETION_BASH={}",
out_dir.join("assets/completions/bat.bash").display()
);
println!(
"cargo:rustc-env=BAT_GENERATED_COMPLETION_FISH={}",
out_dir.join("assets/completions/bat.fish").display()
);
println!(
"cargo:rustc-env=BAT_GENERATED_COMPLETION_PS1={}",
out_dir.join("assets/completions/_bat.ps1").display()
);
println!(
"cargo:rustc-env=BAT_GENERATED_COMPLETION_ZSH={}",
out_dir.join("assets/completions/bat.zsh").display()
);
Ok(())
}