@ 260802.2

200502.1 · 5e761f4eb3ddb1a900df7f99dde6dbe8b5eb0b58

fix x11 copy & paste, particularly with neovim

It appears that copying with xclip and pasting into gmail/gdocs results in newlines getting stripped. But apparently using xsel works. So switch everything over to xsel, including neovim. I could have achieved this by just uninstalling xclip (and neovim would then pickup xsel automatically), but pass depends on xclip, so we still need it. Ah well.

We also add `xcp`, which will just do the right thing in terms of copying from stdin based on which tool is installed.

See also: https://github.com/neovim/neovim/issues/5853

reading declarations

Changes to bin/gist. All files

bin/gist

@@ -3,5 +3,5 @@ # Uploads a gist and copies to the resulting URL to the clipboard. # (Instead of the primary X selection, which requires using the mouse. Bah.) url=$(/usr/bin/gist "$@")-echo "$url" | xclip -selection clipboard+echo "$url" | xcp echo "$url"