pub struct CreateOptions {Show 27 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>,
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 no_profile: bool,
pub no_rc: bool,
pub rc_file: Option<PathBuf>,
pub do_not_inherit_env: bool,
pub fds: Option<HashMap<ShellFd, OpenFile>>,
pub posix: bool,
pub print_commands_and_arguments: bool,
pub read_commands_from_stdin: bool,
pub shell_name: Option<String>,
pub shell_product_display_str: Option<String>,
pub sh_mode: bool,
pub verbose: bool,
pub max_function_call_depth: Option<usize>,
pub key_bindings: Option<Arc<Mutex<dyn KeyBindings>>>,
pub error_formatter: Option<Arc<Mutex<dyn ErrorFormatter>>>,
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>Registered builtins.
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.
no_profile: boolWhether to skip sourcing the system profile.
no_rc: boolWhether to skip sourcing the user’s rc file.
rc_file: Option<PathBuf>Explicit override of rc file to load in interactive mode.
do_not_inherit_env: boolWhether to skip inheriting environment variables from the calling process.
fds: Option<HashMap<ShellFd, OpenFile>>Provides a set of initial open files to be tracked by the shell.
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_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.
verbose: boolWhether to print verbose output.
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.
error_formatter: Option<Arc<Mutex<dyn ErrorFormatter>>>Error formatter helper for the shell to use.
shell_version: Option<String>Brush implementation version.
Trait Implementations§
Source§impl Default for CreateOptions
impl Default for CreateOptions
Source§fn default() -> CreateOptions
fn default() -> CreateOptions
Auto Trait Implementations§
impl Freeze for CreateOptions
impl !RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl !UnwindSafe for CreateOptions
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