TIL: The `>` Prompt Means the Shell Is Waiting
TIL: The > prompt isn’t an error — the shell is waiting for more input
Today I realized that when the shell shows a > prompt, it’s not stuck or broken.
It means the shell is waiting for more input because a command is syntactically incomplete.
Common reasons this happens:
- You typed
do(e.g. in awhileorforloop) - You opened a
{block - You opened a quote (
"or') - You ended a line with
\
Example:
find . -name '*.sh' | while read -r f; do
>
At this point, the shell expects the body of the loop.
You can just keep typing:
echo "source ~/gh/scripts/$f"
done
No special key combo is needed — just press Enter.
What I used to do (wrong)
When I saw:
>
I assumed something went wrong and hit:
Ctrl+C
That just cancels the command.
Mental reframe
>means “I’m not done yet.”
It’s the shell equivalent of an editor waiting for a closing brace.
Rule of thumb
If you see >:
- don’t panic
- don’t Ctrl+C
- finish the command
This is one of those “obvious after you know it” shell things — but until it clicks, it feels like WTF mode every time.