5 ms·
Yet, principle of least surprise. What is more surprising, Ctrl+D working or quit/exit not working? Maybe I am an outlier but I would try exit/quit/bye first.
by tudelo 8y ago
Yet, principle of least surprise. What is more surprising, Ctrl+D working or quit/exit not working? Maybe I am an outlier but I would try exit/quit/bye first.
- sdegutis 8y agoI learned about Ctrl + D pretty early on in my software career, probably around 2009 or so, and have been using it 99.99% of the time since then[1]. It's both consistent and easy, so I really can't see any benefit of not using it. [1] The 0.01% of the time was when I was testing out using Windows for software dev. I don't remember but I don't think Ctrl + D works there.
- dvlsg 8y agoI find myself pressing ctrl+c on windows.
- eitally 8y agoctrl+c also works on Crosh (Chrome Shell).
- y4mi 8y agoBut not on Windows cmd I think it worked in powershell however, can't test right now though Also: chromeos is Linux. It's a safe bet they'll support standard signals
- dvlsg 8y agoYou mean in general or specifically for PostgreSQL? Ctrl+c definitely works in cmd in general, which is what my original post was referencing. I use it all the time. Not sure about for PostgreSQL in cmd off the top of my head (posting from my phone). I suspect because I got down voted that it may not work there.
- TheDong 8y agoAnyone using psql should be familiar with bash. Anyone using bash should be familiar with readline. Anyone familiar with readline should instantly recognize psql as being a readline input. It seems like a reasonable set of conclusions to draw, which makes ctrl-d indeed the most obvious thing to try.
- mad_hominem 8y agoI don’t think this follows. I’ve been at multiple prompts that look like readline but aren’t. Also ‘exit’ works in bash.
- jorams 8y agoCtrl + D works just fine without readline as well, so you don't even need that conclusion.