bug-bash
[Top][All Lists]
Advanced

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

Re: How functions are defined


From: Andreas Schwab
Subject: Re: How functions are defined
Date: Tue, 28 Apr 2020 09:21:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

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



reply via email to

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