Skip to content

Commit 3817a3b

Browse files
committed
fix(fish completions): quote short options too
this should make things a bit easier for any programs that want to make '-?' an alias for '--help'
1 parent 4aefa3c commit 3817a3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clap_complete/src/shells/fish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn gen_fish_inner(
116116

117117
if let Some(shorts) = flag.get_short_and_visible_aliases() {
118118
for short in shorts {
119-
template.push_str(format!(" -s {short}").as_str());
119+
template.push_str(format!(" -s '{short}'").as_str());
120120
}
121121
}
122122

0 commit comments

Comments
 (0)