pub enum ShellType {
Bash,
Elvish,
Fish,
Ion,
Murex,
Nu,
Pwsh,
Sh,
Xonsh,
Zsh,
}Variants§
Implementations§
Source§impl ShellType
impl ShellType
Sourcepub fn os_variants() -> Vec<Self>
pub fn os_variants() -> Vec<Self>
Return a list of shell types for the current operating system.
Sourcepub fn detect() -> Option<Self>
pub fn detect() -> Option<Self>
Detect the current shell by inspecting the $SHELL environment variable,
and the parent process hierarchy.
Sourcepub fn detect_with_fallback() -> Self
pub fn detect_with_fallback() -> Self
Detect the current shell by inspecting the $SHELL environment variable,
and the parent process hierarchy. If no shell could be find, return a fallback.
Sourcepub fn try_detect() -> Result<Self, ShellError>
pub fn try_detect() -> Result<Self, ShellError>
Detect the current shell by inspecting the $SHELL environment variable,
and the parent process hierarchy, and return an error if not detected.
Sourcepub fn build(&self) -> BoxedShell
pub fn build(&self) -> BoxedShell
Build a Shell instance from the current type.
Trait Implementations§
impl Copy for ShellType
impl Eq for ShellType
impl StructuralPartialEq for ShellType
Auto Trait Implementations§
impl Freeze for ShellType
impl RefUnwindSafe for ShellType
impl Send for ShellType
impl Sync for ShellType
impl Unpin for ShellType
impl UnwindSafe for ShellType
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