Skip to content

Commit 6ee1140

Browse files
committed
generate-shell-completion: generate uvx shell completions for the fish shell
Cc: #7258
1 parent 1e356e2 commit 6ee1140

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

crates/uv-cli/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4240,4 +4240,12 @@ pub fn generate_shell_completion(
42404240
buffer: &mut dyn std::io::Write,
42414241
) {
42424242
shell.generate(&mut Cli::command(), buffer);
4243+
// `uvx` completion
4244+
#[allow(clippy::single_match)] // Hopefully, this will be implemented for other shells as well
4245+
match shell {
4246+
clap_complete_command::Shell::Fish => {
4247+
writeln!(buffer, r#"complete -c uvx --wraps "uv tool run""#).ok();
4248+
}
4249+
_ => {}
4250+
};
42434251
}

0 commit comments

Comments
 (0)