From 202a37f1a141d4a2328a37609da7dae88ff2db7d Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Sun, 27 Jun 2021 03:06:15 +0300 Subject: [PATCH] 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. --- cli/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 8e2b2eb8..6d99ad85 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -36,11 +36,12 @@ fn run() -> Result<()> { }; let matches = App::new("tree-sitter") - .version(version.as_str()) - .setting(AppSettings::SubcommandRequiredElseHelp) .author("Max Brunsfeld ") .about("Generates and tests parsers") + .version(version.as_str()) + .setting(AppSettings::SubcommandRequiredElseHelp) .global_setting(AppSettings::ColoredHelp) + .global_setting(AppSettings::DeriveDisplayOrder) .global_setting(AppSettings::DisableHelpSubcommand) .subcommand(SubCommand::with_name("init-config").about("Generate a default config file")) .subcommand(