368198b7616eb69b396de86d9ec4ff0f35bd72f0

Author
Chai Feng <chaifeng@chaifeng.com>
Committer
GitHub <noreply@github.com>
Date

Message

Fix an issue with escape characters (#7979)

Co-authored-by: Francisco de Zuviría <FranciscodeZuviria@fusap.com.ar>

Diff

 1diff --git a/plugins/copybuffer/copybuffer.plugin.zsh b/plugins/copybuffer/copybuffer.plugin.zsh
 2index cc205d40f844c7be1df62132094b91d46ac05ba7..483ed5a5fe59e070dd88e378f2813583caadc536 100644
 3--- a/plugins/copybuffer/copybuffer.plugin.zsh
 4+++ b/plugins/copybuffer/copybuffer.plugin.zsh
 5@@ -1,9 +1,9 @@
 6 # copy the active line from the command line buffer 
 7-# onto the system clipboard (requires clipcopy plugin)
 8+# onto the system clipboard
 9 
10 copybuffer () {
11   if which clipcopy &>/dev/null; then
12-    echo $BUFFER | clipcopy
13+    printf "%s" "$BUFFER" | clipcopy
14   else
15     echo "clipcopy function not found. Please make sure you have Oh My Zsh installed correctly."
16   fi