Alcides Fonseca

40.197958, -8.408312

TIL: Flags for macOS's open command

  • open -e opens the item in TextEdit. I basically never want this, and it’s fascinating that it’s built in.
  • open -t opens in your default text editor — for me it’s BBEdit; but whatever you have configured will do. Note: this is not $EDITOR but LaunchServices: a macOS-ism.
  • open -F opens a “fresh” version of the app, not doing window or document restoration. Handy if it’s borked!
  • open -R reveals it in the Finder instead of opening it.
  • open -f reads input from stdin and opens the results in your text editor (weird but… cool, I think).

Read the Manual: open — Chris Krycho