Skip to content

Instantly share code, notes, and snippets.

@Osse
Created January 15, 2013 12:08
Show Gist options
  • Save Osse/4538174 to your computer and use it in GitHub Desktop.
Save Osse/4538174 to your computer and use it in GitHub Desktop.
Copy the current contents of the ZLE buffer to the clipboard
bindkey '^X' copy-command
function copy-command() {
xsel -ib <<< $BUFFER
}
zle -N copy-command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment