pub enum Shell {
Bash,
Zsh,
Fish,
PowerShell,
NuShell,
}Expand description
Shell types for which we can generate completions.
Variants§
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn from_str(s: &str) -> Option<Self>
pub fn from_str(s: &str) -> Option<Self>
Parse shell name from string (case-insensitive).
§Examples
use help_probe::completion::Shell;
assert_eq!(Shell::from_str("bash"), Some(Shell::Bash));
assert_eq!(Shell::from_str("BASH"), Some(Shell::Bash));
assert_eq!(Shell::from_str("zsh"), Some(Shell::Zsh));
assert_eq!(Shell::from_str("powershell"), Some(Shell::PowerShell));
assert_eq!(Shell::from_str("pwsh"), Some(Shell::PowerShell));
assert_eq!(Shell::from_str("nushell"), Some(Shell::NuShell));
assert_eq!(Shell::from_str("nu"), Some(Shell::NuShell));
assert_eq!(Shell::from_str("invalid"), None);Trait Implementations§
impl Copy for Shell
impl Eq for Shell
impl StructuralPartialEq for Shell
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnwindSafe for Shell
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