On Thu, 20 Jul 2023, 18:03 Grisha Levit, <grishale...@gmail.com> wrote:

> Sounds like you want all the commands in the alias to be executed as a
> group -- so you can just write it as one:
>
> alias bad='{ echo fail; continue; }'
>

That right there USED to work as a function:

 bad() { echo fail; continue; }

But then someone suggested allowing non-local break & continue was a bug,
and the few people who considered it couldn't think of even as simple an
example as that right there.

So it was "fixed", and now that function doesn't work. It sickens me that
the work-around is to enable alias expansion in scripts.

*Grumble*
-Martin

PS: and people think I'm crazy for wanting to write new stuff in Perl, in
preference to Bash. Bash as a language has nothing else going for it, so if
after 28 years I still can't consider it stable, what is the point?

>

Reply via email to