copybuffer.plugin.zsh 346 B

1234567891011121314
  1. # copy the active line from the command line buffer
  2. # onto the system clipboard (requires clipcopy plugin)
  3. copybuffer () {
  4. if which clipcopy &>/dev/null; then
  5. echo $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