# shellcheck shell=dash

___x_cmd_gh_readme(){
    param:void

    local url="$1"; shift;
    url="${url%%@*}"
    case "$url" in
        https://github.com/*)

                                    url="${url#*"github.com/"}"
                                    url="${url%%".git"}"
                                    ;;
        */*)                        ;;
        *)                          N=gh M="Unknown url -> $url" log:ret:64 ;;
    esac

    ___x_cmd_gh_repo_file_download --repo "$url" "README.md" "$@"
    # gh:info "Fetching -> https://raw.githubusercontent.com/${url}/refs/heads/main/README.md"
    # ___x_cmd curl "https://raw.githubusercontent.com/${url}/refs/heads/main/README.md"
}
