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?
Think of it as a built-in alias that is expanded before functions are
invoked.
Would it be a bad idea to let such functions take
precedence over jobspecs?
At this point? Yes.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/