[Top][All Lists]

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

Re: job control command "%" no longer works

From: Chet Ramey
Subject: Re: job control command "%" no longer works
Date: Thu, 22 Sep 2005 09:06:45 -0400

> So, apparently, sometime between bash-2.05a and bash-3.0, a change was made
> to the job control commands. It used to be the case that typing "%" on a
> line by itself would foreground the most recent job, just as if you had
> typed "fg" or "%+". In bash-3.0, this prints the error message:
> bash: fg: %: no such job
> I'm not exactly sure what this means. If I type "%v", it refers to the
> unique job whose command name starts with "v", so at a minimum it seems like
> "%" ought to refer to the unique job in existence (since the empty string is
> a prefix of every string) and produce an "ambiguous job spec" error if there
> is more than one - but it doesn't work that way.

The meaning of a null job spec was never defined.  An artifact of the
old implementation made it equivalent to the current job, but a code
cleanup during bash-3.0 development removed that function.  In bash-3.1,
it will explicitly mean the current job, and be documented as such.


``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live Strong.
Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.case.edu/~chet/

reply via email to

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