1

In a project with different makefiles:

$ make -f foo1.make
... ...
$ testing testing
... ...
$ !ma
make -f foo1.make 

Good! But then if I by accident do:

$ make -f foo1.make
... ...
$ testing testing
... ...
$ make
make: *** No targets specified and no makefile found.  Stop.

And now I am sad:

$ !!ma
makema
No command 'makema' found, did you mean:
  ... ...

Now I have to pick through all my testing commands with the up arrow like an animal. Unacceptable*!

Is there any way to re-run that full make -f foo1.make command using ! or some variant thereof?

*: I will not even dignify the suggestion that I just retype the entire command with a response!

Claudiu
  • 205
  • 2
  • 6
  • 4
    You could also use Ctrl-r to search backwards in history – daniel kullmann May 06 '14 at 18:42
  • To flesh out daniel's comment: hit Ctrl-R, type "ma", hit Ctrl-R until you've found the one you want, then hit Enter. This is "reverse incremental search". If you want "non-reverse", use Ctrl-S – glenn jackman May 06 '14 at 19:41

0 Answers0