I was playing around a bit with the names of some executables, putting them in a folder, ~/bin, which is in my $PATH. Now I'm wondering how I can set the preferences of a bash-3.2 terminal so that it picks up these executables instead of the builtins or aliases to execute.For example, if I put a script named cd in a directory in $PATH, the builtin for cd is still executed. However, if I create an alias for cd, then this alias will be executed, overriding the builtin.$ type cdcd is a shell builtinMy questionsIs there a way to make an executable file in $PATH have, by default, preference over a shell builtin, by executing only, e.g. cd without having to resort to using the commands builtin or command?I'm also interested in any official reference which discusses this preference (not the reasoning, that I do understand).Note: This question is purely for personal educational purposes, I am wondering why it works the way it works.
Default preference of executable over built-ins with the same name
bash;shell;path;shell builtin
My question is, is there a way to make an executable file in $PATH  have preference over an shell builtin, by executing only, e.g. cd  without builtin or command?You can use the builtin enable to disable/enable a builtin.  Say:enable -n cdto disable the builtin cd.  Say enable cd to enable the builtin.The following would give an example of switching between the builtin and command:$ type cdcd is a shell builtin$ enable -n cd$ type cd-bash: type: cd: not found$ enable cd$ type killkill is a shell builtin$ enable -n kill$ type killkill is /bin/kill$ enable kill$ type killkill is a shell builtin