Skip to content

Commit

Permalink
feat(completions/zsh.rs): Escape possible values for options
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Jan 15, 2018
1 parent 2cbbfa8 commit 25561de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/completions/zsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ fn write_opts_of(p: &Parser) -> String {
""
};
let pv = if let Some(pv_vec) = o.possible_vals() {
format!(": :({})", pv_vec.join(" "))
format!(": :({})", pv_vec.iter().map(
|v| escape_value(*v)).collect::<Vec<String>>().join(" "))
} else {
String::new()
};
Expand Down

0 comments on commit 25561de

Please sign in to comment.