On 4/1/21 4:36 AM, greyw...@starwolf.com wrote:

Bash Version: 5.1
Patch Level: 4
Release Status: release

Description:
        The 'select' directive's syntax does not correspond to the rest of the 
shell's syntax.
        I am not sure if this is by design; if it is, let me know and I'll go 
away.

It's more like `select' doesn't inherit some of the shell's special cases.

        if ((n > 1)); then {
            select dir in ${d[@]}; do {
                break;
            } done;
        }
        else { ...

...but select breaks on the "} done;" syntax

Yes, you need a list terminator so that `done' is recognized as a reserved
word here. `;' is sufficient. Select doesn't allow the `done' unless it's
in a command position. Some of the other compound commands have special
cases, mostly inherited from the Bourne shell, to allow it.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to