Email or username:

Password:

Forgot your password?
Darius Kazemi

Today I learned about "ctrl+q". This command is known as "parking" and what it does is takes the command you are typing, stashes it elsewhere and clears your command line, then after you execute your next command, retrieves it and fills your prompt.

So for example if I'm typing a git command and realized I need to `git diff` first, I can ctrl+q to "park" the command, type the diff, and then immediately get back to my original parked command

8 comments | Expand all CWs
brennen

@darius whoa, no way. i do this constantly with something like ctrl-a (go to start of line), ctrl-k (kill line), enter other command, ctrl-y (insert kill buffer). going to save me a lot of keystrokes if i manage to remember this one.

note for other readers: i think my terminal eats ctrl-q, but esc q works just fine.

OwO :flanell:

@darius Somehow it doesn't work for me

Darius Kazemi

@f2k1de @x44203 I would literally never

Jyrki :jyrki:🐾:heart_nb:

@darius okay, this _will_ be useful! Many thanks for sharing :>

D

@darius Ha, a git stash for your shell. That's great!

external quantum efficiency

@darius even better, the stash is a *stack*, you can push a bunch of commands onto it and they'll get popped back out one at a time. There's also a "swap top two items on the cmd stack" key that I can never remember.

Go Up