When starting to use the terminal, it’s inevitable that you come across running
a command that remains running and the direction is to press
And sometimes, you may be directed to press
But what’s the difference? Why did one work one time and not the other?
A simple question you can ask yourself:
Has the command prompted for input?
So, does this command prompt for input?
$ npm start
> firstname.lastname@example.org start /Users/travis/work/tps/school-locator > react-scripts start Starting the development server... Compiled successfully! You can now view school-locator in the browser. Local: http://localhost:3001/ On Your Network: http://192.168.1.65:3001/
No. It’s just a running development server. So
Think of it as “Cancel”.
Let’s try another.
Does this command prompt for input?
Server: PostgreSQL 13.0 Version: 3.0.0 Chat: https://gitter.im/dbcli/pgcli Home: http://pgcli.com travis@/tmp:travis>
Yes. It’s expecting me to input some SQL queries. So
I don’t have a handy mnemonic but I remember it as part of the
To re-enforce using
Control-D to quit a prompt, consider a typical
terminal: It’s a prompt, and waiting for your input.
Control-Cif it’s just running, doing it’s thing.
Control-Dif it’s waiting on you.
Today I'm stepping out of my comfort zone and committing to doing lightning talks at Tulsa Web Devs. After last nights meeting, while others were doing so, I realized that I should also be sharing the things that interest me. Maybe someone else will find something I have to say interesting.