Skip to main content

ZshOptionState

Struct ZshOptionState 

Source
pub struct ZshOptionState {
Show 27 fields pub sh_word_split: OptionValue, pub glob_subst: OptionValue, pub rc_expand_param: OptionValue, pub glob: OptionValue, pub nomatch: OptionValue, pub null_glob: OptionValue, pub csh_null_glob: OptionValue, pub extended_glob: OptionValue, pub ksh_glob: OptionValue, pub sh_glob: OptionValue, pub bare_glob_qual: OptionValue, pub glob_dots: OptionValue, pub equals: OptionValue, pub magic_equal_subst: OptionValue, pub sh_file_expansion: OptionValue, pub glob_assign: OptionValue, pub ignore_braces: OptionValue, pub ignore_close_braces: OptionValue, pub brace_ccl: OptionValue, pub ksh_arrays: OptionValue, pub ksh_zero_subscript: OptionValue, pub short_loops: OptionValue, pub short_repeat: OptionValue, pub rc_quotes: OptionValue, pub interactive_comments: OptionValue, pub c_bases: OptionValue, pub octal_zeroes: OptionValue,
}
Expand description

Snapshot of zsh option state used by the parser and lexer.

Fields§

§sh_word_split: OptionValue

State of the sh_word_split option.

§glob_subst: OptionValue

State of the glob_subst option.

§rc_expand_param: OptionValue

State of the rc_expand_param option.

§glob: OptionValue

State of the glob option.

§nomatch: OptionValue

State of the nomatch option.

§null_glob: OptionValue

State of the null_glob option.

§csh_null_glob: OptionValue

State of the csh_null_glob option.

§extended_glob: OptionValue

State of the extended_glob option.

§ksh_glob: OptionValue

State of the ksh_glob option.

§sh_glob: OptionValue

State of the sh_glob option.

§bare_glob_qual: OptionValue

State of the bare_glob_qual option.

§glob_dots: OptionValue

State of the glob_dots option.

§equals: OptionValue

State of the equals option.

§magic_equal_subst: OptionValue

State of the magic_equal_subst option.

§sh_file_expansion: OptionValue

State of the sh_file_expansion option.

§glob_assign: OptionValue

State of the glob_assign option.

§ignore_braces: OptionValue

State of the ignore_braces option.

§ignore_close_braces: OptionValue

State of the ignore_close_braces option.

§brace_ccl: OptionValue

State of the brace_ccl option.

§ksh_arrays: OptionValue

State of the ksh_arrays option.

§ksh_zero_subscript: OptionValue

State of the ksh_zero_subscript option.

§short_loops: OptionValue

State of the short_loops option.

§short_repeat: OptionValue

State of the short_repeat option.

§rc_quotes: OptionValue

State of the rc_quotes option.

§interactive_comments: OptionValue

State of the interactive_comments option.

§c_bases: OptionValue

State of the c_bases option.

§octal_zeroes: OptionValue

State of the octal_zeroes option.

Implementations§

Source§

impl ZshOptionState

Source

pub const fn zsh_default() -> Self

Default zsh option state used for native zsh parsing.

Source

pub fn for_emulate(mode: ZshEmulationMode) -> Self

Option state implied by emulate <mode>.

Source

pub fn apply_setopt(&mut self, name: &str) -> bool

Apply a zsh setopt-style option name.

Returns true when the option name was recognized.

Source

pub fn apply_unsetopt(&mut self, name: &str) -> bool

Apply a zsh unsetopt-style option name.

Returns true when the option name was recognized.

Source

pub fn merge(&self, other: &Self) -> Self

Merge two option snapshots field by field.

Trait Implementations§

Source§

impl Clone for ZshOptionState

Source§

fn clone(&self) -> ZshOptionState

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ZshOptionState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ZshOptionState

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ZshOptionState

Source§

fn eq(&self, other: &ZshOptionState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ZshOptionState

Source§

impl StructuralPartialEq for ZshOptionState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.