mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-25 11:39:14 +00:00
Show uv generate-shell-completion
in CLI documentation reference (#6146)
We need to follow this with: 1) Hide a bunch of global arguments for this command 2) Add an about section for the command
This commit is contained in:
parent
d7abe827d6
commit
b93b0f2bcd
2 changed files with 88 additions and 1 deletions
|
@ -22,6 +22,8 @@ const REPLACEMENTS: &[(&str, &str)] = &[
|
|||
),
|
||||
];
|
||||
|
||||
const SHOW_HIDDEN_COMMANDS: &[&str] = &["generate-shell-completion"];
|
||||
|
||||
#[derive(clap::Args)]
|
||||
pub(crate) struct Args {
|
||||
/// Write the generated output to stdout (rather than to `settings.md`).
|
||||
|
@ -101,7 +103,7 @@ fn generate() -> String {
|
|||
}
|
||||
|
||||
fn generate_command<'a>(output: &mut String, command: &'a Command, parents: &mut Vec<&'a Command>) {
|
||||
if command.is_hide_set() {
|
||||
if command.is_hide_set() && !SHOW_HIDDEN_COMMANDS.contains(&command.get_name()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue