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 parser-visible zsh option state.
The fields here intentionally cover options that can change syntax,
tokenization, or word interpretation. They are not a full zsh runtime option
table. Use ZshOptionState::zsh_default for native zsh parsing, then
apply setopt, unsetopt, or emulate effects when a caller has already
discovered them.
Fields§
§sh_word_split: OptionValueWhether unquoted parameter expansion is treated as eligible for shell-style word splitting.
glob_subst: OptionValueWhether parameter expansion results are treated as glob patterns.
rc_expand_param: OptionValueWhether array parameters can participate in brace-like expansion.
glob: OptionValueWhether ordinary filename generation is enabled.
nomatch: OptionValueWhether unmatched filename-generation patterns are treated as errors.
null_glob: OptionValueWhether unmatched filename-generation patterns can expand to nothing.
csh_null_glob: OptionValueWhether csh-style null glob handling is enabled.
extended_glob: OptionValueWhether zsh extended glob operators are enabled.
ksh_glob: OptionValueWhether ksh-style glob operators are enabled.
sh_glob: OptionValueWhether sh-compatible glob parsing is enabled.
bare_glob_qual: OptionValueWhether unparenthesized zsh glob qualifiers are enabled.
glob_dots: OptionValueWhether glob patterns match dotfiles without an explicit dot.
equals: OptionValueWhether leading = words are eligible for command-path expansion.
magic_equal_subst: OptionValueWhether assignment-like words can apply = expansion after the first
equals sign.
sh_file_expansion: OptionValueWhether file expansion follows sh-compatible ordering.
glob_assign: OptionValueWhether assignment values can be parsed as glob assignments.
ignore_braces: OptionValueWhether brace characters should be treated literally instead of as zsh brace syntax.
ignore_close_braces: OptionValueWhether unmatched closing braces should be treated literally.
brace_ccl: OptionValueWhether character-class brace expansion syntax is enabled.
ksh_arrays: OptionValueWhether array indexing follows ksh-style zero-based behavior.
ksh_zero_subscript: OptionValueWhether subscript zero is accepted with ksh-style array semantics.
short_loops: OptionValueWhether zsh short loop forms are accepted.
short_repeat: OptionValueWhether zsh short repeat forms are accepted.
rc_quotes: OptionValueWhether doubled single quotes are decoded inside single-quoted strings.
interactive_comments: OptionValueWhether # starts comments in interactive-style zsh parsing contexts.
c_bases: OptionValueWhether C-style numeric base prefixes are accepted in arithmetic text.
octal_zeroes: OptionValueWhether leading zeroes are interpreted as octal arithmetic literals.
Implementations§
Source§impl ZshOptionState
impl ZshOptionState
Sourcepub const fn zsh_default() -> Self
pub const fn zsh_default() -> Self
Default zsh option state used for native zsh parsing.
This is the parser’s baseline before source-level commands such as
emulate, setopt, and unsetopt are considered.
Sourcepub fn for_emulate(mode: ZshEmulationMode) -> Self
pub fn for_emulate(mode: ZshEmulationMode) -> Self
Return the option state implied by emulate <mode>.
This models the subset of emulation effects that the parser currently
needs. Callers can further refine the returned state with
ZshOptionState::apply_setopt and ZshOptionState::apply_unsetopt.
Sourcepub fn apply_setopt(&mut self, name: &str) -> bool
pub fn apply_setopt(&mut self, name: &str) -> bool
Apply a zsh setopt-style option name to this snapshot.
Names are matched with zsh-style aliases, underscores, and no_
prefixes where supported by this parser. Returns true when the option
name was recognized and this snapshot was updated.
Sourcepub fn apply_unsetopt(&mut self, name: &str) -> bool
pub fn apply_unsetopt(&mut self, name: &str) -> bool
Apply a zsh unsetopt-style option name to this snapshot.
Names are matched with zsh-style aliases, underscores, and no_
prefixes where supported by this parser. Returns true when the option
name was recognized and this snapshot was updated.
Trait Implementations§
Source§impl Clone for ZshOptionState
impl Clone for ZshOptionState
Source§fn clone(&self) -> ZshOptionState
fn clone(&self) -> ZshOptionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ZshOptionState
impl Debug for ZshOptionState
Source§impl Hash for ZshOptionState
impl Hash for ZshOptionState
Source§impl PartialEq for ZshOptionState
impl PartialEq for ZshOptionState
Source§fn eq(&self, other: &ZshOptionState) -> bool
fn eq(&self, other: &ZshOptionState) -> bool
self and other values to be equal, and is used by ==.