diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-21 03:11:56 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-21 03:11:56 -0400 |
commit | 9fe57eb08616e70344a80f40a5333e1946dc2ed8 (patch) | |
tree | a7263b86b365a7a8425ff20969987b52dc20c64a /src/cmd.rs | |
parent | 5b24e8972b1749f05907441ca2dbbcb72188dcfa (diff) | |
download | teleterm-9fe57eb08616e70344a80f40a5333e1946dc2ed8.tar.gz teleterm-9fe57eb08616e70344a80f40a5333e1946dc2ed8.zip |
improve usage information
Diffstat (limited to 'src/cmd.rs')
-rw-r--r-- | src/cmd.rs | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -56,12 +56,20 @@ pub fn parse<'a>() -> Result<clap::ArgMatches<'a>> { .arg( clap::Arg::with_name("config-file") .long("config-file") - .takes_value(true), - ); + .takes_value(true) + .value_name("FILE") + .help("Read configuration from FILE"), + ) + .global_setting(clap::AppSettings::DontCollapseArgsInUsage) + .global_setting(clap::AppSettings::GlobalVersion) + .global_setting(clap::AppSettings::UnifiedHelpMessage) + .global_setting(clap::AppSettings::VersionlessSubcommands); for cmd in COMMANDS { let subcommand = clap::SubCommand::with_name(cmd.name); - app = app.subcommand((cmd.cmd)(subcommand)); + app = app.subcommand( + (cmd.cmd)(subcommand).setting(clap::AppSettings::NextLineHelp), + ); } app.get_matches_safe().context(crate::error::ParseArgs) |