浏览代码

chore(lib): only create `afind` alias if `ack` is installed (#11017)

hellzbellz 1 年之前
父节点
当前提交
0c7ce363c9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/misc.zsh

+ 2 - 2
lib/misc.zsh

@@ -24,10 +24,10 @@ env_default 'LESS' '-R'
 ## super user alias
 alias _='sudo '
 
-## more intelligent acking for ubuntu users
+## more intelligent acking for ubuntu users and no alias for users without ack
 if (( $+commands[ack-grep] )); then
   alias afind='ack-grep -il'
-else
+elif (( $+commands[ack] )); then
   alias afind='ack -il'
 fi