Enable and disable builtin shell commands
Syntax enable [-adnps] [-f filename] [name ...] Key -f filename Load the new builtin command name from shared object filename, on systems that support dynamic loading. -d name Delete a builtin previously loaded with -f. -n List all disabled builtins -n name Each name is disabled; otherwise, names are enabled. -a List all builtins with enabled/disabled state of each. -p List all enabled builtins. <no options> List all enabled builtins. -s List only the POSIX special builtins.
Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, even though the shell normally searches for builtins before disk commands.
Use the test binary found via the PATH instead of the shell builtin version
$ enable -n test
To restore the builtin version:
$ enable test
The return value is 0 unless a name is not a shell builtin or there is an error loading a new builtin from a shared object.
“I really believe in completely being naive and having high hopes when meeting someone new. I can kind of re-do my stupidity or my naivete. It pisses me off to think that we’re conditioned to push away bad feelings and to think that anything that’s uncomfortable is something to be avoided. When things are really bad nowadays, I recognize the value in it because it’s me filling my quota - it’s going to make my joy more intense later” ~ Fiona Apple.
Related macOS commands:
lpr - Print files
lprm - Remove jobs from the print queue
lpstat - Printer status information