zsh: Use dictionary for command existence check
Use the `commands` dictionary from zsh instead of always calling `command`. Regex used: s/command -v \([^ ]*\) &>\/dev\/null/(( $+commands[\1] ))/g
This commit is contained in:
@@ -1 +1 @@
|
||||
! command -v direnv &>/dev/null || eval "$(direnv hook zsh)"
|
||||
! (( $+commands[direnv] )) || eval "$(direnv hook zsh)"
|
||||
|
||||
Reference in New Issue
Block a user