pub struct CreateOptions<SE: ShellExtensions = DefaultShellExtensions> {Show 36 fields
pub disabled_options: Vec<String>,
pub enabled_options: Vec<String>,
pub disabled_shopt_options: Vec<String>,
pub enabled_shopt_options: Vec<String>,
pub builtins: HashMap<String, Registration<SE>>,
pub vars: HashMap<String, ShellVariable>,
pub error_formatter: SE::ErrorFormatter,
pub disallow_overwriting_regular_files_via_output_redirection: bool,
pub do_not_execute_commands: bool,
pub exit_after_one_command: bool,
pub interactive: bool,
pub login: bool,
pub no_editing: bool,
pub profile: ProfileLoadBehavior,
pub rc: RcLoadBehavior,
pub do_not_inherit_env: bool,
pub skip_well_known_vars: bool,
pub fds: HashMap<ShellFd, OpenFile>,
pub external_cmd_leads_session: bool,
pub working_dir: Option<PathBuf>,
pub posix: bool,
pub print_commands_and_arguments: bool,
pub read_commands_from_stdin: bool,
pub shell_name: Option<String>,
pub shell_args: Option<Vec<String>>,
pub shell_product_display_str: Option<String>,
pub sh_mode: bool,
pub treat_unset_variables_as_error: bool,
pub exit_on_nonzero_command_exit: bool,
pub disable_pathname_expansion: bool,
pub verbose: bool,
pub parser: ParserImpl,
pub command_string_mode: bool,
pub max_function_call_depth: Option<usize>,
pub key_bindings: Option<Arc<Mutex<dyn KeyBindings>>>,
pub shell_version: Option<String>,
}Expand description
Options for creating a new shell.
Fields§
§disabled_options: Vec<String>Disabled options.
enabled_options: Vec<String>Enabled options.
disabled_shopt_options: Vec<String>Disabled shopt options.
enabled_shopt_options: Vec<String>Enabled shopt options.
builtins: HashMap<String, Registration<SE>>Registered builtins.
vars: HashMap<String, ShellVariable>Provides a set of variables to be initialized in the shell. If present, they are assigned after inherited or well-known variables are set (when applicable).
error_formatter: SE::ErrorFormatterError behavior implementation.
disallow_overwriting_regular_files_via_output_redirection: boolDisallow overwriting regular files via output redirection.
do_not_execute_commands: boolDo not execute commands.
exit_after_one_command: boolExit after one command.
interactive: boolWhether the shell is interactive.
login: boolWhether the shell is a login shell.
no_editing: boolWhether to skip using a readline-like interface for input.
profile: ProfileLoadBehaviorSystem profile loading behavior.
rc: RcLoadBehaviorRc file loading behavior.
do_not_inherit_env: boolWhether to skip inheriting environment variables from the calling process.
skip_well_known_vars: boolWhether to skip initializing well-known variables.
fds: HashMap<ShellFd, OpenFile>Provides a set of initial open files to be tracked by the shell.
external_cmd_leads_session: boolWhether to launch external commands as session leaders.
working_dir: Option<PathBuf>Initial working dir for the shell. If left unspecified, will be populated from the host environment.
posix: boolWhether the shell is in POSIX compliance mode.
print_commands_and_arguments: boolWhether to print commands and arguments as they are read.
read_commands_from_stdin: boolWhether commands are being read from stdin.
shell_name: Option<String>The name of the shell.
shell_args: Option<Vec<String>>Base positional arguments for the shell (not including the shell name).
shell_product_display_str: Option<String>Optionally provides a display string describing the version and variant of the shell.
sh_mode: boolWhether to run in maximal POSIX sh compatibility mode.
treat_unset_variables_as_error: boolWhether to treat expansion of unset variables as an error.
exit_on_nonzero_command_exit: boolWhether to enable error-on-exit behavior.
disable_pathname_expansion: boolWhether to disable pathname expansion.
verbose: boolWhether to print verbose output.
parser: ParserImplParser implementation to use.
command_string_mode: boolWhether the shell is in command string mode (-c).
max_function_call_depth: Option<usize>Maximum function call depth.
key_bindings: Option<Arc<Mutex<dyn KeyBindings>>>Key bindings helper for the shell to use.
shell_version: Option<String>Brush implementation version.
Trait Implementations§
Source§impl<SE: Default + ShellExtensions> Default for CreateOptions<SE>where
SE::ErrorFormatter: Default,
impl<SE: Default + ShellExtensions> Default for CreateOptions<SE>where
SE::ErrorFormatter: Default,
Source§fn default() -> CreateOptions<SE>
fn default() -> CreateOptions<SE>
Auto Trait Implementations§
impl<SE> Freeze for CreateOptions<SE>
impl<SE = ShellExtensionsImpl> !RefUnwindSafe for CreateOptions<SE>
impl<SE> Send for CreateOptions<SE>
impl<SE> Sync for CreateOptions<SE>
impl<SE> Unpin for CreateOptions<SE>
impl<SE> UnsafeUnpin for CreateOptions<SE>
impl<SE = ShellExtensionsImpl> !UnwindSafe for CreateOptions<SE>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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