freebsd-dev/bin
Jilles Tjoelker 4b45b49a70 sh: Remove special %builtin PATH entry.
All builtins are now always found before a PATH search.

Most ash derivatives have an undocumented feature where the presence of an
entry "%builtin" in $PATH will cause builtins to be checked at that point of
the PATH search, rather than before looking at any directories as documented
in the man page (very old versions do document this feature).

I am removing this feature from sh, as it complicates the code, may violate
expectations (for example, /usr/bin/alias is very close to a forkbomb with
PATH=/usr/bin:%builtin, only /usr/bin/builtin not being another link saves
it) and appears to be unused (all the %builtin google code search finds is
in some sort of ash source code).

Note that aliases and functions took and take precedence above builtins.
Because aliases work on a lexical level they can only ever be overridden on
a lexical level (quoting or preceding 'builtin' or 'command'). Allowing
override of functions via PATH does not really fit in the model of sh and it
would work differently from %builtin if implemented.

Note: POSIX says special builtins are found before functions. We comply to
this because we do not allow functions with the same name as a special
builtin.

Silence from:	freebsd-hackers@ (message sent 20101225)
Discussed with:	dougb
2011-01-09 21:07:30 +00:00
..
cat Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
chflags mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
chio Zero struct before reading from it 2010-06-02 09:34:41 +00:00
chmod - Don't include both <sys/types.h> and <sys/param.h> 2009-09-02 05:26:59 +00:00
cp Don't try to copy a socket after "xxx is a socket (not copied)." message. 2010-06-05 08:50:39 +00:00
csh Move most of the remaining USD/PSD/SMM papers into share/doc 2010-12-04 10:11:20 +00:00
date Explain that setting an absolute day value can fail and that the month should 2010-06-04 06:56:58 +00:00
dd Bump .Dd for r187609 2009-01-30 16:23:57 +00:00
df Staticify internal routines. 2009-06-23 23:30:56 +00:00
domainname Use a standard section name. 2006-12-18 15:45:01 +00:00
echo echo(1): Clarify portability and mention literal "--" handling. 2010-11-12 22:43:40 +00:00
ed ed(1): make WARNS=6 clean 2010-03-04 16:08:01 +00:00
expr expr(1): Add sh(1) versions of examples, remove an incorrect example. 2010-09-09 21:59:53 +00:00
getfacl More mdoc nitpicking to improve compatibility to mdocml 2010-06-11 06:04:07 +00:00
hostname Staticify internal routines. 2009-06-23 23:30:56 +00:00
kenv Add missing `void' for function without arguments. 2009-12-29 08:45:07 +00:00
kill sh: Add kill builtin. 2010-12-21 22:47:34 +00:00
ln Spelling fixes. 2010-07-31 21:09:49 +00:00
ls Change all our own code to use st_*tim instead of st_*timespec. 2010-03-28 13:16:08 +00:00
mkdir More markup fixes. 2006-12-27 11:28:00 +00:00
mv Add NFSv4 ACL support to mv(1). 2009-09-04 21:49:37 +00:00
pax Touch the man page date after updating the ustar limitations. 2010-08-29 12:17:16 +00:00
pkill Add -l to the synopsis 2010-07-12 01:58:46 +00:00
ps Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. 2011-01-09 12:50:44 +00:00
pwait mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
pwd Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
rcp Change all our own code to use st_*tim instead of st_*timespec. 2010-03-28 13:16:08 +00:00
realpath Enhance realpath(1) in a number of ways: 2008-03-09 12:46:39 +00:00
rm Fix typo and grammar nit 2010-10-31 19:16:54 +00:00
rmail Bump WARNS where possible. 2010-02-15 14:07:40 +00:00
rmdir Fix markup. 2006-12-27 12:14:56 +00:00
setfacl Increase carried_error if we skip a file due to an error. This ensures 2011-01-03 17:17:31 +00:00
sh sh: Remove special %builtin PATH entry. 2011-01-09 21:07:30 +00:00
sleep Document the new argument parser for sleep(1) and SIGINFO behaviour. 2010-08-02 10:59:23 +00:00
stty Add a new libc function: cfmakesane(3). 2010-11-02 17:00:56 +00:00
sync /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
test test: Move tests to tools/regression/bin/test. 2010-11-08 23:15:10 +00:00
uuidgen Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
Makefile Merge from tbemd: 2010-09-13 01:29:51 +00:00
Makefile.inc Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00