According to the manual,
command -v <command>
…causes a single word indicating the command or file name used to invoke command to be displayed.
Very useful when which foo
doesn’t work (for example nvm
which is a sourced function defined during shell creation).