Use the `commands` dictionary from zsh instead of always calling `command`. Regex used: s/command -v \([^ ]*\) &>\/dev\/null/(( $+commands[\1] ))/g
2 lines
56 B
Plaintext
2 lines
56 B
Plaintext
! (( $+commands[direnv] )) || eval "$(direnv hook zsh)"
|