> On 2019 Jul 29 , at 12:55 p, Isabella Bosia <izaberina@gmail.com> wrote:
>
> haven't really looked into why this happens but x[ seems to trigger some
> funny parser behavior
>
> x[ newline should not prompt with PS2
>
> it can't be defined as a normal sh function, but it can be defined with the
> function keyword
>
> it can't be called like a normal function, but things like "x[" or \x[ work
>
> this bug seems old
The ``[`` begins a valid shell pattern, so the parser continues to accept input
until the closing ``]`` is found. Pathname expansion (apparently) does not
apply to the first "argument" of the ``function`` command.