浏览代码

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.
Robert Estelle 5 年之前
父节点
当前提交
841008c947
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/clipboard.zsh

+ 1 - 1
lib/clipboard.zsh

@@ -76,7 +76,7 @@ function detect-clipboard() {
     function clipcopy() { win32yank -i < "${1:-/dev/stdin}"; }
     function clippaste() { win32yank -o; }
   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 -; }
   else
     function _retry_clipboard_detection_or_fail() {