diff options
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/args.rs b/src/args.rs index bae31f2..5186373 100644 --- a/src/args.rs +++ b/src/args.rs @@ -12,15 +12,18 @@ pub fn parse() -> CommandLineOptions { .about("Prints a fancy prompt") .author(crate_authors!()) .version(crate_version!()) - .arg(clap::Arg::with_name("prompt-escape") - .long("prompt-escape") - .value_name("SHELL") - .help("Produces escape sequence wrappers for the given shell") - .takes_value(true)) - .arg(clap::Arg::with_name("error-code") - .value_name("ERROR_CODE") - .help("The error code of the previously run command") - ) + .arg( + clap::Arg::with_name("prompt-escape") + .long("prompt-escape") + .value_name("SHELL") + .help("Produces escape sequence wrappers for the given shell") + .takes_value(true), + ) + .arg( + clap::Arg::with_name("error-code") + .value_name("ERROR_CODE") + .help("The error code of the previously run command"), + ) .get_matches(); let shell = matches @@ -32,9 +35,5 @@ pub fn parse() -> CommandLineOptions { .map(|code| code.parse().expect("error code must be a u8")) .unwrap_or(0); - CommandLineOptions { - shell, - error_code, - } + CommandLineOptions { shell, error_code } } - |