Commit 57739cbc authored by Marc Cornellà's avatar Marc Cornellà
Browse files

lib: add support for clip.exe clipboard copy in WSL

parent 65642dfc
......@@ -78,6 +78,9 @@ function detect-clipboard() {
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
function clipcopy() { tmux load-buffer "${1:--}"; }
function clippaste() { tmux save-buffer -; }
elif [[ $(uname -r) = *icrosoft* ]]; then
function clipcopy() { clip.exe < "${1:-/dev/stdin}"; }
function clippaste() { _retry_clipboard_detection_or_fail clippaste "$@"; }
else
function _retry_clipboard_detection_or_fail() {
local clipcmd="${1}"; shift
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment