Skip to content

Instantly share code, notes, and snippets.

View walkerh's full-sized avatar

Walker Hale IV walkerh

  • Baylor College of Medicine, HGSC
  • Houston, TX
View GitHub Profile
@walkerh
walkerh / pbedit.sh
Last active July 31, 2018 14:28 — forked from TooTallNate/pbedit.sh
`pbedit` command: Edit the clipboard in your $EDITOR
#!/bin/bash
# macOS tool to edit the contents of the clipboard in the default text editor
# If your editor supports pipelining it can simplify to:
# pbpaste | $EDITOR | pbcopy
# pbpaste | mate -w | pbcopy # example
tmpfile=`mktemp`
pbpaste > $tmpfile
$EDITOR $tmpfile