On Tue, 27 Feb 2024 at 18:48, Oğuz wrote:
> On Tuesday, February 27, 2024, Martin D Kealey
> wrote:
>
>> I've been thinking for a while now that POSIX made a mistake when it
>> permitted ';;' before the closing 'esac'.
>>
>
> I think that decision was made before POSIX. Besides it's handy when
>
On 2/27/24 6:23 AM, Emanuele Torre wrote:
On Tue, Feb 27, 2024 at 04:10:06PM +0700, Robert Elz wrote:
Date:Tue, 27 Feb 2024 00:50:46 +0100
From:Emanuele Torre
Message-ID:
| To use esac as a pattern you need to use the (esac) syntax,
Or quote it
'es
On 2/26/24 6:50 PM, Emanuele Torre wrote:
Hello.
I have noticed that declare -f does not output valid code when a
pattern is `esac'.
Thanks for the report. More precisely, if the first word in the pattern
list is the literal string "esac".
"The grammar shows that reserved words can be used
On Tue, Feb 27, 2024 at 12:23:41PM +0100, Emanuele Torre wrote:
> On Tue, Feb 27, 2024 at 04:10:06PM +0700, Robert Elz wrote:
> > Date:Tue, 27 Feb 2024 00:50:46 +0100
> > From:Emanuele Torre
> > Message-ID:
> >
> > | To use esac as a pattern you need to use the (es
On Tue, Feb 27, 2024 at 04:10:06PM +0700, Robert Elz wrote:
> Date:Tue, 27 Feb 2024 00:50:46 +0100
> From:Emanuele Torre
> Message-ID:
>
> | To use esac as a pattern you need to use the (esac) syntax,
>
> Or quote it
>
> 'esac')
>
> (or similar).
>
> kre
Date:Tue, 27 Feb 2024 00:50:46 +0100
From:Emanuele Torre
Message-ID:
| To use esac as a pattern you need to use the (esac) syntax,
Or quote it
'esac')
(or similar).
kre
On Tuesday, February 27, 2024, Martin D Kealey
wrote:
>
> I've been thinking for a while now that POSIX made a mistake when it
> permitted ';;' before the closing 'esac'.
>
I think that decision was made before POSIX. Besides it's handy when
generating case clauses on the fly, you may not always
I've been thinking for a while now that POSIX made a mistake when it
permitted ';;' before the closing 'esac'. If ';;' were prohibited there,
then the parser could be sure that the next word after every ';;' would be a
pattern, even if it looks like 'esac'. But as things stand, there's an
ambigui
Hello.
I have noticed that declare -f does not output valid code when a
pattern is `esac'.
To use esac as a pattern you need to use the (esac) syntax, but
declare -f does not use it, and ends up generating invalid code.
a () {
case $1 in
hi) echo hi ;;
(esac) echo esac ;;