copybuffer.plugin.zsh 328 B

1234567891011121314
  1. # copy the active line from the command line buffer
  2. # onto the system clipboard
  3. copybuffer () {
  4. if which clipcopy &>/dev/null; then
  5. printf "%s" "$BUFFER" | clipcopy
  6. else
  7. echo "clipcopy function not found. Please make sure you have Oh My Zsh installed correctly."
  8. fi
  9. }
  10. zle -N copybuffer
  11. bindkey "^O" copybuffer