Skip to content

Commit 1db5387

Browse files
committed
Split top-level usage for --version and --help
The top-level --help is affected by OPTIONS, i.e. --color and -C, whereas --version is not affected by any OPTIONS, so differt usages.
1 parent 72920db commit 1db5387

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ fn get_base_command(color_choice: Option<termcolor::ColorChoice>) -> clap::Comma
5555
.about("Maintain a stack of patches on top of a Git branch.")
5656
.override_usage(
5757
"stg [OPTIONS] <command> [...]\n \
58-
stg [OPTIONS] <--version|-h|--help>",
58+
stg [OPTIONS] <-h|--help>\n \
59+
stg --version",
5960
)
6061
.global_setting(clap::AppSettings::DeriveDisplayOrder)
6162
.help_expected(true)

0 commit comments

Comments
 (0)