1. 14
  1. 3

    At multiple jobs now I’ve changed people’s lives (only mildly exaggerating) by showing them things that I’d picked up sort of by osmosis and long took for granted: history searching in the shell, readline keybindings to quickly navigate/edit lines in a shell or in many REPLs, and a few common tips and tricks for navigating from the command line and creating/moving files and directories.

    At one company I got to write a long-ish thing that became part of the engineering team’s documentation, trying to do an intro to productive use of command-line tools. I wish more companies would invest in and allow that, because the gains can be significant.

    Some iTerm2-specific tips I’ll add on here for fun:

    • Cmd+Shift+H will pop open a menu of strings you’ve recently pasted into the terminal. So if you’ve pasted something that isn’t a command and since put something else in your clipboard, or if it was a command but you don’t remember enough of it for an efficient history search, you can use that to try to find it again.
    • Cmd+Option+B opens a slider to let you replay the history of what was visible in your terminal, useful for programs with output that disappears when they exit.
    • Cmd+Shift+E will add timestamps to each currently visible line, telling you when they were output to the terminal, useful for seeing when something happened in a longer-running process.
    1. 1

      That sound super useful, is there a link to this doc? I had something similar in mind when I wrote that, inspired from my interactions with coworkers who aren’t comfortable at all with the terminal.

    2. 1

      I wonder what the best way to provide the author with proofreading feedback is.

      1. 1

        email works fine. Comments there do also work.

        1. 1

          I didn’t see a place to leave comments there but will send email.

      2. 0

        On macOS, a popular terminal is iterm2.

        Why would you list a paid application as a popular choice in an article for newbies? Terminal.app is fine and the obvious starting point for most users.

        1. 31

          iTerm2 is free and OSS

          1. 3
          2. 3

            To be honest, I always thought it was paid too. I think there is something that sounds similar that is a commercial app.

            1. 2

              It’s funny, I knew a handful of talented Linux kernel devs at an old internship, who all swore by Mobaxterm, a monstrosity of a Windows SSH client (it ships an embedded X server with some form of dwm, wild) that is anything but FLOSS. Oddly enough, I had only seen it otherwise in a non-CS robotics class where it was the batteries-included alternative to PuTTY.

              I totally agree with your sentiment about starting programmers with FLOSS software, even if iterm2 is indeed FLOSS, haha. Many people won’t know what’s out there if the paid/proprietary option is the first they see.

              1. 3

                Oddly enough, I had only seen it otherwise in a non-CS robotics class where it was the batteries-included alternative to PuTTY.

                I feel like a 30 year old boomer for preferring PuTTY over most other WIndows SSH clients. (Well, the other grognard SSH client is Tera Term…)

              2. 1

                Terminal.app is completely useless for people who need to both use AltGr (right Option) for diacritics and Alt (left Option) as a function modifier.

                1. 1

                  I don’t understand what you mean by function modifier.

                  1. 1

                    To make it do something different from inserting a letter, such as:

                    upcase-word (M-u)
                           Uppercase the current (or following) word.  With a negative  ar‐
                           gument, uppercase the previous word, but do not move point.
                    downcase-word (M-l)
                           Lowercase  the current (or following) word.  With a negative ar‐
                           gument, lowercase the previous word, but do not move point.
                    capitalize-word (M-c)
                           Capitalize the current (or following) word.  With a negative ar‐
                           gument, capitalize the previous word, but do not move point.