Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16258
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: How functions are defined |
| Date | 2020-04-30 18:50 -0400 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.1723.1588287021.3066.bug-bash@gnu.org> (permalink) |
| References | <87pnbsfjss.fsf@hobgoblin.ariadne.com> <e2af6603-264d-f314-f506-df88d0778979@case.edu> |
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 chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: How functions are defined Chet Ramey <chet.ramey@case.edu> - 2020-04-30 18:50 -0400
csiph-web