freebsd-dev/bin
Jilles Tjoelker 84fbdd8ca0 sh: Expand assignment-like words specially for export/readonly/local.
Examples:
  export x=~
now expands the tilde
  local y=$1
is now safe, even if $1 contains IFS characters or metacharacters.

For a word to "look like an assignment", it must start with a name followed
by an equals sign, none of which may be quoted.

The special treatment applies when the first word (potentially after
"command") is "export", "readonly" or "local". There may be quoting
characters but no expansions. If "local" is overridden with a function there
is no special treatment ("export" and "readonly" cannot be overridden with a
function).

If things like
  local arr=(1 2 3)
are ever allowed in the future, they cannot call a "local" function. This
would either be a run-time error or it would call the builtin.

This matches Austin Group bug #351, planned for the next issue of POSIX.1.

PR:		bin/166771
2012-07-15 10:19:43 +00:00
..
cat Put some static keywords in the source code. 2011-10-31 08:59:17 +00:00
chflags mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
chio Add static keywords to chio(1). 2011-12-11 20:53:12 +00:00
chmod Update sticky(7) cross references. 2011-05-13 16:29:57 +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 Update to tcsh 6.18.01. 2012-02-22 03:36:15 +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 Bump date to today (since I modified it) 2012-03-03 17:52:19 +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 Add build option MK_ED_CRYPTO to control whether ed(1) is to have the 2012-05-19 17:55:49 +00:00
expr Remove redundant declaration of yyparse 2012-05-22 03:01:54 +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 I forgot to bump the manpage date. 2012-05-12 02:49:40 +00:00
kill kill: Note that this is used both as a normal program and a shell builtin. 2011-03-01 21:48:22 +00:00
ln Put some static keywords in the source code. 2011-10-31 08:59:17 +00:00
ls Add build opton MK_LS_COLORS to control whether ls(1) supports colors 2012-05-19 18:05:00 +00:00
mkdir Put some static keywords in the source code. 2011-10-31 08:59:17 +00:00
mv Put some static keywords in the source code. 2011-10-31 08:59:17 +00:00
pax Fix a bunch of typos and a couple of whitespace nits. 2011-05-22 14:03:38 +00:00
pkill Make sys_signame upper case. 2011-02-04 16:40:50 +00:00
ps Add 'cow' keyword to show per-process cow count. 2012-05-23 18:11:36 +00:00
pwait Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
pwd Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
rcp None of these programs actually use auth.conf. 2012-06-11 16:18:39 +00:00
realpath Make `realpath'' behave like `realpath .''. 2011-06-21 19:34:57 +00:00
rm Polish previous revision: if the fts_* routines have lstat()'ed the 2012-06-20 21:10:38 +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 Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
sh sh: Expand assignment-like words specially for export/readonly/local. 2012-07-15 10:19:43 +00:00
sleep Document the new argument parser for sleep(1) and SIGINFO behaviour. 2010-08-02 10:59:23 +00:00
stty mdoc: fix column names, indentation, column separation within each row, and 2012-04-07 09:05:30 +00:00
sync /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
test Minor mdoc nits. 2012-05-13 14:16:04 +00:00
uuidgen Mention the upper hard limit for -n option. Patch slightly modified 2012-05-23 16:19:19 +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