bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How functions are defined


From: Chet Ramey
Subject: Re: How functions are defined
Date: Thu, 30 Apr 2020 18:50:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/27/20 10:03 PM, Dale R. Worley wrote:

> So it seems the reserved rule is more accurately:
> 
>        Reserved words are words that have a special meaning to the
>        shell.  The following words are recognized as reserved when
>        unquoted and either (1) where the first word of a simple command
>        could be (see SHELL GRAMMAR below), (2) the third word of a case,
>        for, or select command, the (3) first word of the body of a function
>        definition, or (4) after a semicolon or newline:
> 

> 
> ... Looking at this again, I think (1) and (3) can be replaced by "the> first 
> word of a command (see SHELL GRAMMAR below)", which helps.

I'll rework it to use "the first word of a command" with the two execptions
(third word of case/select, third word of for). This is pretty close to
what POSIX has. Thanks for the report.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]