We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb16ae4 commit 4206699Copy full SHA for 4206699
clap_builder/src/util/escape.rs
@@ -5,7 +5,7 @@ pub(crate) struct Escape<'s>(pub(crate) &'s str);
5
6
impl<'s> Escape<'s> {
7
pub(crate) fn needs_escaping(&self) -> bool {
8
- self.0.contains(char::is_whitespace)
+ self.0.is_empty() || self.0.contains(char::is_whitespace)
9
}
10
11
#[cfg(feature = "help")]
tests/builder/help.rs
@@ -2044,7 +2044,7 @@ fn empty_default_value() {
2044
Usage: default [OPTIONS]
2045
2046
Options:
2047
- --arg <argument> Pass an argument to the program. [default: ]
+ --arg <argument> Pass an argument to the program. [default: ""]
2048
-h, --help Print help
2049
-V, --version Print version
2050
0 commit comments