# Zsh: set aside a command with "Escape Q" / push-line

DevFeed: [Zsh: set aside a command with "Escape Q" / push-line](<https://devfeed.tech/articles/zsh-set-aside-a-command-with-escape-q-push-line-66445.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/06/zsh-push-line/>)

Author: Adam Johnson

Published: 2026-10-05T23:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [branch](<https://devfeed.tech/tags/branch.md>), [checkout](<https://devfeed.tech/tags/checkout.md>), [dx](<https://devfeed.tech/tags/dx.md>), [git](<https://devfeed.tech/tags/git.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

## AI overview

The article explains how Zsh's `push-line` widget temporarily saves a command so you can run a setup command first and resume the original command at the next prompt. It recommends binding Escape Q to `push-line-or-edit`, which also handles multiline commands, and describes related Oh My Zsh shortcuts.

## Source excerpt

Do you ever do this? You carefully type out a command, like this pytest one: $ pytest tests/test_checkout.py -k discount --reuse-db -x ...then, just before pressing Enter, you remember that something will stop it from succeeding, like being on the wrong Git branch. What now? Maybe you run the ...