1 |
>>>>> On Fri, 16 Jul 2021, Michał Górny wrote: |
2 |
|
3 |
> case ${EAPI:-0} in |
4 |
|
5 |
This could be simplified to ${EAPI}. |
6 |
|
7 |
> - 0|1|2|3|4|5|6|7) ;; |
8 |
> - *) die "EAPI ${EAPI} unsupported (yet)." |
9 |
> + 5|6|7|8) ;; |
10 |
> + *) die "EAPI ${EAPI} unsupported." |
11 |
> esac |
12 |
|
13 |
Add the eclass name to the message? Other eclasses have this: |
14 |
|
15 |
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
16 |
|
17 |
Also, the ;; is missing in the last clause. If that it working, then at |
18 |
least it is undocumented behaviour. The Bash manual explicitly says that |
19 |
"[e]ach clause must be terminated". |
20 |
|
21 |
> + |
22 |
> +_BASH_COMPLETION_R1_ECLASS=1 |
23 |
> +fi |
24 |
|
25 |
This assignment belongs immediately after the corresponding check, |
26 |
before any inherits. Otherwise, it won't prevent inherit circles. |
27 |
|
28 |
Ulrich |