1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-13 17:30:08 +00:00

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 -; } function clippaste() { tmux save-buffer -; }
elif [[ $(uname -r) = *icrosoft* ]]; then elif [[ $(uname -r) = *icrosoft* ]]; then
function clipcopy() { clip.exe < "${1:-/dev/stdin}"; } function clipcopy() { clip.exe < "${1:-/dev/stdin}"; }
function clippaste() { _retry_clipboard_detection_or_fail clippaste "$@"; } function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
else else
function _retry_clipboard_detection_or_fail() { function _retry_clipboard_detection_or_fail() {
local clipcmd="${1}"; shift local clipcmd="${1}"; shift