-
-
Save walkerh/a0047896845234bf38d0ad0f00d75760 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
#!/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 | |
pbcopy < $tmpfile | |
rm -f $tmpmfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment