lib: add support for clippaste in WSL using powershell

Source: https://github.com/microsoft/WSL/issues/4852#issuecomment-579616808
This commit is contained in:
Marc Cornellà 2020-02-28 19:07:05 +01:00
parent 3e16d64347
commit 888ab9091c

View file

@ -83,7 +83,7 @@ function detect-clipboard() {
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 "$@"; }
function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
else
function _retry_clipboard_detection_or_fail() {
local clipcmd="${1}"; shift