pub struct ShellDialect {
pub name: &'static str,
pub command_not_found: fn(&str) -> String,
pub run_builtin: BuiltinRunner,
pub system_rc: &'static str,
pub user_rc: &'static str,
pub echo_escapes_default: bool,
pub export_prefix: &'static str,
pub alias_prefix: &'static str,
}Expand description
The per-shell behavior the core depends on: identity, messages, and the builtin table. Each shell constructs its own dialect.
Fields§
§name: &'static strThe shell’s display name ("bash", "zsh").
command_not_found: fn(&str) -> StringThe command-not-found message in this shell’s dialect.
run_builtin: BuiltinRunnerThe builtin dispatcher for this shell.
system_rc: &'static strThe system-wide startup file this shell sources at session start
(for example /etc/zshrc), or an empty string when none.
user_rc: &'static strThe user startup file name inside the home directory (for example
.zshrc), or an empty string when none.
echo_escapes_default: boolWhether echo interprets backslash escapes by default (Bash: off;
Zsh and the BSD echo: on).
export_prefix: &'static strThe prefix export uses when listing the environment (declare -x
in Bash, export in Zsh).
alias_prefix: &'static strThe prefix alias uses when listing aliases (alias in Bash,
nothing in Zsh).
Auto Trait Implementations§
impl Freeze for ShellDialect
impl RefUnwindSafe for ShellDialect
impl Send for ShellDialect
impl Sync for ShellDialect
impl Unpin for ShellDialect
impl UnsafeUnpin for ShellDialect
impl UnwindSafe for ShellDialect
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
Mutably borrows from an owned value. Read more