summaryrefslogtreecommitdiff
path: root/Src/params.c
AgeCommit message (Collapse)AuthorFilesLines
2024-12-2653257: use monotonic clock where appropriatedana1-20/+18
update the following features to use the monotonic clock for calculating time deltas and intervals: * MAILCHECK parameter * PERIOD parameter * SECONDS parameter * %(nS.t.f) prompt-expansion sequence * time built-in's elapsed time and cpu % values * zsh/zftp ZFTP_TMOUT parameter * zsh/zprof timings also use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC on macOS
2024-11-0553209 + tests: do not unmetafy via string pointers into global parameter tableBart Schaefer1-1/+2
2024-08-0653026: fix failure to free old value when setting new value of referenceJun. T1-1/+2
2024-08-0553025: fix memory leaks and pointer errors upon named reference self-referenceBart Schaefer1-5/+7
2024-08-0553023: fix memory leak of unset private parameterBart Schaefer1-1/+1
2024-03-1452752: typeset -p fixes for local exports and "export -x" / "readonly -r" ↵Bart Schaefer1-3/+18
output.
2024-03-0552692: local typeset of the name of a named reference hides the referenceBart Schaefer1-1/+2
2024-03-04unposted (cf. 52617): only scalars can instantiate a declared named referenceBart Schaefer1-2/+8
2024-03-0452650 plus minor fixes: add -u for named references pointing to "upper" scopeBart Schaefer1-12/+20
2024-03-0252652: fix obscure bug unsetting the array part of a tied parameter pairBart Schaefer1-2/+5
2024-02-2852619 (plus tests): no empty element when appending array to unset scalarBart Schaefer1-1/+1
2024-02-2852594: support for POSIX real-time signals with kill and trapOliver Kiddle1-2/+12
Also add new -L option to kill for a more verbose listing of signals
2024-02-2352583: extra check for proper scope and existence of readonly specialsBart Schaefer1-2/+23
2024-02-2052559: revise "typeset -p" with respect to local readonly special parametersBart Schaefer1-2/+22
Update doc and tests to describe handling of global readonly specials and to account for side-effects on zsh/param/private.
2024-02-18unposted: referent of named reference cannot start with digitsBart Schaefer1-0/+2
This duplicates ksh behavior and doesn't change useful functionality.
2024-02-0352513: fixes and doc for using nofork substitutions with private parametersBart Schaefer1-4/+13
Also fixes a crash bug with {fd}>&N redirections and private parameters
2023-10-2652244: Fix a batch of minor defects reported by Coverity.Bart Schaefer1-3/+2
Coverity defects 1547831, 1547826 (remove unused function), 1521551, 1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789, 1255787, 1255782, 1255750
2023-10-0152195: cached_username is already metafied when initializing LOGNAMEBart Schaefer1-4/+3
2023-10-0152193: handle UTF8-encoded USERNAME and therefore home directory in zcompileBart Schaefer1-1/+1
Includes one unposted thinko fix ztrdup -> dupstring
2023-07-2651945: assorted documentation improvements, bug fixes, and new testBart Schaefer1-4/+10
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.
2023-06-2651884: reset IFS if it contains invalid charactersJun-ichi Takimoto1-0/+3
This happens only if MULTIBYTE option is on.
2023-06-2251887: namespaces recognized in math, incorrect usages rejected.Bart Schaefer1-1/+26
2023-03-0651510: Skip namespaces in "set"/"typeset" output, add tests, fix bugBart Schaefer1-0/+4
2023-03-0651509 (+ fix typo): Add ${(!)name} for the referred-to name of a named referenceBart Schaefer1-2/+5
Extend ${!name} in ksh emulation for same
2023-03-0551484: Extend named reference handling for special parameters, improve doc.Bart Schaefer1-44/+64
2023-03-0551483: Enable assignment and expansion of parameters with ksh-like namespace ↵Bart Schaefer1-5/+6
prefixes.
2023-02-21Fix access to autoloaded parameter.Peter Stephenson1-1/+1
Namerefef resolution needs to happen on the parameter after autoload.
2023-02-1451437: Fix incorrectly-passed test case, masked by unrelated bug.Bart Schaefer1-2/+3
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.
2023-02-1351430: Misc. problems with typeset and $parametersBart Schaefer1-1/+1
* Fix and test for regression of assignment when using typeset command * Fix output of typeset +m and $parameters[ref] * Prevent segfault in typeset
2023-02-1251417: Check subscripts in named reference values more rigorously.Bart Schaefer1-1/+10
2023-02-1251402: Some ksh/bash features, additional sanity checkingBart Schaefer1-12/+80
* 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 $_
2023-02-1251374: Expose named references in $parameters, fix substitution error.Bart Schaefer1-2/+8
2023-02-1251360: Initial implementation of named references.Bart Schaefer1-5/+185
2023-01-1651278: make (i) subscript flag for zero-length string consistentPeter Stephenson1-1/+1
2022-12-1651212: remove STOUC() macroOliver Kiddle1-12/+13
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-12-0251079: metafy sep in array subscript flag (s:sep:)Jun-ichi Takimoto1-3/+7
this enable sep to contain \0 etc.
2022-04-2050081: reset global mbstate_t variables when LC_CTYPE changesJun-ichi Takimoto1-1/+19
2021-11-2849602: only set LOGCHECK from the watch moduleOliver Kiddle1-2/+1
2021-11-0249534, 49539: separate watch/log functionality out into a moduleOliver Kiddle1-10/+6
2021-10-0449456: clean up detection of private params in nested scopes, update docBart Schaefer1-0/+5
2021-09-2249422: improve support of --disable-dynamic-nssJun-ichi Takimoto1-5/+8
see also 49392 (Vincent) and 49412 (Axel)
2021-05-1648857: declare "volatile" all globals that may be modified by signal handlersBart Schaefer1-2/+4
2021-04-1847704: POSIX export and readonly ignore "-p" when parameter names also appearBart Schaefer1-0/+4
2021-04-1848560: add TYPESET_TO_UNSET option to remove initialization of parametersBart Schaefer1-3/+19
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.
2020-05-0545772: Restore locale on parameter scope end.Peter Stephenson1-0/+34
Check if relevant parameters changes and if so restore system settings.
2020-01-2345340: internal: Document the difference between paramtab and realparamtab.Daniel Shahaf1-1/+7
2019-12-1845066: internal: Document forklevel, locallevel, and exit_pending.Daniel Shahaf1-1/+5
2019-12-1145004: Fix typos in commentsMartijn Dekker1-1/+1
2019-08-1444664: Fix problem with temporary assignment.Peter Stephenson1-1/+3
"foo=bar builtin" inside a function lost any variable from enclosing scope.
2019-07-1544509: Prevent crash with modified path / PATH combination.Peter Stephenson1-4/+12
Crash came from "fn() { typeset -U path=($path); unset PATH; }". Note PATH unset is global as only path was made local.