Browse Source

fd: Rework command to be more idiomatic

Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Rohit Goswami 3 years ago
parent
commit
fbee1ff8bd
1 changed files with 1 additions and 3 deletions
  1. 1 3
      plugins/common-aliases/common-aliases.plugin.zsh

+ 1 - 3
plugins/common-aliases/common-aliases.plugin.zsh

@@ -34,9 +34,7 @@ alias -g P="2>&1| pygmentize -l pytb"
 
 alias dud='du -d 1 -h'
 alias duf='du -sh *'
-if ! which fd >/dev/null 2>%1; then
-  alias fd='find . -type d -name'
-fi
+(( $+commands[fd] )) || alias fd='find . -type d -name'
 alias ff='find . -type f -name'
 
 alias h='history'