--- - branch: netbsd-8 date: Wed Oct 25 06:51:36 UTC 2017 files: - new: 1.110.2.3 old: 1.110.2.2 path: src/bin/sh/expand.c pathrev: src/bin/sh/expand.c@1.110.2.3 type: modified - new: 1.146.2.4 old: 1.146.2.3 path: src/bin/sh/sh.1 pathrev: src/bin/sh/sh.1@1.146.2.4 type: modified id: 20171025T065136Z.ec73b11ee363c5495462c0b93bf8337e450433e5 log: "Pull up following revision(s) (requested by kre in ticket #310):\n\tbin/sh/expand.c: revision 1.121\n\tbin/sh/sh.1: revision 1.167 via patch\nThree fixes and a change to ~ expansions\n1. A serious bug introduced 3 1/2 months ago (approx) (rev 1.116) which\n broke all but the simple cases of ~ expansions is fixed (amazingly,\n \ given the magnitude of this problem, no-one noticed!)\n2. An ancient bug (probably from when ~ expansion was first addedin 1994, and\n certainly is in NetBSD-6 vintage shells) where ${UnSeT:-~} (and similar)\n does not expand the ~ is fixed (note that ${UnSeT:-~/} does expand,\n this should give a clue to the cause of the problem.\n3. A fix/change to make the effects of ~ expansions on ${UnSeT:=whatever}\n \ identical to those in UnSeT=whatever In particular, with HOME=/foo\n ${UnSeT:=~:~} now assigns, and expands to, /foo:/foo rather than ~:~\n just as VAR=~:~ assigns /foo:/foo to VAR. Note this is even after the\n previous fix (ie: appending a '/' would not change the results here.)\n It is hard to call this one a bug fix for certain (though I believe it is)\n as many other shells also produce different results for the ${V:=...}\n expansions than they do for V=... (though not all the same as we did).\n POSIX is not clear about this, expanding ~ after : in VAR=whatever\n assignments is clear, whether ${U:=whatever} assignments should be\n treated the same way is not stated, one way or the other.\n4. Change to make ':' terminate the user name in a ~ expansion in all cases,\n not only in assignments. This makes sense, as ':' is one character that\n cannot occur in user names, no matter how otherwise weird they become.\n bash (incl in posix mode) ksh93 and bosh all act this way, whereas most\n other shells (and POSIX) do not. Because this is clearly an extension\n to POSIX, do this one only when not in posix mode (not set -o posix).\n" module: src subject: 'CVS commit: [netbsd-8] src/bin/sh' unixtime: '1508914296' user: snj