brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Ctrl+S stashes the prompt you are typing and brings it back later

CLI
~/tips/tip-claude-ctrl-s-stash-draft

cat ~/tips/tip-claude-ctrl-s-stash-draft.md

Parks the half-written prompt, lets you send something else, then restores it.

Halfway through a long prompt you remember a quick question that has nothing to do with it.

Press Ctrl+S with text in the input and Claude Code stashes it and clears the prompt. Type your other message, send it, then press Ctrl+S on the empty prompt. The stashed text comes back with the cursor position, pasted content and input mode.

If you stashed a ! shell command, it returns in shell mode, not as a plain prompt.

It is the same idea as stashing in git, only for sentences. I would use it instead of copying a half-written prompt into a notes app and losing it.

The alternative is to send the unfinished prompt, which wastes a turn, or to throw it away and retype it. Neither is great for a prompt with pasted logs or an image in it, and the stash keeps both. It also keeps the draft out of the way while you type something short, so a quick question does not need a second terminal.

Two things. It is a single slot, so stash, restore, then stash again. And some terminals swallow Ctrl+S themselves, so if nothing happens, that is the first thing I would check.

Further reading: Interactive mode – Claude Code docs, On this site: Ctrl+R searches every prompt you ever sent to Claude Code, On this site: Shift+Tab cycles permission modes, and acceptEdits skips the file-edit prompts

More CLI tips printf 'GET /\r\n' | hexdump -C hexdump -C -s 512 -n 64 disk.img wget --limit-rate=2m https://example.com/big-file.iso wget --spider https://example.com/file.zip rg 'apiKey' -g '!*.min.js' -g '!package-lock.json' All CLI tips (46) All topics

Link