Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Andreas Schwab Newsgroups: gnu.bash.bug Subject: Re: How functions are defined Date: Tue, 28 Apr 2020 09:21:44 +0200 Lines: 28 Approved: bug-bash@gnu.org Message-ID: References: <87pnbsfjss.fsf@hobgoblin.ariadne.com> <87y2qgcbxz.fsf@igel.home> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: usenet.stanford.edu 1588061512 10240 209.51.188.17 (28 Apr 2020 08:11:52 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: worley@alum.mit.edu (Dale R. Worley) Envelope-to: bug-bash@gnu.org X-Virus-Scanned: amavisd-new at mnet-online.de X-Auth-Info: H2lo2qYN42JOGZuU/kDd1aj93kvBaLM4j4TET37kq3cemHWfolJ5W6AFjE/KmvBI X-Yow: Yow! I want my nose in lights! In-Reply-To: <87pnbsfjss.fsf@hobgoblin.ariadne.com> (Dale R. Worley's message of "Mon, 27 Apr 2020 22:03:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Received-SPF: pass client-ip=212.18.0.9; envelope-from=whitebox@nefkom.net; helo=mail-out.m-online.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/28 03:02:59 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 212.18.0.9 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <87y2qgcbxz.fsf@igel.home> X-Mailman-Original-References: <87pnbsfjss.fsf@hobgoblin.ariadne.com> Xref: csiph.com gnu.bash.bug:16253 On Apr 27 2020, 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: > > IIUC there are two places where the documentation needs to be updated, > bash/doc/bash.1 and bash/doc/bashref.texi. But the above wording is a > lot more complex than I'd like. Does anyone have suggestions for a > clearer way to say this that is still accurate? > > ... 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. Isn't (4) also a subset of (1)? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."