Echo

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Dec 9 03:23:15 AEST 1988


In article <6646 at june.cs.washington.edu> ka at june.cs.washington.edu (Kenneth Almquist) writes:
>The problem seems to be worse with shell builtins, though, because the
>shell builtins are checked for before PATH is searched.  I've been thinking
>of adding a `rename' command to allow shell builtins to be moved around.

I don't think "rename" is a wise idea, because of its interaction with
definitions used in shell functions.  The BRL version of the SVR2 shell
(unlike the original SVR2 shell) allows shell function names to override
builtin names.  We also added the 9th Edition UNIX "builtin" builtin to
provide a way to access the builtin name instead of a possible function
name.  This allows, for example, the user to define a "cd" function that
does other things (like updating PS1) along with using the "builtin cd"
command to do the real chdir.  Presumably you could define "test" to be
"./test" if you have problems with "test" being built-in.  (Functions
would normally be written to use "[ ... ]" instead of "test ...".)



More information about the Comp.unix.wizards mailing list