Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16253

Re: How functions are defined

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Andreas Schwab <schwab@linux-m68k.org>
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 <mailman.1463.1588061511.3066.bug-bash@gnu.org> (permalink)
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 <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=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

Show key headers only | View raw


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."

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: How functions are defined Andreas Schwab <schwab@linux-m68k.org> - 2020-04-28 09:21 +0200

csiph-web