if I use the up arrow in a zsh session, as you'd expect I get previous commands, from newest to oldest. Now (whether it's zsh or oh-my-zsh doing this I don't know), but if I type the start of a line and hit the up arrow I get the lines from my history that start with whatever I've typed. All good so far.
The problem occurs if I type in a multi line command, eg:
for i in foo bar echo $i
then if I later hit the up arrow, once it gets to the multi line command it will then only display results starting with
for. So if my history is like:
touch foo rm foo for i in foo bar echo $i ls
and I hit the up arrow I get the
ls command then the multi-line
for command, and from then on I only see only
for commands that are in my history, rather than the
Is there any way to be able to search chronologically, without getting stuck whenever the history gets to a multi-line command?