From 368198b7616eb69b396de86d9ec4ff0f35bd72f0 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Fri, 28 Feb 2020 05:47:06 +0800 Subject: [PATCH] Fix an issue with escape characters (#7979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Francisco de Zuviría --- plugins/copybuffer/copybuffer.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/copybuffer/copybuffer.plugin.zsh b/plugins/copybuffer/copybuffer.plugin.zsh index cc205d40f..483ed5a5f 100644 --- a/plugins/copybuffer/copybuffer.plugin.zsh +++ b/plugins/copybuffer/copybuffer.plugin.zsh @@ -1,9 +1,9 @@ # copy the active line from the command line buffer -# onto the system clipboard (requires clipcopy plugin) +# onto the system clipboard copybuffer () { if which clipcopy &>/dev/null; then - echo $BUFFER | clipcopy + printf "%s" "$BUFFER" | clipcopy else echo "clipcopy function not found. Please make sure you have Oh My Zsh installed correctly." fi