# shellcheck    shell=dash            disable=SC2034

___x_cmd_env_which(){
    local X_help_cmd='___x_cmd help -m env which';    help:arg-null:parse
    local i; for i in "$@"; do
        ___x_cmd_pkg_which "$i" || return $?
    done
}

___x_cmd_env_depend(){
    local op="$1"
    case "$op" in
        dependent)  shift;___x_cmd_pkg_sphere_depend dependent  "$@" ;;
        dependency) shift;___x_cmd_pkg_sphere_depend dependency "$@" ;;
        -h|--help)  ___x_cmd help -m env depend ;;
        *)          N=env M="Not found such [option=$op]" log:ret:64 ;;
    esac
}

___x_cmd_env_gc(){
    local op="$1"
    case "$op" in
        -h|--help)  ___x_cmd help -m env gc ;;
        *)          ___x_cmd_pkg_sphere_gc "$@" ;;
    esac
}

#       x env sociality python=intrusive
# TODO: x env sociality python=Miniconda3-py310_23.9.0-0=intrusive
# ___x_cmd_env_sociality(){
#     case "$1" in
#         *=*)
#                 local name="${1%%=*}";  local version="${1#*=}"
#                 local x_=; ___x_cmd_pkg___current_version_ "$name"
#                 [ -z "$x_" ] || {
#                     env:warn "Using $name version $x_, need to cancel it in advance"
#                     return 1
#                 }
#                 ___x_cmd_pkg_sociality set "$name" "$version"
#                 ;;
#         -h|--help)
#                 x help -m env sociality ;;
#         "")     x help -m env sociality >&2; return 64 ;;
#         *)      ___x_cmd_pkg_sociality get "$1" ;;
#     esac
# }
