I tried googling around but couldn't find what I was looking for, maybe just because I don't know what terms to search for if it already exists.
I'd like to make it so that traversing the command history with up-arrow (or ctrl+p) and down-arrow (or ctrl+n) move through entire commands for each button press instead of individual lines of multi-line commands. I thought iTerm2 would be able to recognize this already, especially after the update adding selection boxes, but I didn't find an option for this behavior.
For a more concrete example of what I'm looking for, if I run the commands in the following order:
- ls -altrh
- curl \
--request GET \
https://google.com - export TOKEN=mytoken
Currently pressing the up arrow 3 times will land me on "--request GET \": on first press is export, 2nd press is the URL, 3rd press is on the request option.
I'd like it so that after 3 presses, I'm on the 3rd previous command, in this case ls.