pub struct FlagTolerance {
pub unknown: UnknownTolerance,
pub numeric_dash: bool,
pub single_dash_words: bool,
pub reads_commands: CommandSources,
}Expand description
How the dispatcher treats tokens that look like flags but aren’t in the
allowlist. unknown controls flag-shaped unknowns; numeric_dash opts
into -NUMBER shorthand (e.g. head -20); single_dash_words stops a single-dash token
being read as a cluster of short flags, for tools whose options are whole words (exiftool -if
is one option that runs Perl, never -i -f). reads_commands.plus is for a pager or editor that
runs a +word operand as its first command (less +!id, vim '+!id'): only a line number
(+42) or a bare + passes. reads_commands.stdin is for one that reads keystrokes from a
standard input that is not a terminal (printf ':!id\n' | vim): fed anything, it is refused.
Fields§
§unknown: UnknownTolerance§numeric_dash: bool§single_dash_words: bool§reads_commands: CommandSourcesImplementations§
Source§impl FlagTolerance
impl FlagTolerance
Trait Implementations§
Source§impl Clone for FlagTolerance
impl Clone for FlagTolerance
impl Copy for FlagTolerance
Source§impl Debug for FlagTolerance
impl Debug for FlagTolerance
Auto Trait Implementations§
impl Forget for FlagTolerance
impl Freeze for FlagTolerance
impl Move for FlagTolerance
impl RefUnwindSafe for FlagTolerance
impl Send for FlagTolerance
impl Sync for FlagTolerance
impl Unpin for FlagTolerance
impl UnsafeUnpin for FlagTolerance
impl UnwindSafe for FlagTolerance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more