Robert Estelle
841008c947
clipboard: Fix tmux clipcopy after testing
...
Tmux must have special handling for /dev/stdin since it's managing the
terminal itself. This was tested with tmux-2.9a on macOS.
2019-07-14 12:53:30 -04:00
Robert Estelle
d71d3d9905
clipboard: Fix "cilppaste" -> "clippaste" typo
2019-07-14 12:52:47 -04:00
Robert Estelle
01e934d634
clipboard: Add support for several more clipboards
...
This implements essentially the same heuristic as neovim, with the additional
(existing) special support for Cygwin.
See: e682d799fa/runtime/autoload/provider/clipboard.vim (L55-L121)
- pbcopy, pbpaste (macOS)
- cygwin (Windows running Cygwin)
- wl-copy, wl-paste (if $WAYLAND_DISPLAY is set)
- xclip (if $DISPLAY is set)
- xsel (if $DISPLAY is set)
- lemonade (for SSH) https://github.com/pocke/lemonade
- doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
- win32yank (Windows)
- tmux (if $TMUX is set)
2019-07-12 17:45:57 -04:00
Robert Estelle
956ca639bb
clipboard: Avoid unnecessary re-detection each time
...
Previously, OS detection would happen on each invocation. This makes it
happen once (unless it fails, in which case it will try again on the
next invocation).
This has the additional benefit of localizing the platform-specific
checks and commands, too, versus spreading them out in separate
functions.
2019-07-12 17:45:57 -04:00
Robert Estelle
d855547661
clipboard: Reduce unnecessary special-casing on stdin
...
Ideally the parameter would just be removed-users could always
just do "clipcopy < some-file". but removing the parameter would break
backwards compatibility.
In any case, this simplifies the logic considerably.
2019-07-12 17:45:57 -04:00
Hong
f7d4f985ac
Use $+commands to check the existence of a command in clipboard.zsh. ( #5519 )
2016-10-10 23:01:37 +02:00
Andrew Janke
b6d78df62c
clip*: add xsel support
2015-10-05 05:13:11 -04:00
Andrew Janke
5c8b0cc0c1
Add clipcopy() and clippaste() generic cross-platform CLI clipboard functions.
...
Change copydir, copyfile, and coffee plugins to use them, instead of the Mac-only `pbcopy` command.
2015-08-18 03:49:51 -04:00