pub struct ShellState {Show 21 fields
pub options: ShellOptions,
pub argv0: String,
pub argzero: String,
pub posixzero: String,
pub shell_name: String,
pub pwd: String,
pub oldpwd: String,
pub home: String,
pub username: String,
pub mypid: i64,
pub ppid: i64,
pub shtty: i32,
pub sourcelevel: i32,
pub lineno: i64,
pub path: Vec<String>,
pub fpath: Vec<String>,
pub cdpath: Vec<String>,
pub module_path: Vec<String>,
pub term: String,
pub histsize: usize,
pub emulation: ShellEmulation,
}Expand description
Global shell state
Fields§
§options: ShellOptions§argv0: String§argzero: String§posixzero: String§shell_name: String§pwd: String§oldpwd: String§home: String§username: String§mypid: i64§ppid: i64§shtty: i32§sourcelevel: i32§lineno: i64§path: Vec<String>§fpath: Vec<String>§cdpath: Vec<String>§module_path: Vec<String>§term: String§histsize: usize§emulation: ShellEmulationImplementations§
Source§impl ShellState
impl ShellState
pub fn new() -> Self
Sourcepub fn emulate_from_name(&mut self, name: &str)
pub fn emulate_from_name(&mut self, name: &str)
Determine shell emulation from name
Sourcepub fn is_posix_emulation(&self) -> bool
pub fn is_posix_emulation(&self) -> bool
Check if running in sh/ksh emulation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShellState
impl RefUnwindSafe for ShellState
impl Send for ShellState
impl Sync for ShellState
impl Unpin for ShellState
impl UnsafeUnpin for ShellState
impl UnwindSafe for ShellState
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
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>
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 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>
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