6

I'm running using oh-my-zsh. I was writing a fairly long commit message on the command line, and I hit something on the keyboard that caused it to disappear. I pushed the up key, hoping it would remain in the history, but it was not there.

So, I grumbled, rewrote the commit message, and as soon as I executed that command, the command I was writing before populated the command line, ready for editing.

This seems like a handy feature occasionally, to stash a command to run something else first. How do I do this on purpose?

1 Answer 1

7

You probably typed Esc-q, which is bound by default to the push-line command documented in man zshzle:

push-line (^Q ESC-Q ESC-q) (unbound) (unbound) Push the current buffer onto the buffer stack and clear the buffer. Next time the editor starts up, the buffer will be popped off the top of the buffer stack and loaded into the edit- ing buffer. 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.