浏览代码

fix(copybuffer): prevent `which` alias usage (#12379)

Marc Cornellà 3 周之前
父节点
当前提交
803e1a784c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/copybuffer/copybuffer.plugin.zsh

+ 1 - 1
plugins/copybuffer/copybuffer.plugin.zsh

@@ -2,7 +2,7 @@
 # onto the system clipboard
 # onto the system clipboard
 
 
 copybuffer () {
 copybuffer () {
-  if which clipcopy &>/dev/null; then
+  if builtin which clipcopy &>/dev/null; then
     printf "%s" "$BUFFER" | clipcopy
     printf "%s" "$BUFFER" | clipcopy
   else
   else
     zle -M "clipcopy not found. Please make sure you have Oh My Zsh installed correctly."
     zle -M "clipcopy not found. Please make sure you have Oh My Zsh installed correctly."