
___x_cmd_shellengine(){
    local shell="${1:?Provide shell}";  shift

    case "$shell" in
        bash)   ___x_cmd_shellengine___bash             "$@" ;;
        dash)   ___x_cmd_shellengine___dash             "$@" ;;
        zsh)    ___x_cmd_shellengine___zsh              "$@" ;;
        --exec) ___x_cmd_shellengine___exec             "$@" ;;
        *)      ___x_cmd_shellengine___exec "$shell"    "$@" ;;
    esac
}

___x_cmd_shellengine___exec(){
    local shell="${1:?Provide shell}";  shift

    if ___x_cmd_hasbin "$shell";    then  ___x_cmd_cmds "$shell"  "$@"
    elif [ -x "/bin/$shell" ];      then  "/bin/$shell"           "$@"
    elif [ -x "/usr/bin/$shell" ];  then  "/usr/bin/$shell"       "$@"
    else                                  ___x_cmd cosmo "$shell"        "$@"
    fi
}

___x_cmd_shellengine_which(){
    x_=
    ___x_cmd_which_one "$1" 2>/dev/null || return
    x_="$___X_CMD_WHICH_ONE_RESULT"
}
