Here's a preview from my zine, The Secret Rules of the Terminal! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!
get the zine!
read the transcript!
Terminal programs have a lot of hidden rules and conventions (like some programs don’t quit when you press Ctrl+C!), and knowing them makes your life WAY easier.
Here are some of the questions I ask myself when starting a program!
-
is it a REPL? (
Ctrl+Dprobably quits) (I can probably use basicreadlineshortcuts) -> is it using canonical mode? (arrow keys don’t work when entering text, tryrlwrap) -
am I actually in another program it started? (A pager like
lessor a text editor likevim) -
is it noninteractive? (quit with
Ctrl+C) -> is it stuck because it’s waiting for input on stdin and I forgot to pipe to it? -
is it a shell? -> is this a minimal shell like
dash? (if so, can I usebashinstead?) -
is it full screen? (
qmight quit) -> mouse reporting: is it on? -> (selecting text doesn’t work, but you might be able to click to navigate) -
am I in some kind of special environment? -> (a server? tmux/screen? a container? a virtualenv? what environment variables are set?)