RuntimeOptions

Struct RuntimeOptions 

Source
pub struct RuntimeOptions {
Show 82 fields pub export_variables_on_modification: bool, pub notify_job_termination_immediately: bool, pub exit_on_nonzero_command_exit: bool, pub disable_filename_globbing: bool, pub remember_command_locations: bool, pub place_all_assignment_args_in_command_env: bool, pub enable_job_control: bool, pub do_not_execute_commands: bool, pub real_effective_uid_mismatch: bool, pub exit_after_one_command: bool, pub treat_unset_variables_as_error: bool, pub print_shell_input_lines: bool, pub print_commands_and_arguments: bool, pub perform_brace_expansion: bool, pub disallow_overwriting_regular_files_via_output_redirection: bool, pub shell_functions_inherit_err_trap: bool, pub enable_bang_style_history_substitution: bool, pub do_not_resolve_symlinks_when_changing_dir: bool, pub shell_functions_inherit_debug_and_return_traps: bool, pub emacs_mode: bool, pub enable_command_history: bool, pub ignore_eof: bool, pub return_first_failure_from_pipeline: bool, pub posix_mode: bool, pub vi_mode: bool, pub assoc_expand_once: bool, pub auto_cd: bool, pub cdable_vars: bool, pub cd_autocorrect_spelling: bool, pub check_hashtable_before_command_exec: bool, pub check_jobs_before_exit: bool, pub check_window_size_after_external_commands: bool, pub save_multiline_cmds_in_history: bool, pub compat31: bool, pub compat32: bool, pub compat40: bool, pub compat41: bool, pub compat42: bool, pub compat43: bool, pub compat44: bool, pub quote_all_metachars_in_completion: bool, pub expand_dir_names_on_completion: bool, pub autocorrect_dir_spelling_on_completion: bool, pub glob_matches_dotfiles: bool, pub exit_on_exec_fail: bool, pub expand_aliases: bool, pub enable_debugger: bool, pub extended_globbing: bool, pub extquote: bool, pub fail_expansion_on_globs_without_match: bool, pub force_fignore: bool, pub glob_ranges_use_c_locale: bool, pub enable_star_star_glob: bool, pub errors_in_gnu_format: bool, pub append_to_history_file: bool, pub allow_reedit_failed_history_subst: bool, pub allow_modifying_history_substitution: bool, pub enable_hostname_completion: bool, pub send_sighup_to_all_jobs_on_exit: bool, pub command_subst_inherits_errexit: bool, pub interactive_comments: bool, pub run_last_pipeline_cmd_in_current_shell: bool, pub embed_newlines_in_multiline_cmds_in_history: bool, pub local_vars_inherit_value_and_attrs: bool, pub localvar_unset: bool, pub login_shell: bool, pub mail_warn: bool, pub no_empty_cmd_completion: bool, pub case_insensitive_pathname_expansion: bool, pub case_insensitive_conditionals: bool, pub expand_non_matching_patterns_to_null: bool, pub programmable_completion: bool, pub programmable_completion_alias: bool, pub expand_prompt_strings: bool, pub restricted_shell: bool, pub shift_verbose: bool, pub source_builtin_searches_path: bool, pub echo_builtin_expands_escape_sequences: bool, pub interactive: bool, pub read_commands_from_stdin: bool, pub sh_mode: bool, pub max_function_call_depth: Option<usize>,
}
Expand description

Runtime changeable options for a shell instance.

Fields§

§export_variables_on_modification: bool

-a

§notify_job_termination_immediately: bool

-b

§exit_on_nonzero_command_exit: bool

-e

§disable_filename_globbing: bool

-f

§remember_command_locations: bool

-h

§place_all_assignment_args_in_command_env: bool

-k

§enable_job_control: bool

-m

§do_not_execute_commands: bool

-n

§real_effective_uid_mismatch: bool

-p

§exit_after_one_command: bool

-t

§treat_unset_variables_as_error: bool

-u

§print_shell_input_lines: bool

-v

§print_commands_and_arguments: bool

-x

§perform_brace_expansion: bool

-B

§disallow_overwriting_regular_files_via_output_redirection: bool

-C

§shell_functions_inherit_err_trap: bool

-E

§enable_bang_style_history_substitution: bool

-H

§do_not_resolve_symlinks_when_changing_dir: bool

-P

§shell_functions_inherit_debug_and_return_traps: bool

-T

§emacs_mode: bool

‘emacs’

§enable_command_history: bool

‘history’

§ignore_eof: bool

‘ignoreeof’

§return_first_failure_from_pipeline: bool

‘pipefail’

§posix_mode: bool

‘posix’

§vi_mode: bool

‘vi’

§assoc_expand_once: bool

assoc_expand_once

§auto_cd: bool

‘autocd’

§cdable_vars: bool

cdable_vars

§cd_autocorrect_spelling: bool

‘cdspell’

§check_hashtable_before_command_exec: bool

‘checkhash’

§check_jobs_before_exit: bool

‘checkjobs’

§check_window_size_after_external_commands: bool

‘checkwinsize’

§save_multiline_cmds_in_history: bool

‘cmdhist’

§compat31: bool

‘compat31’

§compat32: bool

‘compat32’

§compat40: bool

‘compat40’

§compat41: bool

‘compat41’

§compat42: bool

‘compat42’

§compat43: bool

‘compat43’

§compat44: bool

‘compat44’

§quote_all_metachars_in_completion: bool

complete_fullquote

§expand_dir_names_on_completion: bool

‘direxpand’

§autocorrect_dir_spelling_on_completion: bool

‘dirspell’

§glob_matches_dotfiles: bool

‘dotglob’

§exit_on_exec_fail: bool

‘execfail’

§expand_aliases: bool

expand_aliases

§enable_debugger: bool

‘extdebug’

§extended_globbing: bool

‘extglob’

§extquote: bool

‘extquote’

§fail_expansion_on_globs_without_match: bool

‘failglob’

§force_fignore: bool

force_fignore

§glob_ranges_use_c_locale: bool

‘globasciiranges’

§enable_star_star_glob: bool

‘globstar’

§errors_in_gnu_format: bool

gnu_errfmt

§append_to_history_file: bool

‘histappend’

§allow_reedit_failed_history_subst: bool

‘histreedit’

§allow_modifying_history_substitution: bool

‘histverify’

§enable_hostname_completion: bool

‘hostcomplete’

§send_sighup_to_all_jobs_on_exit: bool

‘huponexit’

§command_subst_inherits_errexit: bool

inherit_errexit

§interactive_comments: bool

interactive_comments

§run_last_pipeline_cmd_in_current_shell: bool

‘lastpipe’

§embed_newlines_in_multiline_cmds_in_history: bool

‘lithist’

§local_vars_inherit_value_and_attrs: bool

localvar_inherit

§localvar_unset: bool

localvar_unset

§login_shell: bool

login_shell

§mail_warn: bool

‘mailwarn’

§no_empty_cmd_completion: bool

no_empty_cmd_completion

§case_insensitive_pathname_expansion: bool

‘nocaseglob’

§case_insensitive_conditionals: bool

‘nocasematch’

§expand_non_matching_patterns_to_null: bool

‘nullglob’

§programmable_completion: bool

‘progcomp’

§programmable_completion_alias: bool

progcomp_alias

§expand_prompt_strings: bool

‘promptvars’

§restricted_shell: bool

restricted_shell

§shift_verbose: bool

shift_verbose

§source_builtin_searches_path: bool

sourcepath

§echo_builtin_expands_escape_sequences: bool

xpg_echo

§interactive: bool

Whether or not the shell is interactive.

§read_commands_from_stdin: bool

Whether or not the shell is reading commands from standard input.

§sh_mode: bool

Whether or not the shell is in maximal sh compatibility mode.

§max_function_call_depth: Option<usize>

Maximum function call depth.

Implementations§

Source§

impl RuntimeOptions

Source

pub fn defaults_from(create_options: &CreateOptions) -> Self

Creates a default set of runtime options based on the given creation options.

§Arguments
  • create_options - The options used to create the shell.
Source

pub fn get_option_flags(&self) -> String

Returns a string representing the current set-style option flags set in the shell.

Source

pub fn get_set_o_optstr(&self) -> String

Returns a colon-separated list of sorted ‘set -o’ options enabled.

Source

pub fn get_shopt_optstr(&self) -> String

Returns a colon-separated list of sorted ‘shopt’ options enabled.

Trait Implementations§

Source§

impl Clone for RuntimeOptions

Source§

fn clone(&self) -> RuntimeOptions

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 Default for RuntimeOptions

Source§

fn default() -> RuntimeOptions

Returns the “default value” for a type. Read more

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more