bug-bash
[Top][All Lists]
Advanced

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

function names starting with %


From: Oğuz
Subject: function names starting with %
Date: Mon, 24 Jun 2024 21:37:42 +0300

You can do these

$ %f(){ :;}
$ declare -f %f
%f ()
{
    :
}
$ unset -f %f
$ declare -f %f
$ echo $?
1

but not call them

$ %f
bash: fg: %f: no such job
$ '%f'
bash: fg: %f: no such job
$ \%f
bash: fg: %f: no such job

Why is that? Would it be a bad idea to let such functions take
precedence over jobspecs?

Oğuz



reply via email to

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