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.
This commit is contained in:
Robert Estelle 2019-07-14 12:53:27 -04:00
parent d71d3d9905
commit 841008c947

View File

@ -76,7 +76,7 @@ function detect-clipboard() {
function clipcopy() { win32yank -i < "${1:-/dev/stdin}"; } function clipcopy() { win32yank -i < "${1:-/dev/stdin}"; }
function clippaste() { win32yank -o; } function clippaste() { win32yank -o; }
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
function clipcopy() { tmux load-buffer "${1:-/dev/stdin}"; } function clipcopy() { tmux load-buffer "${1:--}"; }
function clippaste() { tmux save-buffer -; } function clippaste() { tmux save-buffer -; }
else else
function _retry_clipboard_detection_or_fail() { function _retry_clipboard_detection_or_fail() {