
# TODO: in the future, it would be `x which`
# we also provide `x which1`

if [ -z "$ZSH_VERSION" ]; then
    ___x_cmd_whichall(){
        local exe="$1"
        local x_
        local IFS=:; local p; for p in $PATH; do
            x_=""
            ___x_cmd_whichbin___check_ "$p" "$exe" || continue
            printf "%s\n" "$x_"
            return 0
        done
        return 1
    }
else
    ___x_cmd_whichall(){
        local exe="$1"
        local IFS=" ";
        local x_
        local p; while read -r p; do
            x_=""
            ___x_cmd_whichbin___check_ "$p" "$exe" || continue
            printf "%s\n" "$x_"
        done <<A
${PATH//:/
}
A
        return 1
    }

fi