mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
fix(help): Use standard alternate syntax for subcommands
This commit is contained in:
parent
9a83ada940
commit
3475555de6
3 changed files with 7 additions and 7 deletions
|
@ -58,7 +58,7 @@ pacman[EXE]-sync
|
|||
Synchronize packages.
|
||||
|
||||
USAGE:
|
||||
pacman[EXE] {sync, --sync, -S} [OPTIONS] [--] [package]...
|
||||
pacman[EXE] {sync|--sync|-S} [OPTIONS] [--] [package]...
|
||||
|
||||
ARGS:
|
||||
<package>... packages
|
||||
|
@ -77,7 +77,7 @@ $ pacman -S -s foo -i bar
|
|||
error: The argument '--search <search>...' cannot be used with '--info'
|
||||
|
||||
USAGE:
|
||||
pacman[EXE] {sync, --sync, -S} --search <search>... <package>...
|
||||
pacman[EXE] {sync|--sync|-S} --search <search>... <package>...
|
||||
|
||||
For more information try --help
|
||||
|
||||
|
|
|
@ -4003,11 +4003,11 @@ impl<'help> App<'help> {
|
|||
let mut sc_names = sc.name.clone();
|
||||
let mut flag_subcmd = false;
|
||||
if let Some(l) = sc.long_flag {
|
||||
write!(sc_names, ", --{}", l).unwrap();
|
||||
write!(sc_names, "|--{}", l).unwrap();
|
||||
flag_subcmd = true;
|
||||
}
|
||||
if let Some(s) = sc.short_flag {
|
||||
write!(sc_names, ", -{}", s).unwrap();
|
||||
write!(sc_names, "|-{}", s).unwrap();
|
||||
flag_subcmd = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ static FLAG_SUBCOMMAND_HELP: &str = "pacman-query
|
|||
Query the package database.
|
||||
|
||||
USAGE:
|
||||
pacman {query, --query, -Q} [OPTIONS]
|
||||
pacman {query|--query|-Q} [OPTIONS]
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Print help information
|
||||
|
@ -507,7 +507,7 @@ static FLAG_SUBCOMMAND_NO_SHORT_HELP: &str = "pacman-query
|
|||
Query the package database.
|
||||
|
||||
USAGE:
|
||||
pacman {query, --query} [OPTIONS]
|
||||
pacman {query|--query} [OPTIONS]
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Print help information
|
||||
|
@ -560,7 +560,7 @@ static FLAG_SUBCOMMAND_NO_LONG_HELP: &str = "pacman-query
|
|||
Query the package database.
|
||||
|
||||
USAGE:
|
||||
pacman {query, -Q} [OPTIONS]
|
||||
pacman {query|-Q} [OPTIONS]
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Print help information
|
||||
|
|
Loading…
Reference in a new issue