]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/copybuffer/copybuffer.plugin.zsh
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / copybuffer / copybuffer.plugin.zsh
1 # copy the active line from the command line buffer 
2 # onto the system clipboard
3
4 copybuffer () {
5   if which clipcopy &>/dev/null; then
6     printf "%s" "$BUFFER" | clipcopy
7   else
8     zle -M "clipcopy not found. Please make sure you have Oh My Zsh installed correctly."
9   fi
10 }
11
12 zle -N copybuffer
13
14 bindkey -M emacs "^O" copybuffer
15 bindkey -M viins "^O" copybuffer
16 bindkey -M vicmd "^O" copybuffer