Comment

Comment by jonS90

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
parent jonS90 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton