From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Description of problem: When bringing stopped or backgrounded jobs to the foreground, the percent command can be used as a shortcut for "fg". Specifically, "%-", "%+", "%pattern", or just plain "%" indicate the desired job. The latter, the plain "%", should be a synonym for "%+" and foreground the job last suspended or backgrounded. This has been the behavior of previous versions of bash, and of the older csh. For some reason, the simplest form of this command, "%", no longer finds the job. Instead I get this message: -bash: fg: %: no such job When I don't use the % shortcut and use fg instead, it behaves as expected. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Start a program that can be suspended, such as vim. 2. Suspend the program. 3. Use the % command. Actual Results: Job is not resumed. Expected Results: Should have been the same as if I had entered "fg". Additional info:
The syntax to do what you want is: "%%". Please see: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00191.html for the upstream maintainer's rationale.
*** Bug 139736 has been marked as a duplicate of this bug. ***
Seems the old behavior can be achieved by using `alias %=%%', would such an alias have any unintentional side effects?