Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do

    if ! which pbcopy &> /dev/null; then
        alias pbcopy="xclip -selection clipboard"
        alias pbpaste="xclip -o -selection clipboard"
    fi
The `if` bit is so it only adds the alias if there isn't a `pbcopy`, so I can use the same dotfile on mac and linux


Thank you!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: