Command line tricks
Working through the command line, i.e. working with a text-only interface from a terminal, is a very powerful way to do precise and flexible data manipulation. Unfortunately, the command line has fallen out of use for a wide variety of reasons, non of which having to do with it being in any way inferior or more difficult. As a matter of fact, it is easier to do certain operations, in particular producing automated and reproducible processes, and it is the preferred method for a large group of scientists (not only programmers) and even just regular “power users.”
In the following section, I will gather some tricks that make it easier for you to work with command line tools like CQP. A terminal only handles text in- and output so mouse functionality is limited. Some keys and key combinations also migh show unexpected behavior.
6.3.3 The shell
The shell is what is running in your terminal and interprets your commands. It is the counterpart of the background process of Windows, Linux or macOS that draws windows.
6.3.4 Copy & Paste
Depending on your terminal program you might want to try the following things.
ctrl + shift + c
(copy) andctrl + shift + v
(paste)- middle mouse button (in Linux and macOS)
- Windows only: right click, (both copy and paste)
ctrl + c
and ctrl + v
have different meanings in most terminals. ctrl + c
e.g. cancels the current process.
6.3.5 Colors
It might sound weird, but the default color scheme in a terminal is probably one of the main reasons people find working in the command line scary. Black on white or white on black (blue for Powershell) are ugly, hurt your eyes, and can make focussing for longer time periods difficult. My suggestion is, therefore, to switch this to a low contrast color scheme. Light gray text on a darker gray background is what I personally can work with best.
- Windows Powershell: right click on the top bar → properties → colors
- Windows Terminal: See here
- Putty: color menu is right on the left on the start screen
- macOS: right click on “Terminal” in the panel → properties →pr
There is a whole parallel universe of people for whom terminal color schemes are an art form (check out this subreddit). Since CQP does not produce colored output (yet), it is unfortunately not too useful for us.
6.3.6 Eastereggs
- Star Wars in the terminal:
telnet towel.blinkenlights.nl
- Dancing parrot:
curl parrot.live