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 1e356e2 commit 6ee1140
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4240,4 +4240,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 6ee1140

Please sign in to comment.