Why does a command-line prompt sometimes appear to wait for more input?
Quick answer
In an interactive Bash session, a secondary prompt means Bash is reading another line of a multiline command. It does not tell you which part is incomplete: the prompt text is configurable, and an unfinished quote or a line continuation may be involved. Inspect what you typed before pressing Enter. If you do not understand the pending input or its effects, do not guess; use the interruption method appropriate to your shell or consult its documentation.
The question, the details, the next step.
A practical checklist
Pause before entering another line, especially if you do not understand what the command would do.
Read the command from the start and look for syntax that began but did not finish.
In Bash, check whether a single quote is unmatched or a backslash continues the line outside quotes.
Do not infer the cause from the prompt’s text alone; it can be configured.
If you want to abandon the input, consult the cancellation guidance for your shell and terminal.
A few more useful answers
Does a continuation prompt always mean I forgot a closing quote?
Does the Bash explanation apply to every command-line shell?
The cited behavior is specifically about Bash. Identify your shell and check its documentation rather than assuming another shell uses the same prompt or input rules.
Should I press Enter again to see what happens?
Not if you do not understand the pending input or its effects. Inspect what you entered first; if you mean to stop, use the cancellation method documented for your shell and terminal.
Sources
References used for this guide.
- [S1] GNU Bash Reference Manual: Interactive shell behavior gnu.org · Checked
- [S2] GNU Bash Reference Manual: Quoting gnu.org · Checked
