mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
Merge #2085
2085: Don't print spaces in long help r=pksunkara a=knightpp Co-authored-by: Danil Kondratiev <knightpp@protonmail.com>
This commit is contained in:
commit
8454136126
3 changed files with 21 additions and 18 deletions
|
@ -353,7 +353,10 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> {
|
||||||
&& h_w > (self.term_w - taken);
|
&& h_w > (self.term_w - taken);
|
||||||
|
|
||||||
debug!("Help::val: Has switch...");
|
debug!("Help::val: Has switch...");
|
||||||
if arg.has_switch() {
|
if self.use_long {
|
||||||
|
// long help prints messages on the next line so it don't need to align text
|
||||||
|
debug!("Help::val: printing long help so skip aligment");
|
||||||
|
} else if arg.has_switch() {
|
||||||
debug!("Yes");
|
debug!("Yes");
|
||||||
debug!("Help::val: force_next_line...{:?}", self.force_next_line);
|
debug!("Help::val: force_next_line...{:?}", self.force_next_line);
|
||||||
debug!("Help::val: nlh...{:?}", nlh);
|
debug!("Help::val: nlh...{:?}", nlh);
|
||||||
|
|
|
@ -111,10 +111,10 @@ USAGE:
|
||||||
clap-test
|
clap-test
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information
|
Prints version information
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,16 +361,16 @@ USAGE:
|
||||||
prog [FLAGS]
|
prog [FLAGS]
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
--config
|
--config
|
||||||
The config file used by the myprog must be in JSON format
|
The config file used by the myprog must be in JSON format
|
||||||
with only valid keys and may not contain other nonsense
|
with only valid keys and may not contain other nonsense
|
||||||
that cannot be read by this program. Obviously I'm going on
|
that cannot be read by this program. Obviously I'm going on
|
||||||
and on, so I'll stop now.
|
and on, so I'll stop now.
|
||||||
|
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information";
|
Prints version information";
|
||||||
|
|
||||||
static CUSTOM_VERSION_AND_HELP: &str = "customize 0.1
|
static CUSTOM_VERSION_AND_HELP: &str = "customize 0.1
|
||||||
|
@ -522,14 +522,14 @@ USAGE:
|
||||||
myapp [arg1]
|
myapp [arg1]
|
||||||
|
|
||||||
ARGS:
|
ARGS:
|
||||||
<arg1>
|
<arg1>
|
||||||
some option
|
some option
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information";
|
Prints version information";
|
||||||
|
|
||||||
static HIDE_ENV_VALS: &str = "ctest 0.1
|
static HIDE_ENV_VALS: &str = "ctest 0.1
|
||||||
|
@ -1626,10 +1626,10 @@ USAGE:
|
||||||
ctest foo
|
ctest foo
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information";
|
Prints version information";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -57,16 +57,16 @@ USAGE:
|
||||||
test [FLAGS]
|
test [FLAGS]
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-c, --config
|
-c, --config
|
||||||
Some help text describing the --config arg
|
Some help text describing the --config arg
|
||||||
|
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information
|
Prints version information
|
||||||
|
|
||||||
-v, --visible
|
-v, --visible
|
||||||
This text should be visible";
|
This text should be visible";
|
||||||
|
|
||||||
/// Ensure hidden with short option
|
/// Ensure hidden with short option
|
||||||
|
@ -131,13 +131,13 @@ USAGE:
|
||||||
test [FLAGS]
|
test [FLAGS]
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help
|
-h, --help
|
||||||
Prints help information
|
Prints help information
|
||||||
|
|
||||||
-V, --version
|
-V, --version
|
||||||
Prints version information
|
Prints version information
|
||||||
|
|
||||||
-v, --visible
|
-v, --visible
|
||||||
This text should be visible";
|
This text should be visible";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Reference in a new issue