Today I learned about the Zsh buffer stack. This is kinda working like git stash + git stash pop.
One can simply type a command, buffer it, type another command and pop the buffered one afterwards.
Example
Type:
1 | echo "This is an example" |
Hit: ^ + q
Type:
1 | $ echo "Something else" |
Hit Enter and the prompt pops echo "This is an example" from the buffer.
Note
Further information is available in the Zsh man page man zshzle.