You can use arrow keys to move the cursor in macOS Terminal.

Left and right arrow will move left and right by character.

Option-left and right arrow will move by word.

ctrl-A moves to the beginning of the prompt and ctrl-E moves to the end. 1/20

#macOS #Terminal #protip
When you want more memorable Keystrokes you can create your own in the ‘Keyboard’ tab of the ‘Profiles’ area of Terminal Preferences. 2/20

#macOS #Terminal #protip
You can also navigate the Terminal prompt with the mouse pointer: Option-click (⌥-click) in the prompt moves the cursor there. 3/20

#macOS #Terminal #protip
When you hold the option key, the mouse pointer turns into a crosshair. With option-drag, you can do rectangular text selection in Terminal. This is especially useful for certain list outputs. 4/20

#macOS #Terminal #protip
You can double-click text in Terminal to select words, and triple-click to select lines. However, since 'words' end at slashes and other punctuation, you cannot select paths this way.

shift-command double-click selects an entire path or URL.

5/20

#macOS #Terminal #protip
After selecting a path or URL, use shift-command V to type the selection at the current prompt without having to copy it to the pasteboard first.

6/20

(There is a bug where the selection disappears when you start typing, but it still exists.)

#macOS #Terminal #protip
When you already have a path in the clipboard, but it contains spaces and other special characters, you can use ctrl-command V to paste and escape.

(combine this with the previous tip: shift-ctrl-command V pastes and escapes the selection)

7/20

#macOS #Terminal #protip
You can use command-up arrow to scroll to the previous command prompt. You can then use command-down arrow to jump back to the next command prompt.

If you have a Touch Bar Mac, you will see these strange arrow buttons, which do the same thing.

8/20

#macOS #Terminal #protip
You can use shift-command A to select the output of the previous command.

9/20

#macOS #Terminal #protip
You can follow @scriptingosx.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: