2 ms·
This is how I make pbcopy/pbpaste work on both Linux and WSL (Windows Subsystem for Linux). if [[ "$(uname)" == "Linux" ]]; then if ! grep -q Microso
by jonS90 6y ago
This is how I make pbcopy/pbpaste work on both Linux and WSL (Windows Subsystem for Linux).
if [[ "$(uname)" == "Linux" ]]; then
if ! grep -q Microsoft /proc/version; then
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
else
alias pbcopy='clip.exe'
alias pbpaste='powershell.exe -command "Get-Clipboard"'
fi
fi