Skip to content

Instantly share code, notes, and snippets.

@HaiNguyen007
Forked from TooTallNate/pbedit.sh
Created July 21, 2019 13:15
Show Gist options
  • Save HaiNguyen007/93cf204fda1afddf4f732252e7ae909b to your computer and use it in GitHub Desktop.
Save HaiNguyen007/93cf204fda1afddf4f732252e7ae909b to your computer and use it in GitHub Desktop.
`pbedit` command: Edit the clipboard in your $EDITOR
# Edit the clipboard in your $EDITOR
# Add this to your `.bashrc` file
function pbedit () {
local tmpfile=`mktemp`
pbpaste > $tmpfile
$EDITOR $tmpfile
pbcopy < $tmpfile
rm -f $tmpmfile
}
export -f pbedit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment