opt!(where"There are various ways to add processes to the task list"),
opt!("--execute","-e"=>"process, args...";"Add this process to the task list with this arguments. It should be in the format 'program arg1 arg2 ...', with each sperated by whitespace and in a single argument. (this will usually require escaping the whitespace)."),
opt!("--shell-execute","-es"=>"expression";"Add this shell expression to the task list. The default shell can be specified",["ENVIRONMENT"]),
opt!("--+execute","-E";*3"Interpret the rest of the arguments as if they were passed to `--execute`. The same format should be used."),
opt!("--+shell-execute","-Es";*3"Interpret the rest of the arguments as if they were passed to `--shell-execute`. The same format should be used"),
opt!("--";*5"Read inputs from stdin and interpret them as if they were passed by `--execute`. There should be one task per line. The process will keep reading lines from stdin until an explicit termination or error occurs, or the stream is closed."),
opt!("--s";*5"The same as `--` but for `--shell-execute` instead."),
opt!(),
opt!("Explicit tasks"),
opt!(where"You can apply very specific rules to individually provided tasks.\nFull explanations are below",["EXPLICITY"]),
opt!("--path:override","-P"=>"path";*1"Override the path to search for programs in for execution. They should be in the same format as the Unix `PATH` environment variable."),
opt!("--path","-p"=>"path";*2"Append these semi-colon seperated entries to the search path for programs."),
opt!("--path:none","-N";*2"Do not use any look-up paths for finding programs for execution, assume each entry resolves to a path itself"),
opt!("ignore";*3"Don't close the stream, but don't do anything with it"),
opt!("file"=>"filename";*2"Use this file as input / output.\n\t\t\t\tFor input, if the file is not readable or nonexistant, it causes a panic.\n\t\t\t\tFor output, it appends to the file or uses a new one for output.\n\t\t\t\tIf this is not possible, it causes a panic.\n\t\t\t\tTo overwrite the files instead of appending, use file:clobber"),
opt!("file:clobber"=>"filename";"Only valid for outputs, overwrite the file and write to it, instead of appending"),
opt!("stderr";*3"Redirect stdout to the same location as stderr.\n\t\t\t\tIf there is a cycle detected here, or it is used for anything other that stdout, there is a panic"),
opt!("stdout";*3"Redirect stderr to the same location as stdout.\n\t\t\t\tIf there is a cycle detected here, or it is used for anything other that stdout, there is a panic"),
opt!(where"Controlling how processes are spawned\nThese can be overridden individually with explicit inputs"),
opt!("--uid"=>"uid";"Run as user specified by `uid`. Panics if `uid` is not a valid user id\n\t\t(note: Process must be ran as root to use this option)"),
opt!("--user"=>"user";"Same as `--uid`, except specified user is by name instead of uid"),
opt!("--gid"=>"gid";"Same as `--uid`, except runs as specific group instead of user"),
opt!("--group"=>"group";"Same as `--gid`, except specified group is by name instead of gid"),
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!("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!(where"Some environment variables can control the behaviour of the program also"),
opt!("RUST_LOG"),
opt!(where"Controls the logging level of the parent process\nThese can be surpressed entirely by `--silent` or `--stfu`\nIf the var is not set, the default level is used."),
opt!(where"Using the `-*x` / `--*-spec` family of arguments, the options for explicit dispatch are described here\nThe options are provided in the form `<opt>=<value>:<opt2>=<value2>...`. `value`\nThe opt-value pairs are described below. Some can be specified multiple times if said so."),
opt!(where"For options that consume the rest of arguments or parent's stdin, a trailing option must be specified which determines which option the trailing arguments are to specify.\nEach argument is substituted for the trailing option, producing individual tasks with that option changed.\nThe format of trailing options is `:<opt>` at the end of the argument, with no value.")
]
}
fndetaching()-> implIterator<Item=Opt>
{
iter![
opt!(in"DETACHING"),
opt!(where"The behaviour of processes with the `detach` option set (or global `--detach` flag) is different than that of normal child processes.\nThe following flags / explicit options do not work"),
opt!("--completion",":c";"Cannot wait on a detached process"),
opt!("--timeout",":timeout";"Cannot wait on a detached process"),
opt!(),
opt!("--stdin","--stdout","--stderr",":stdin",":stdout",":stderr";"I/O redirection directives `inherit` and `ignore` do not work on detached processes. If `ignore` (default) is specified, the stream is closed instead."),