pub fn detect(forced: Option<&str>, env_shell: Option<&OsStr>) -> ShellKindExpand description
Picks the shell to launch. See the module documentation for the order of the checks.
forced is the value of --shell; a value that is not bash or fish is ignored.
env_shell is the value of $SHELL. Both are passed in, never read from the environment, so
callers and tests stay in control.