Struct run_parts::Opt [−][src]
pub struct Opt {
pub test: bool,
pub list: bool,
pub verbose: bool,
pub report: bool,
pub reverse: bool,
pub exit_on_error: bool,
pub umask: String,
pub lsbsysinit: bool,
pub regex: Option<Regex>,
pub arg: Vec<String>,
pub dir: PathBuf,
}
Expand description
run scripts or programs in a directory
Fields
test: bool
print the names of the scripts which would be run, but don’t actually run them.
list: bool
print the names of the all matching files (not limited to executables), but don’t actually run them. This option cannot be used with –test.
verbose: bool
print the name of each script to stderr before running.
report: bool
similar to –verbose, but only prints the name of scripts which produce output. The script’s name is printed to whichever of stdout or stderr the script produces output on. The script’s name is not printed to stderr if –verbose also specified.
reverse: bool
reverse the scripts’ execution order.
exit_on_error: bool
exit as soon as a script returns with a non-zero exit code.
umask: String
sets the umask to umask before running the scripts. umask should be specified in octal. By default the umask is set to 022.
lsbsysinit: bool
filename must be in one or more of either the LANANA-assigned namespace, the LSB namespaces - either hierarchical or reserved - or the Debian cron script namespace.
regex: Option<Regex>
validate filenames against custom extended regular expression REGEX.
arg: Vec<String>
pass argument to the scripts. Use –arg once for each argument you want passed.
dir: PathBuf
Implementations
Trait Implementations
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic. Read more
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
Builds the struct from the command line arguments (std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more