Skip to content

Commit

Permalink
generate-shell-completion: generate uvx shell completions for the f…
Browse files Browse the repository at this point in the history
…ish shell

Cc: #7258
  • Loading branch information
ilyagr committed Sep 12, 2024
1 parent 8ce9b7c commit f7f99e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4032,5 +4032,12 @@ pub fn generate_shell_completion(
buffer: &mut dyn std::io::Write,
) {
shell.generate(&mut Cli::command(), buffer);

// `uvx` completion
#[allow(clippy::single_match)] // Hopefully, this will be implemented for other shells as well
match shell {
clap_complete_command::Shell::Fish => {
writeln!(buffer, r#"complete -c uvx --wraps "uv tool run""#).ok();
}
_ => {}
};
}

0 comments on commit f7f99e4

Please sign in to comment.