Commit Graph
8 Commits
Author SHA1 Message Date
Robert EstelleandGitHub 98762faa07 fix(vi-mode): control cursor, restore and use visual mode and speed up mode changes (#8004) 2021-01-02 22:41:57 +01:00
Robert EstelleandGitHub 1c58a746af lib: safety fix and speed-ups for git.zsh prompt functions (#7804) 2020-07-06 17:31:40 +02:00
Robert Estelle d81cd753e0 clipboard: Fix bad expansion of exit-code test 2019-07-14 12:56:51 -04:00
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: https://github.com/neovim/neovim/blob/e682d799fa3cf2e80a02d00c6ea874599d58f0e7/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