How to come out of dquote prompt in Terminal - macOS/Linux

When I was recently working on my Mac Terminal with some usual commands on zsh shell, suddenly after running the command I ended up in a dquote> prompt, this seems weird at first, but soon I realised what I had done,

% echo "Hello there! how are you?

As you can see when you execute the above echo statement in the macOS/Linux Terminal, the zsh/bash prompt is not returned instead you see dquote.

What does dquote> means?

If you have a double-quote in your command and you do not close it and execute the command, you end up in dquote, what it means is that shell is waiting for a closing double-quote. So you can write what ever you want and add as many line breaks, once you add a double-quote and press enter the command will get executed and prompt is returned.

% echo "Hello,
dquote> how are
dquote> you 
dquote> doing 
dquote> today!"

how are


How to come out of dquote?

How to come out of Terminal dquote prompt

dquote implies the shell (zsh/bash etc) is waiting for a closing double-quote, so just add a double-quote and press enter!

exiting dquote prompt terminal
Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap