浏览代码

Fix an issue with escape characters (#7979)

Co-authored-by: Francisco de Zuviría <FranciscodeZuviria@fusap.com.ar>
Chai Feng 4 年之前
父节点
当前提交
368198b761
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugins/copybuffer/copybuffer.plugin.zsh

+ 2 - 2
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