>>>>> On Fri, 16 Jul 2021, Michał Górny wrote:
 
>  case ${EAPI:-0} in

This could be simplified to ${EAPI}.

> -     0|1|2|3|4|5|6|7) ;;
> -     *) die "EAPI ${EAPI} unsupported (yet)."
> +     5|6|7|8) ;;
> +     *) die "EAPI ${EAPI} unsupported."
>  esac

Add the eclass name to the message? Other eclasses have this:

        *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;

Also, the ;; is missing in the last clause. If that it working, then at
least it is undocumented behaviour. The Bash manual explicitly says that
"[e]ach clause must be terminated".
 
> +
> +_BASH_COMPLETION_R1_ECLASS=1
> +fi

This assignment belongs immediately after the corresponding check,
before any inherits. Otherwise, it won't prevent inherit circles.

Ulrich

Attachment: signature.asc
Description: PGP signature

Reply via email to