Skip to main content

resolve_shell

Function resolve_shell 

Source
pub fn resolve_shell(explicit: Option<&str>) -> Result<Shell>
Expand description

Diagnostic helper for the CLI: detect or validate a shell from the --shell CLI value, surfacing a clear error for unknown shells. Returns the resolved Shell or a DodotError::Other.

When explicit is None and Shell::detect() returns None (unsupported $SHELL), errors out asking the user to pass --shell bash or --shell zsh. Better than silently falling back to bash on a fish/nu setup, which would produce an alias that never fires.