# shellcheck shell=dash
___x_cmd_mklink___ln(){
    [ "$#" -gt 0 ] ||   set -- --help

    local op="$1"; shift
    case "$op" in
        -h|--help)          ___x_cmd help -m mklink; return 0    ;;
        -d|/d)              ___x_cmd_mklink___ln_directory  "$@" ;;
        --hard|/h)          ___x_cmd_mklink___ln_hard       "$@" ;;
        -j|--junction)      ___x_cmd_mklink___ln_junction   "$@" ;;
        *)                  ___x_cmd_cmds ln "$op"     "$@" ;;
    esac
}

___x_cmd_mklink___ln_directory(){
    local target="$1"
    local link="$2"
    ___x_cmd_cmds ln -s "$target" "$link"
}

___x_cmd_mklink___ln_hard(){
    local target="$1"
    local link="$2"
    ___x_cmd_cmds ln "$target" "$link"
}

___x_cmd_mklink___ln_junction(){
    local target="$1"
    local link="$2"
    ___x_cmd_cmds ln -s "$target" "$link"
}
