From ca968c4e5040f1ff4b5b5e12d9312360d807dcc1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 3 Jun 2024 19:56:39 +0800 Subject: added submodules, change . -> dot (see man stow --dotfiles) --- .../custom/plugins/copybuffer/copybuffer.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 dot-oh-my-zsh/custom/plugins/copybuffer/copybuffer.plugin.zsh (limited to 'dot-oh-my-zsh/custom/plugins/copybuffer/copybuffer.plugin.zsh') diff --git a/dot-oh-my-zsh/custom/plugins/copybuffer/copybuffer.plugin.zsh b/dot-oh-my-zsh/custom/plugins/copybuffer/copybuffer.plugin.zsh new file mode 100644 index 00000000..52c630c4 --- /dev/null +++ b/dot-oh-my-zsh/custom/plugins/copybuffer/copybuffer.plugin.zsh @@ -0,0 +1,14 @@ +# copy the active line from the command line buffer +# onto the system clipboard + +copybuffer () { + if which clipcopy &>/dev/null; then + printf "%s" "$BUFFER" | clipcopy + else + zle -M "clipcopy not found. Please make sure you have Oh My Zsh installed correctly." + fi +} + +zle -N copybuffer + +bindkey -M emacs "^E" copybuffer -- cgit v1.2.3