Auto merge of #905 - peppsac:fish_subcommand_help, r=kbknapp

imp: add fish subcommand help support

Adds the `-d help_string` parameter to fish completion is present.

Example output:
```
complete -c mm3d -n "__fish_using_command mm3d" -f -a "Ann" -d "matches points [...]"
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/905)
<!-- Reviewable:end -->
This commit is contained in:
Homu 2017-03-18 03:15:57 +09:00
commit 8edb1f9808
2 changed files with 568 additions and 565 deletions

View file

@ -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");
}

File diff suppressed because it is too large Load diff