mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
commit
01994467d5
4 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
<a name="v2.15.1"></a>
|
||||||
|
### v2.16.2 (2016-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
#### Bug Fixes
|
||||||
|
|
||||||
|
* **Fish Completions:** fixes a bug where single quotes are not escaped ([780b4a18](https://github.com/kbknapp/clap-rs/commit/780b4a18281b6f7f7071e1b9db2290fae653c406), closes [#704](https://github.com/kbknapp/clap-rs/issues/704))
|
||||||
|
|
||||||
|
|
||||||
<a name="v2.16.1"></a>
|
<a name="v2.16.1"></a>
|
||||||
### v2.16.1 (2016-10-24)
|
### v2.16.1 (2016-10-24)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
|
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "2.16.1"
|
version = "2.16.2"
|
||||||
authors = ["Kevin K. <kbknapp@gmail.com>"]
|
authors = ["Kevin K. <kbknapp@gmail.com>"]
|
||||||
exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"]
|
exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"]
|
||||||
repository = "https://github.com/kbknapp/clap-rs.git"
|
repository = "https://github.com/kbknapp/clap-rs.git"
|
||||||
|
|
|
@ -41,6 +41,12 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
|
||||||
|
|
||||||
## What's New
|
## What's New
|
||||||
|
|
||||||
|
Here's the highlights for v2.16.2
|
||||||
|
|
||||||
|
* Fixes a bug where single quotes are not escaped
|
||||||
|
|
||||||
|
Here's the highlights for v2.16.1
|
||||||
|
|
||||||
* **Help Message:** fixes a regression bug where args with multiple(true) threw off alignment
|
* **Help Message:** fixes a regression bug where args with multiple(true) threw off alignment
|
||||||
|
|
||||||
Here's the highlights for v2.16.0
|
Here's the highlights for v2.16.0
|
||||||
|
|
|
@ -58,7 +58,7 @@ fn gen_fish_inner(root_command: &str,
|
||||||
// -f # don't use file completion
|
// -f # don't use file completion
|
||||||
// -n "__fish_using_command myprog subcmd1" # complete for command "myprog subcmd1"
|
// -n "__fish_using_command myprog subcmd1" # complete for command "myprog subcmd1"
|
||||||
|
|
||||||
let basic_template = format!("complete -c {} -n '__fish_using_command {}'",
|
let basic_template = format!("complete -c {} -n \"__fish_using_command {}\"",
|
||||||
root_command,
|
root_command,
|
||||||
parent_cmds);
|
parent_cmds);
|
||||||
|
|
||||||
|
@ -71,10 +71,10 @@ fn gen_fish_inner(root_command: &str,
|
||||||
template.push_str(format!(" -l {}", data).as_str());
|
template.push_str(format!(" -l {}", data).as_str());
|
||||||
}
|
}
|
||||||
if let Some(data) = option.help {
|
if let Some(data) = option.help {
|
||||||
template.push_str(format!(" -d '{}'", data).as_str());
|
template.push_str(format!(" -d \"{}\"", data).as_str());
|
||||||
}
|
}
|
||||||
if let Some(ref data) = option.possible_vals {
|
if let Some(ref data) = option.possible_vals {
|
||||||
template.push_str(format!(" -r -f -a '{}'", data.join(" ")).as_str());
|
template.push_str(format!(" -r -f -a \"{}\"", data.join(" ")).as_str());
|
||||||
}
|
}
|
||||||
buffer.push_str(template.as_str());
|
buffer.push_str(template.as_str());
|
||||||
buffer.push_str("\n");
|
buffer.push_str("\n");
|
||||||
|
@ -89,7 +89,7 @@ fn gen_fish_inner(root_command: &str,
|
||||||
template.push_str(format!(" -l {}", data).as_str());
|
template.push_str(format!(" -l {}", data).as_str());
|
||||||
}
|
}
|
||||||
if let Some(data) = flag.help {
|
if let Some(data) = flag.help {
|
||||||
template.push_str(format!(" -d '{}'", data).as_str());
|
template.push_str(format!(" -d \"{}\"", data).as_str());
|
||||||
}
|
}
|
||||||
buffer.push_str(template.as_str());
|
buffer.push_str(template.as_str());
|
||||||
buffer.push_str("\n");
|
buffer.push_str("\n");
|
||||||
|
@ -98,7 +98,7 @@ fn gen_fish_inner(root_command: &str,
|
||||||
for subcommand in &comp_gen.p.subcommands {
|
for subcommand in &comp_gen.p.subcommands {
|
||||||
let mut template = basic_template.clone();
|
let mut template = basic_template.clone();
|
||||||
template.push_str(" -f");
|
template.push_str(" -f");
|
||||||
template.push_str(format!(" -a '{}'", &subcommand.p.meta.name).as_str());
|
template.push_str(format!(" -a \"{}\"", &subcommand.p.meta.name).as_str());
|
||||||
buffer.push_str(template.as_str());
|
buffer.push_str(template.as_str());
|
||||||
buffer.push_str("\n");
|
buffer.push_str("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue