Skip to content

Instantly share code, notes, and snippets.

@TooTallNate
Created March 18, 2016 18:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save TooTallNate/f7baa168dea5602a346d to your computer and use it in GitHub Desktop.
Save TooTallNate/f7baa168dea5602a346d 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