On Thu, May 13, 2021 at 12:32:07PM -0400, Lawrence Velázquez wrote:
> The code explicitly wants alphabetics. The manual could probably
> stand to be a little more specific than just "characters".
>
>https://git.savannah.gnu.org/cgit/bash.git/tree/braces.c?id=ce23728#n497
>
> /* Now figure out whether LHS and RHS are integers or letters. Both
> sides have to match. */
> lhs_t = (legal_number (lhs, &tl)) ? ST_INT :
> ((ISALPHA (lhs[0]) && lhs[1] == 0) ? ST_CHAR : ST_BAD);
>
One wonders whether this is a bug:
unicorn:~$ echo {Z..a}
Z [ ] ^ _ ` a
It checks the first and last, makes sure they're alpha characters, but
doesn't check anything in the middle.