pub enum ShellKind {
Unknown,
Bash,
Zsh,
Fish,
}Expand description
Supported shell family for integration-script selection.
§Examples
use ailloli_ui_terminal_core::ShellKind;
assert_eq!(ShellKind::default(), ShellKind::Unknown);Variants§
Unknown
Missing or unsupported shell name; no script is available.
Bash
GNU Bash integration.
Zsh
Z shell integration.
Fish
Fish shell integration.
Implementations§
Source§impl ShellKind
impl ShellKind
Sourcepub fn from_name(name: &str) -> Self
pub fn from_name(name: &str) -> Self
Parses exact bash, zsh, or fish after trimming and ASCII lowercasing.
Paths such as /bin/bash, versioned names, empty input, and all other
values return Self::Unknown.
§Examples
use ailloli_ui_terminal_core::ShellKind;
assert_eq!(ShellKind::from_name(" ZSH "), ShellKind::Zsh);
assert_eq!(ShellKind::from_name("/bin/zsh"), ShellKind::Unknown);Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShellKind
impl<'de> Deserialize<'de> for ShellKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ShellKind
impl Eq for ShellKind
impl StructuralPartialEq for ShellKind
Auto Trait Implementations§
impl Freeze for ShellKind
impl RefUnwindSafe for ShellKind
impl Send for ShellKind
impl Sync for ShellKind
impl Unpin for ShellKind
impl UnwindSafe for ShellKind
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