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.
This commit is contained in:
Andrew Hlynskyi 2021-06-27 03:06:15 +03:00
parent 2e2b239c42
commit 202a37f1a1

View file

@ -36,11 +36,12 @@ fn run() -> Result<()> {
};
let matches = App::new("tree-sitter")
.version(version.as_str())
.setting(AppSettings::SubcommandRequiredElseHelp)
.author("Max Brunsfeld <maxbrunsfeld@gmail.com>")
.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(