2 ms·
Indeed, which does not recognize aliases and functions, so `command -v` seems better: command -v llh >/dev/null 2>&1 ; echo $? 0 # good usr/bin/whi
by wazari972 13y ago
Indeed, which does not recognize aliases and functions, so `command -v` seems better:
command -v llh >/dev/null 2>&1 ; echo $?
0 # good
usr/bin/which llh >/dev/null 2>&1 ; echo $?
1 # good
however (zsh) shell internal which does:
which llh ; echo $?
llh='ls -lh'
/usr/bin/ls
0 #good
(I'm not sure however when ZSH chooses to use its internal function or the one from $PATH)