-
-
Save HaiNguyen007/93cf204fda1afddf4f732252e7ae909b to your computer and use it in GitHub Desktop.
`pbedit` command: Edit the clipboard in your $EDITOR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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