pub(crate) struct Cli {Show 21 fields
pub(crate) dry_run: bool,
pub(crate) verbose: bool,
pub(crate) all: bool,
pub(crate) depth: Option<i32>,
pub(crate) size: Option<String>,
pub(crate) mtime: Option<String>,
pub(crate) perm: Option<String>,
pub(crate) user: Option<String>,
pub(crate) group: Option<String>,
pub(crate) type_filter: Option<char>,
pub(crate) exclude: Option<String>,
pub(crate) stop_on_error: bool,
pub(crate) confirm: bool,
pub(crate) list_all: bool,
pub(crate) jobs: i32,
pub(crate) shell: String,
pub(crate) args: Vec<String>,
pub(crate) glob: bool,
pub(crate) regex_match: bool,
pub(crate) glob_exclude: bool,
pub(crate) expr: Option<String>,
}Expand description
Command-line interface definition using clap derive macros.
This struct defines every flag and option that shell-cmd-rs accepts.
Positional arguments (path, command, regex, extras) are collected into
the args field via trailing_var_arg.
§Compatibility
The short flags, long flags, and their semantics are identical to the
original C++ shell-cmd to ensure drop-in compatibility.
Fields§
§dry_run: boolDry-run, print commands without executing
verbose: boolVerbose, print each command before running
all: boolInclude hidden files/directories
depth: Option<i32>Max recursion depth (0 = current dir only)
size: Option<String>Filter by size: +10M (>10MB), -1K (<1KB), 4096 (exactly 4096 bytes). Suffixes: K, M, G
mtime: Option<String>Filter by modification time: +7 (older than 7 days), -1 (modified within last day), 3 (exactly 3 days)
perm: Option<String>Filter by permissions (octal), e.g. 755
user: Option<String>Filter by owner username
group: Option<String>Filter by group name
type_filter: Option<char>Filter by type: f (file), d (directory), l (symlink)
exclude: Option<String>Exclude files/directories matching REGEX
stop_on_error: boolStop on first command failure
confirm: boolPrompt for confirmation before each command
list_all: boolCollect all matches and run command once with %0 = all matched paths
jobs: i32Run N commands in parallel (default: 1)
shell: StringShell to use for execution (default: /bin/bash)
args: Vec<String>Positional args: path “command” regex [extra_args..]
glob: boolTreat pattern as a glob (*, ?) instead of regex
regex_match: boolUse regex-match (entire path must match) instead of regex-search (substring match)
glob_exclude: boolTreat exclude pattern as a glob (*, ?) instead of regex
expr: Option<String>Expression filter: compose glob(), regex(), regex_match() with and/or/not
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.