Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created April 26, 2011 16:10
Show Gist options
  • Save smerrill/942554 to your computer and use it in GitHub Desktop.
Save smerrill/942554 to your computer and use it in GitHub Desktop.
Make X11 apps that expect xsel work with the OS X clipboard.
# Mimic xsel simply for the benefit of X11 apps.
xsel() {
if [[ $@ == "-ib" ]]; then
command pbcopy;
elif [[ $@ == '-ob' ]]; then
command pbpaste;
else
command xsel "$@";
fi
}
@smerrill
Copy link
Author

This is enough to get the clipboard module from https://github.com/muennich/urxvt-perls to work without modification on OS X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment