Bart Schaefer
326e8635fe
52752: typeset -p fixes for local exports and "export -x" / "readonly -r" output.
2 months ago
Bart Schaefer
330821de01
52692: local typeset of the name of a named reference hides the reference
2 months ago
Bart Schaefer
d27ea2ae02
unposted (cf. 52617): only scalars can instantiate a declared named reference
3 months ago
Bart Schaefer
610b18875a
52650 plus minor fixes: add -u for named references pointing to "upper" scope
3 months ago
Bart Schaefer
d1ff06f991
52652: fix obscure bug unsetting the array part of a tied parameter pair
3 months ago
Bart Schaefer
85172998f4
52619 (plus tests): no empty element when appending array to unset scalar
3 months ago
Oliver Kiddle
5331ff11c6
52594: support for POSIX real-time signals with kill and trap
...
Also add new -L option to kill for a more verbose listing of signals
3 months ago
Bart Schaefer
4b9cd6b8bd
52583: extra check for proper scope and existence of readonly specials
3 months ago
Bart Schaefer
6b21e5c0e2
52559: revise "typeset -p" with respect to local readonly special parameters
...
Update doc and tests to describe handling of global readonly specials and
to account for side-effects on zsh/param/private.
3 months ago
Bart Schaefer
336249e7ea
unposted: referent of named reference cannot start with digits
...
This duplicates ksh behavior and doesn't change useful functionality.
3 months ago
Bart Schaefer
8801665e5b
52513: fixes and doc for using nofork substitutions with private parameters
...
Also fixes a crash bug with {fd}>&N redirections and private parameters
4 months ago
Bart Schaefer
98a6892cb1
52244: Fix a batch of minor defects reported by Coverity.
...
Coverity defects 1547831, 1547826 (remove unused function), 1521551,
1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789,
1255787, 1255782, 1255750
7 months ago
Bart Schaefer
0f0ba0539e
52195: cached_username is already metafied when initializing LOGNAME
8 months ago
Bart Schaefer
29644f12e7
52193: handle UTF8-encoded USERNAME and therefore home directory in zcompile
...
Includes one unposted thinko fix ztrdup -> dupstring
8 months ago
Bart Schaefer
baa19d2a85
51945: assorted documentation improvements, bug fixes, and new test
...
1) Document the behavior of "typeset -n existing_var" (via Jun T. comment)
2) Prohibit "typeset -nm pattern" because, well, it's insane. Add test.
3) Improve doc for ${(!)ref} including ${{t!)ref} (Jun T.)
4) Fix doc for how-to unset of a named ref (Jun T.)
5) Allow "typeset +r -n ref" and "typeset +r +n ref" (Jun T.)
6) Fix "typeset -r -n ref=param" to create readonly references
7) Avoid accidental removal of PM_UNSET flag (Jun T.) and update test
8) Fix "typeset -gn ref=value" and add a test for it
9) Add tests for read-only reference behavior
10) Fix infinite recursion when resolving scope of an unset local
named reference, add test.
10 months ago
Jun-ichi Takimoto
1b9bc3441c
51884: reset IFS if it contains invalid characters
...
This happens only if MULTIBYTE option is on.
11 months ago
Bart Schaefer
4345eed1fe
51887: namespaces recognized in math, incorrect usages rejected.
11 months ago
Bart Schaefer
8d009d35a9
51510: Skip namespaces in "set"/"typeset" output, add tests, fix bug
1 year ago
Bart Schaefer
0562be0af8
51509 (+ fix typo): Add ${(!)name} for the referred-to name of a named reference
...
Extend ${!name} in ksh emulation for same
1 year ago
Bart Schaefer
4bc1f6e0d2
51484: Extend named reference handling for special parameters, improve doc.
1 year ago
Bart Schaefer
a9ba166216
51483: Enable assignment and expansion of parameters with ksh-like namespace prefixes.
1 year ago
Peter Stephenson
82f307bddf
Fix access to autoloaded parameter.
...
Namerefef resolution needs to happen on the parameter after autoload.
1 year ago
Bart Schaefer
32cceefa95
51437: Fix incorrectly-passed test case, masked by unrelated bug.
...
A bug with zmodload when unloading/reloading a static module caused the
state of the shell options to change during K01 test. Worked around it.
Also changed warnnestedvar messages to look more like other such.
1 year ago
Bart Schaefer
03887bb03f
51430: Misc. problems with typeset and $parameters
...
* Fix and test for regression of assignment when using typeset command
* Fix output of typeset +m and $parameters[ref]
* Prevent segfault in typeset
1 year ago
Bart Schaefer
f4c706f0c8
51417: Check subscripts in named reference values more rigorously.
1 year ago
Bart Schaefer
3eed6f70cd
51402: Some ksh/bash features, additional sanity checking
...
* Add "unset -n"
* Allow and enforce "typeset -n -r" for read-only references
* "can't change type via subscript reference" error
* Better checking for self-referential declarations/assignments
* Ksh-style "foo=bar; typeset -n foo" creates foo=bar reference
* Support "typeset -n ref; for ref in ..."
* Subscripted references use NO_EXEC for safety
* References assigned in called scopes reset scope at end
* Allow named references to $! $? $$ $- $0 $_
1 year ago
Bart Schaefer
3e55a135c1
51374: Expose named references in $parameters, fix substitution error.
1 year ago
Bart Schaefer
511e020c68
51360: Initial implementation of named references.
1 year ago
Peter Stephenson
03292bceec
51278: make (i) subscript flag for zero-length string consistent
1 year ago
Oliver Kiddle
a73c705b0c
51212: remove STOUC() macro
...
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
1 year ago
Jun-ichi Takimoto
1be52186b4
51079: metafy sep in array subscript flag (s:sep:)
...
this enable sep to contain \0 etc.
1 year ago
Jun-ichi Takimoto
09ad15b986
50081: reset global mbstate_t variables when LC_CTYPE changes
2 years ago
Oliver Kiddle
926a1a7296
49602: only set LOGCHECK from the watch module
3 years ago
Oliver Kiddle
271cfc685b
49534, 49539: separate watch/log functionality out into a module
3 years ago
Bart Schaefer
fa4c88ca25
49456: clean up detection of private params in nested scopes, update doc
3 years ago
Jun-ichi Takimoto
dd51ffa5b4
49422: improve support of --disable-dynamic-nss
...
see also 49392 (Vincent) and 49412 (Axel)
3 years ago
Bart Schaefer
cf5c4828d1
48857: declare "volatile" all globals that may be modified by signal handlers
3 years ago
Bart Schaefer
71b747567e
47704: POSIX export and readonly ignore "-p" when parameter names also appear
3 years ago
Bart Schaefer
82ff9f24f1
48560: add TYPESET_TO_UNSET option to remove initialization of parameters
...
Changes typeset such that ${newparam-notset} yields "notset" and
"typeset -p newparam" does not show an assignment to the parameter. This
is similar to the default behavior of bash and ksh, with minor differences
in typeset output.
Also add tests for some POSIX incompatibilities plus minor changes for test
harness robustness.
3 years ago
Peter Stephenson
c486040220
45772: Restore locale on parameter scope end.
...
Check if relevant parameters changes and if so restore system settings.
4 years ago
Daniel Shahaf
5e843a3721
45340: internal: Document the difference between paramtab and realparamtab.
4 years ago
Daniel Shahaf
ae7e291873
45066: internal: Document forklevel, locallevel, and exit_pending.
4 years ago
Martijn Dekker
c578f0a08b
45004: Fix typos in comments
5 years ago
Peter Stephenson
d946f22a4c
44664: Fix problem with temporary assignment.
...
"foo=bar builtin" inside a function lost any variable from
enclosing scope.
5 years ago
Peter Stephenson
8cbbc04d97
44509: Prevent crash with modified path / PATH combination.
...
Crash came from "fn() { typeset -U path=($path); unset PATH; }".
Note PATH unset is global as only path was made local.
5 years ago
Oliver Kiddle
3de2333b08
44307: allow for atoi() returning a negative number
5 years ago
Wesley Schwengle
51d2e91a7e
44164: Avoid stringop-truncation warning
5 years ago
Peter Stephenson
f99f7dca75
43616: Various parameter setting and display fixes.
...
Mostly to do with typeset -p and tied variables and their interaction.
Some general tied variable fixes.
6 years ago
Stephane Chazelas
a75b47973d
43546: "typeset -p" should show -U flag
6 years ago
Peter Stephenson
f58b35bf88
43264: fix ${+assoc[nonexistent]} with KSH_ARRAYS
6 years ago