[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function names starting with %
From: |
Zachary Santer |
Subject: |
Re: function names starting with % |
Date: |
Tue, 25 Jun 2024 08:11:02 -0400 |
On Mon, Jun 24, 2024 at 2:37 PM Oğuz <oguzismailuysal@gmail.com> wrote:
> $ %f
> bash: fg: %f: no such job
> $ '%f'
> bash: fg: %f: no such job
> $ \%f
> bash: fg: %f: no such job
Set +m won't fix this either.
$ %f(){ :;}
$ %f
-bash: fg: %f: no such job
$ set +m
$ %f
-bash: fg: no job control
Unlike ! in an arithmetic context, which works how you'd expect if you
turn off history expansion. You can't use a function with a name
beginning with %, even in a script.