Skip to content

Commit 202a37f

Browse files
committed
chore(cli): Use DeriveDisplayOrder Clap's setting
To show sub commands in the defined order that looks more accurate and have more meaning for sub commands use order.
1 parent 2e2b239 commit 202a37f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ fn run() -> Result<()> {
3636
};
3737

3838
let matches = App::new("tree-sitter")
39-
.version(version.as_str())
40-
.setting(AppSettings::SubcommandRequiredElseHelp)
4139
.author("Max Brunsfeld <[email protected]>")
4240
.about("Generates and tests parsers")
41+
.version(version.as_str())
42+
.setting(AppSettings::SubcommandRequiredElseHelp)
4343
.global_setting(AppSettings::ColoredHelp)
44+
.global_setting(AppSettings::DeriveDisplayOrder)
4445
.global_setting(AppSettings::DisableHelpSubcommand)
4546
.subcommand(SubCommand::with_name("init-config").about("Generate a default config file"))
4647
.subcommand(

0 commit comments

Comments
 (0)