NetBSD/bin
kre 5f92382c9a Add support for $'...' quoting (based upon C "..." strings, with \ expansions.)
Implementation largely obtained from FreeBSD, with adaptations to meet the
needs and style of this sh, some updates to agree with the current POSIX spec,
and a few other minor changes.

The POSIX spec for this ( http://austingroupbugs.net/view.php?id=249 )
[see note 2809 for the current proposed text] is yet to be approved,
so might change.  It currently leaves several aspects as unspecified,
this implementation handles those as:

Where more than 2 hex digits follow \x this implementation processes the
first two as hex, the following characters are processed as if the \x
sequence was not present.  The value obtained from a \nnn octal sequence
is truncated to the low 8 bits (if a bigger value is written, eg: \456.)
Invalid escape sequences are errors.  Invalid \u (or \U) code points are
errors if known to be invalid, otherwise can generate a '?' character.
Where any escape sequence generates nul ('\0') that char, and the rest of
the $'...' string is discarded, but anything remaining in the word is
processed, ie: aaa$'bbb\0ccc'ddd produces the same as aaa'bbb'ddd.

Differences from FreeBSD:
  FreeBSD allows only exactly 4 or 8 hex digits for \u and \U (as does C,
  but the current sh proposal differs.) reeBSD also continues consuming
  as many hex digits as exist after \x (permitted by the spec, but insane),
  and reject \u0000 as invalid).  Some of this is possibly because that
  their implementation is based upon an earlier proposal, perhaps note 590 -
  though that has been updated several times.

Differences from the current POSIX proposal:
  We currently always generate UTF-8 for the \u & \U escapes.   We should
  generate the equivalent character from the current locale's character set
  (and UTF8 only if that is what the current locale uses.)
  If anyone would like to correct that, go ahead.

  We (and FreeBSD) generate (X & 0x1F) for \cX escapes where we should generate
  the appropriate control character (SOH for \cA for example) with whatever
  value that has in the current character set.   Apart from EBCDIC, which
  we do not support, I've never seen a case where they differ, so ...
2017-08-21 13:20:49 +00:00
..
cat Use Ex. 2017-07-04 06:46:51 +00:00
chio Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
chmod Use Ex. 2017-07-04 06:46:51 +00:00
cp Document the version cp first appeared. 2016-08-11 00:17:23 +00:00
csh Add a variant that passes the format, so that time(1) can use it. 2017-07-15 14:35:55 +00:00
date Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
dd Use Ex. 2017-07-04 06:46:51 +00:00
df Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
domainname
echo Use Ex. 2017-07-04 06:46:51 +00:00
ed Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
expr Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
hostname Remove options added in 1.18, commitid: UhxHPgtT2Pzeg4Yw due to some 2014-02-13 12:00:29 +00:00
kill Make arg parsing in kill POSIX compatible with POSIX (XBD 2.12) by 2017-06-26 22:09:16 +00:00
ksh Kill enough K&R cruft to build with clang again. 2017-07-01 23:12:08 +00:00
ln When called as "link" (not currently installed that way) always simply 2017-04-22 12:22:31 +00:00
ls Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
mkdir Use Ex. Remove superfluous Pp. 2017-07-04 06:49:35 +00:00
mt
mv Use Ex. 2017-07-04 06:50:04 +00:00
pax Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
ps Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
pwd Use Ex. 2017-07-04 06:50:04 +00:00
rcmd Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
rcp allocate a separate buffer in each call to sink(). 2012-05-07 15:22:54 +00:00
rm Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
rmdir PR/48182: Fix rmdir -p handling of top-level (root) directory. 2017-08-10 22:52:13 +00:00
sh Add support for $'...' quoting (based upon C "..." strings, with \ expansions.) 2017-08-21 13:20:49 +00:00
sleep Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
stty need <time.h> for time(3) 2017-01-10 20:44:05 +00:00
sync Drop main() prototype. 2016-09-05 01:00:07 +00:00
test Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
Makefile
Makefile.inc Default to WARNS=5 2012-03-21 05:47:53 +00:00