mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-04 04:31:14 -03:00
Add support for copy and paste in WSL
- clip.exe is used to copy to the Windows clipboard - There's no binary for pasting from the Windows clipboard so `Get-Clipboard` from powershell is used as a workaround. The superflous carriage return is stripped from the output.
This commit is contained in:
committed by
Fabian Homborg
parent
69ab68d856
commit
ea1dffd53d
@@ -8,6 +8,8 @@ function fish_clipboard_paste
|
||||
set data (xsel --clipboard 2>/dev/null)
|
||||
else if type -q xclip
|
||||
set data (xclip -selection clipboard -o 2>/dev/null)
|
||||
else if type -q powershell.exe
|
||||
set data (powershell.exe Get-Clipboard | string trim -r -c \r)
|
||||
end
|
||||
|
||||
# Issue 6254: Handle zero-length clipboard content
|
||||
|
||||
Reference in New Issue
Block a user