Skip to main content

parse_shell_from_path

Function parse_shell_from_path 

Source
pub fn parse_shell_from_path(shell_path: &str) -> Result<ShellType>
Expand description

Parse a shell type from a shell path.

Extracts the basename from the path and matches against supported shells.

§Arguments

  • shell_path - Full path to the shell (e.g., /bin/zsh, /usr/local/bin/fish)

§Returns

  • Ok(ShellType) - The detected shell type
  • Err(Autom8Error) - If the shell is not supported