|
|
|
|
|
by Taywee
1695 days ago
|
|
That depends on whether your shell has a built-in which or not. Mine says % which ls
ls: aliased to /bin/ls --color=auto
Which makes way more sense. Your "which" is not telling you what will actually be executed when you run the `ls` command there. `command`, on the other hand, is guaranteed to be a built-in, has consistent behavior, and has defined, consistent output, unlike `which`. What `which` outputs will be different depending on shell and what implementation of `which` you actually have installed. |
|