Date: Sun, 20 Jan 2019 19:50:35 -0800 From: Eduardo =?iso-8859-1?Q?A=2E_Bustamante_L=F3pez?= <dual...@gmail.com> Message-ID: <20190121035035.gc31...@system76-pc.vc.shawcable.net>
| Changing the behavior of `unset f' to only ever unset variables means | potentially breaking existing scripts. Is the inconsistency reported severe | enough to make this change? No, of course not, and no-one is suggesting that. Rather make the algorithm for "unset" when no flags are given be something like the following (written in sh rather than C, as that's what most people on this list should be able to follow easily) ... for name do if case "${name}" in ( [!A-Za-z_]* | *[!A-Za-z0-9_]*) false;; (*) true;; esac && eval test "''\${${name}+set}" = set then unset -v "${name}" else unset -f "${name}" fi done The actual implementation would most likely be nothing like that of course. kre