Quick jump to prev/next prompt (Shell integration part 1)
The next productivity boost I'd like to implement is:
Quickly jump to the beginning of the previous (or next) command's output.
This is useful for finding e.g. the first gcc
error message, since after a
syntax error the rest of the error messages are completely useless, the work
has to begin by fixing the first one.
This should be achieved by adapting the "shell integration" feature already found in several terminals.
Shell integration is also usable for other advanced features, such as automatically knowing the command that's being executed (e.g. for displaying it in the title), or knowing where the currently active command line is (to allow a mouse click to reposition the cursor within that command line with fairly minimal guesswork that could go wrong), etc. These are for another day. This issue should be about laying down the foundations of shell integration and implementing quickly jumping to the previous or next prompt.
In the next several comments I'll examine and evaluate shell integration as it exists in a couple of terminals, argue about the design choices I made, and outline possible future improvements.
Until then, the wip/egmont/shell-integration-1
branch
(currently at 52eb41b8) already implements
jumping to the previous/next prompt, using the hotkeys
Ctrl
+Shift
+Left
/Right
. It even configures bash
to emit the required
sequences (zsh
users have to wait, or rather, help please). Give it a try :)