5 ms·
Instead of which(1), you could use type, which is aware of builtins and aliases: $ type cd cd is a shell builtin
by jwilk 9y ago
Instead of which(1), you could use type, which is aware of builtins and aliases:
$ type cd
cd is a shell builtin
- aidenn0 9y agocommand is also useful for this sort of thing (with the -v and -V options). It can also be used to ignore shell functions and aliases (without options) so: $ alias cd=ls $ cd foo <lists contents of foo> $ command cd foo <changes to directory foo>
- chaosfox 9y agoif you use zsh on the other hand.. % which which which: shell built-in command