Avril 4 years ago
parent 811ffc3ed7
commit 8d7281c966
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -27,13 +27,12 @@ Usage: {prog} --help
{opts}
"#,
prog = prog_name(),
//OPTIONS = "OPTIONS".bright_blue().bold(),
opts = usage::sections().map(|x| lazy_format!("{}", x)).join("\n").trim());
}
/// Print usage then exit
/// Print usage then exit with code 0
#[inline(always)] pub fn usage() -> !
{
print_usage();
std::process::exit(1)
std::process::exit(0)
}

@ -206,13 +206,14 @@ impl fmt::Display for Opt
opt!(in "COMPLETION"),
opt!(where "Directives for how to handle abnormal process completion (i.e. non-zero exit codes)\nThis does not apply to `detached` processes", ["DETACHING"]),
opt!("ignore"; * 2 "Ignore process return code", ""),
opt!("supercede"; * 2 "If return code is a non-zero code, use it as the return code for the parent (this) process.\n\t\t\tIf there are multiple non-zero return codes, it is not specified which is returned"),
opt!("terminate"; * 2 "If return code is a non-zero code, abort all running children and return the code as this process' return code immediately"),
opt!("wait"; * 3 "Same as `terminate`, except waits for currently active processes to complete before aborting"),
opt!("log"; * 3 "Write the code to this process' `stderr` if non-zero"),
opt!("file" => "filename"; "If non-zero, write the code to a file if non-zero. If unable to write to the file, it is ignored"),
opt!("retry" => "number"; "If non-zero, restart the process up to `number` times.\n\t\t\tIf `number` if 'inf', retry indefinately (this can cause an infinite loop if program never completes with zero exit code)"),
opt!("ignore"; * 3 "Ignore process return code", ""),
opt!("supercede"; * 3 "If return code is a non-zero code, use it as the return code for the parent (this) process.\n\t\t\t\tIf there are multiple non-zero return codes, it is not specified which is returned"),
opt!("terminate"; * 3 "If return code is a non-zero code, abort all running children and return the code as this process' return code immediately"),
opt!("wait"; * 4 "Same as `terminate`, except waits for currently active processes to complete before aborting"),
opt!("log"; * 4 "Write the code to this process' `stderr` if non-zero"),
opt!("file" => "filename"; * 2 "If non-zero, append the code to a file if non-zero. If unable to write to the file, it is ignored"),
opt!("file:clobber" => "filename"; "If non-zero, (over)write the code to a file if non-zero. If unable to write to the file, it is ignored"),
opt!("retry" => "number"; * 2 "If non-zero, restart the process up to `number` times.\n\t\t\t\tIf `number` if `inf`, retry indefinately (this can cause an infinite loop if program never completes with zero exit code)"),
opt!()
]

@ -1,4 +1,3 @@
use super::*;
use std::fmt;
pub trait FlatJoinStrsExt: Sized

@ -1,5 +1,3 @@
#![feature(min_const_generics)]
#![allow(dead_code)]
#[macro_use] extern crate log;

Loading…
Cancel
Save