mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 23:04:23 +00:00
imp: add fish subcommand help support
This commit is contained in:
parent
b08d7d13bf
commit
f8f68cf825
2 changed files with 568 additions and 565 deletions
|
@ -95,6 +95,9 @@ fn gen_fish_inner(root_command: &str, comp_gen: &FishGen, parent_cmds: &str, buf
|
|||
let mut template = basic_template.clone();
|
||||
template.push_str(" -f");
|
||||
template.push_str(format!(" -a \"{}\"", &subcommand.p.meta.name).as_str());
|
||||
if let Some(data) = subcommand.p.meta.about {
|
||||
template.push_str(format!(" -d \"{}\"", &data).as_str())
|
||||
}
|
||||
buffer.push_str(template.as_str());
|
||||
buffer.push_str("\n");
|
||||
}
|
||||
|
|
1130
tests/completions.rs
1130
tests/completions.rs
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue