News for hackers. Stuff that matters.
Re:macOS command-line tools you might not know about by adolph on Tuesday June 27, 2023 @01:15PM (#36495894)
pb[paste|copy] are a life improver. Here is a one-liner to edit the pasteboard contents in vim.

  pbpaste > tmp; vim tmp; cat tmp | pbcopy; rm tmp;
I also use pbpaste to append various notes to files, but since pbpaste doesnt have a newline at the end I wind up using:

  echo "$(pbpaste)" >> notes.txt
Re:macOS command-line tools you might not know about by dharmab on Tuesday June 27, 2023 @01:18PM (#36495942)
You can do this specific task with just vim: https://vi.stackexchange.com/a/21448