I'm often compiling stuff and therefore repeating the same command over and over, so I'd like to benefit from my "visual memory" and have a sort of "repeat last command" button attached to a terminal. More precisely, here is how I see it:
- My "special" terminal would be just like a standard terminal emulator, with an extra input line at the bottom, which would have a "run" button attached to it. Clicking the button would run the command without erasing it.
- Maybe even an arbitrary number of such commands could be stacked (since I often need to alternate between 2 or 3 commands).
I know I can use just ↑Enter with the keyboard to redo the last command, but what often happens is that I forget I just had to type another command (to fix something, or whatever) so ↑ will not bring the right command from the history. So instead of a reflex, I have to actually read (at least skim) the command before pressing Enter.
Is there such a contraption somewhere? I often use several terminals precisely to make sure each always has the "right" command as last, but my Alt+Tab skills usually make me tab to the wrong window. And I need terminal information, such as the environment and cwd, so I cannot just try and "integrate" it in my code editor. I mean, using Alt+F2 and then Enter would not work (since I also need the read the output from the terminal). I just want to be able to use the best of both keyboard and visual memory (via clicks) at the same time.