Simple script for zsh which gives us a more native up/down arrow behavior for the [atuin magial shell history][1] plugin with behavior similar to e.g. [zsh-history-substring-search][2]. This is an improved reimplemtation of [@Nezteb's gist][3] for the same issue.
Note
This assumes default keybindings
First and foremost: The script is aware of multiline buffers. So when going up or down, the script will first try to step through the lines of a multiline buffer, before going to the next history entry.
When pressing up the shell will iteratively go through the previous atuin history and have each result directly in the command buffer / command line. Any text in the initial buffer will be used as a search query.