NetBSD/bin/sh
kre 36d40de856 For now, probably forever, prohibit unquoted $ and ` in the names of
functions being defined (they can still be included if quoted).

If we parsed the way POSIX specifies (leaving the exact input text of
$ and ` expansions unaltered, until required to be expanded) this would
not be needed, as the name of a function being defined does not underbo
parameter, command, or arith expansions, so xxx$3() { : ; } would just
work.   But for many reasons we don't do that (and are unlikely to ever,
though maintaing both forms might be an option someday) - which led to
very obscure behaviour (if sh were compiled in DEBUG mode, even an abort())
and certainly nothing useful.   So just prohibit these uses for now.
(A portable function name must be a "name" so this makes no difference
at all to posix compat applications/scripts).

A doc update is pending (the updated sh.1 also contains updates in other
areas not yet appropriate to commit).
2020-08-19 22:41:47 +00:00
..
bltin
funcs
USD.doc
alias.c
alias.h
arith_token.c
arith_tokens.h
arithmetic.c
arithmetic.h
builtins.def
cd.c
cd.h
error.c
error.h
eval.c Remove extra semicolon. 2020-05-14 08:34:17 +00:00
eval.h
exec.c PR bin/55526 2020-08-01 17:51:18 +00:00
exec.h
expand.c Remove a redundant set of parentheses that were added (along with a 2020-08-01 17:56:56 +00:00
expand.h When expanding a here-doc (NXHERE - the type with an unquoted end delim) 2020-02-13 05:19:05 +00:00
histedit.c
init.h
input.c
input.h
jobs.c Avoid a core dump if a child process that is not one of our 2020-02-07 02:06:12 +00:00
jobs.h
machdep.h
mail.c
mail.h
main.c bin/sh: Fixes -Werror=shadow causing build breaks. 2020-02-07 01:25:08 +00:00
main.h
Makefile
memalloc.c
memalloc.h
miscbltin.c
miscbltin.h
mkbuiltins
mkinit.sh
mknodenames.sh
mknodes.sh
mkoptions.sh
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat
nodetypes
option.list
options.c Oops, the previous didn't do what was promised. Rather that ignoring 2020-02-05 14:56:25 +00:00
options.h
output.c
output.h
parser.c For now, probably forever, prohibit unquoted $ and ` in the names of 2020-08-19 22:41:47 +00:00
parser.h
redir.c
redir.h Don't define max_user_fd in the header. 2020-04-03 16:22:23 +00:00
sh.1 Typo: s/./,/ 2020-02-20 18:24:20 +00:00
shell.h
show.c
show.h
syntax.c
syntax.h
TOUR
trap.c PR bin/54743 2019-12-09 00:14:30 +00:00
trap.h
var.c
var.h
version.h