Created
January 8, 2019 16:33
-
-
Save brennen/33c1dfa20606f7a7e8aa91906e058425 to your computer and use it in GitHub Desktop.
This file contains 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
# This works when run from a shell: | |
#!/bin/sh | |
tmpfile=`mktemp /tmp/edit-clipboard.XXXXXX` | |
xclip -d localhost:1 -o > "$tmpfile" | |
"$EDITOR" "$tmpfile" | |
xclip -d localhost:1 -i "$tmpfile" | |
rm "$tmpfile" | |
# This doesn't work: | |
#!/bin/sh | |
export EDITOR=gvim | |
edit-clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment