Bart Schaefer
7c875adb09
52742: fix bad interactions of "typeset -p" with GLOBAL_EXPORT
2 months ago
Bart Schaefer
330821de01
52692: local typeset of the name of a named reference hides the reference
2 months ago
Bart Schaefer
c0a392b392
unposted (cf. 52615): use META_NOALLOC for 52591
3 months ago
Bart Schaefer
0848b7534e
52659: Fix crash on unset-through-nameref, add regression test
3 months ago
Bart Schaefer
610b18875a
52650 plus minor fixes: add -u for named references pointing to "upper" scope
3 months ago
Bart Schaefer
13f73d84d3
52645: unset through a nameref keep up-scope parameters declared unset
...
Othewise unset of a reference to a global wipes out all parameters of
the same name.
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
Stephane Chazelas
4c0ebc155e
52591: printf builtin must pass metafied strings to math evaluation
3 months ago
Bart Schaefer
8c59638522
52556: fix crash when changing type of unset referent via named reference
3 months ago
Bart Schaefer
3406089647
52468: save and restore state of correct TTY when using read -s / -d
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
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
Bart Schaefer
aa85564319
51969: read -d and -s should not reset terminal state when stdin is redirected
10 months ago
Bart Schaefer
5ead24c881
51890: fix "whence -wa" for multiple arguments
10 months ago
Peter Stephenson
6763f45e77
58586: print "%s" with invalid multibyte character
...
Treat each byte that is invalid or part of an incopmlete set as a single byte.
1 year ago
Bart Schaefer
4b7a9fd0ec
51573: additional "typset -p -m" fix for namespaces
...
The "-m pattern" option is supposed to enable printing namespaces, but
that didn't work when combined with -p.
The -p option could also cause an unset parameter to become set if a
named reference pointed at it.
1 year ago
Bart Schaefer
8d009d35a9
51510: Skip namespaces in "set"/"typeset" output, add tests, fix bug
1 year ago
Bart Schaefer
d2768f2f88
51431: "typeset -p" shouldn't change parameter flags
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
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
511e020c68
51360: Initial implementation of named references.
1 year ago
Oliver Kiddle
667ead3a64
51258, 51272: refactor handling of terminal attributes, removing OFF flags in zattr
1 year ago
Oliver Kiddle
35a2f155c3
51214: handle read -d and a delimiter that can't be decoded into a character
...
Terminate input at the raw byte value of the delimiter.
Also document and test the use of an empty string as a way to specify
NUL as the delimiter.
1 year ago
Jun-ichi Takimoto
2701ab161d
51207: fix for read -d when the delimiter is a byte >= 0x80
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
Matthew Martin
d4955bc0f9
50359: fix bad sticky-emulation in "functions -c"
2 years ago
Bart Schaefer
d24ab95469
50351: "functions -c" can set signal traps
2 years ago
Bart Schaefer
e127ceaae8
50149: Remove all remaining =(...) files at shell exit
2 years ago
Bart Schaefer
d24d7242fe
50068: 'exit' in trap causes calling function to return
2 years ago
Oliver Kiddle
271cfc685b
49534, 49539: separate watch/log functionality out into a module
3 years ago
Jun-ichi Takimoto
2b81d4be32
unposted: add/remove UNUSED() for some function parameters
3 years ago
Bart Schaefer
5b4a1626c2
49069: literal interpretation of subscripts for unset of array/hash elements
3 years ago
Bart Schaefer
cf5c4828d1
48857: declare "volatile" all globals that may be modified by signal handlers
3 years ago
Peter Stephenson
db36149006
users/26742: break out of surrounding shell loops when exit is called from an exit hook
3 years ago
dana
c23a0d84b0
48614: getopts: Calculate OPTIND according to POSIX_BUILTINS
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
6bef719302
users/26509: fix for r -L
...
fc with the -L option should ignore remote entires, rather than
reading them and treating them as an error.
3 years ago
Martijn Dekker
9c0533931c
48073: Add fc -s as POSIX way of rerunning command without starting editor
3 years ago
Bart Schaefer
465738fc25
47895: Remove trailing spaces from "print -ac" output lines.
3 years ago
Jun-ichi Takimoto
b6ba74cd4e
47301: Fix print -v metafication
4 years ago
Matthew Martin
4e471c3f89
46168: Update $PWD and call chpwd hook after normalizing path
4 years ago
Mikael Magnusson
ed23768f77
typeset: Fix leaving corrupted entries in paramtab
4 years ago
Daniel Shahaf
4d2bcf2fe7
45729: internal: Add a second parameter to zlinklist2array(), analogously to hlinklist2array().
...
Will be used in the next commit.
4 years ago
Peter Stephenson
66ee4918a1
45660: Fix crash setting vi or emacs mode on command line.
...
Delay setting the option until the module system is set up.
4 years ago
Peter Stephenson
a6a1b28b98
45487: Missing mod_export declarations for AIX
4 years ago
Daniel Shahaf
faa476a4ed
45302: bin_umask(): Queue signals around umask().
...
Otherwise, a signal handler might create files while the temporary umask
is in effect.
4 years ago
Daniel Shahaf
ae7e291873
45066: internal: Document forklevel, locallevel, and exit_pending.
4 years ago
Daniel Shahaf
8bc4400762
45058: internal: Add symbolic names to possible values of zexit()'s "from_where" parameter. No functional change.
4 years ago
Daniel Shahaf
06c2a625b3
unposted: Update comment to reflect variable rename in 41012 (= zsh-5.3.1-182-gd7110d8f0).
4 years ago