ohmyzsh/plugins/copybuffer.zsh
Brad Urani 6aabcdf876 Add copybuffer function and keybinding
binds ctrl-o to copy the command line buffer to the system clipboard
2016-09-21 01:34:15 -07:00

14 lines
309 B
Bash

# copy the active line from the command line buffer
# onto the system clipboard (requires clipcopy plugin)
copybuffer () {
if which clipcopy &>/dev/null; then
echo $BUFFER | clipcopy
else
echo "you must install clipcopy to use this keybinding"
fi
}
zle -N copybuffer
bindkey "^O" copybuffer