1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 06:20:55 +01:00
Commit graph

4236 commits

Author SHA1 Message Date
Robert Woods
97b4a30c4e 52053: whitelist capability CAP_WAKE_ALARM
Since the systemd update v254 from July 28, 2023, the capability
'CAP_WAKE_ALARM' is passed by default to some user process (especially
desktop managers). Since 'CAP_WAKE_ALARM' is very narrow in focus, it
is preferable that zsh does not consider it as a 'privileged'
capability.
2023-08-27 15:05:08 -07:00
Nojus Gudinavičius
094f230e36 users/29175: Don't need to forget zle edits if none 2023-08-22 14:29:44 +01:00
Peter Stephenson
aa8e4a0290 52008: Pattern bug with branches + exclusion
Add tests.
2023-08-01 14:32:55 +01:00
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.
2023-07-26 20:15:21 -07:00
Bart Schaefer
aa85564319 51969: read -d and -s should not reset terminal state when stdin is redirected 2023-07-26 19:54:30 -07:00
Bart Schaefer
fb5a6a871c 51950 (tweak per 51949): correct Thingy refcount in raw_getbyte() 2023-07-26 19:49:50 -07:00
Peter Stephenson
03695f4b58 51977: PIPEFAIL interaction with ERREXIT / ERRRETURN
Ensure the list-level error handling code is executed if we detect pipe failure for a foreground job.

Add tests.
2023-07-20 10:46:14 +01:00
Bart Schaefer
5ead24c881 51890: fix "whence -wa" for multiple arguments 2023-07-09 19:28:28 -07:00
Jun-ichi Takimoto
a84fdd7c8f 51889: fix module loading problem with full RELRO
If full RELRO (relocation read-only, one of the security enhancement
methods for ELF-based systems) is used when building zsh (as in binary
packages of most Linuxes), loading a module (e.g. zsh/zftp) fails unless
all the modules it depends on are already loaded. With this patch the
necessary modules are automatically loaded.
2023-06-26 17:13:04 +09:00
Jun-ichi Takimoto
1b9bc3441c 51884: reset IFS if it contains invalid characters
This happens only if MULTIBYTE option is on.
2023-06-26 16:52:40 +09:00
Bart Schaefer
4345eed1fe 51887: namespaces recognized in math, incorrect usages rejected. 2023-06-22 13:36:40 -07:00
Jun-ichi Takimoto
10bdbd8b5b 51877: do not build pcre module if pcre2-config is not found 2023-06-20 18:14:27 +09:00
Jun-ichi Takimoto
cd1a0a7097 51826: correctly read metafied null character from history file 2023-06-08 15:36:31 +09:00
Peter Stephenson
78102120b9 51816: add :S history modifier with pattern match 2023-06-06 09:16:46 +01:00
Peter Stephenson
88eeade0bc 51739: detect invalid history word beginning 2023-05-25 15:47:23 +01:00
Oliver Kiddle
f80ad32c3f 51769: fix compilation when HAVE_GETRUSAGE is not defined
Also silence compiler warning when HAVE_SETUPTERM is not defined.
2023-05-21 03:36:26 +02:00
Peter Stephenson
a95198e268 51722: Safety for extracting elements of $historywords 2023-05-13 21:49:07 +01:00
Oliver Kiddle
b4d1c756f5 51738: support pcre's alternative DFA matching algorithm 2023-05-13 00:59:00 +02:00
Oliver Kiddle
f3f371deb3 51728: assign pcre named capture groups to a hash 2023-05-13 00:56:48 +02:00
Oliver Kiddle
b62e911341 51723: migrate pcre module to pcre2 2023-05-13 00:53:32 +02:00
Bart Schaefer
8943b5e450 users/29070: clean up tokens in cmdstr before compctl completion 2023-05-11 12:37:52 -07:00
Bart Schaefer
858b8de3d7 51670: prevent possible underflow in gettext() 2023-04-22 14:40:23 -07:00
Peter Stephenson
8f5fe841a6 51652: fix running of TRAPEXIT explicitly.
This is a special case where TRAPEXIT is unset within a TRAPEXIT
as it should never run in a nested context, so just save the
function structure temporarily on the heap.
2023-04-17 09:30:34 +01:00
Jun-ichi Takimoto
e5f8cc99f5 51639: new parameter ZSH_EXEPATH (full path of zsh executable)
The full pathname is obatined by a reliable method on macOS and systems
that support procfs. But on other systems (FreeBSD, OpenBSD, ...) it is
guessed from argv[0], PWD and PATH.
2023-04-11 22:10:33 +09:00
Jun-ichi Takimoto
8a9aea907a 51631: initialize $_ by copying it from environment 2023-04-09 20:44:58 +09:00
Jun-ichi Takimoto
98b4d4bdca 51632: nmetafy $_ when exporting it to child 2023-04-09 20:33:32 +09:00
Jun-ichi Takimoto
b411dc5702 51597: fix 'vared -c var' when var is unset 2023-04-03 16:04:31 +09:00
Jun-ichi Takimoto
c006d76097 51604: %M in TIMEFMT should report in kilobytes 2023-03-30 14:58:07 +09:00
Peter Stephenson
12e5db145b 51608: Don't execute commands after "continue &&"
Also ! continue ||
2023-03-29 10:52:05 +01:00
Mikael Magnusson
6d40d9b63b 51602: Handle SIGIOT as an alias to SIGABRT if they are the same signal number 2023-03-28 13:00:10 +02:00
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.
2023-03-22 10:24:11 +00:00
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.
2023-03-14 20:51:15 -07:00
Bart Schaefer
25dceb1dea 51557: Clarify availability of ksh-mode parameters, improve vi-mode detection. 2023-03-11 13:20:21 -08:00
Bart Schaefer
8d009d35a9 51510: Skip namespaces in "set"/"typeset" output, add tests, fix bug 2023-03-06 20:01:04 -08:00
Bart Schaefer
0562be0af8 51509 (+ fix typo): Add ${(!)name} for the referred-to name of a named reference
Extend ${!name} in ksh emulation for same
2023-03-06 19:54:48 -08:00
Bart Schaefer
ac1bf482ba 51524: dependency on zsh/zle for linkage 2023-03-06 14:54:28 -08:00
Bart Schaefer
ea0bd72dd8 51485: module for several ksh93 features, mostly enabled only in ksh emulation. 2023-03-05 14:16:31 -08:00
Bart Schaefer
4bc1f6e0d2 51484: Extend named reference handling for special parameters, improve doc. 2023-03-05 14:06:25 -08:00
Bart Schaefer
a9ba166216 51483: Enable assignment and expansion of parameters with ksh-like namespace prefixes. 2023-03-05 14:03:42 -08:00
Bart Schaefer
806d096b0e unposted: fix memory leak flagged by coverity 2023-03-05 13:26:57 -08:00
Mikael Magnusson
86a5278f9f 51491: Check should use zlemetacs instead of zlecs
Coverity noticed that this first branch of the if statement has "meta"
added to all the variable names except this zlecs at the end, so change
it to match.
2023-02-28 14:56:06 +01:00
Bart Schaefer
ec4bd3169d 51460: avoid crash on bad parameter autofeature 2023-02-26 18:54:10 -08:00
Peter Stephenson
82f307bddf Fix access to autoloaded parameter.
Namerefef resolution needs to happen on the parameter after autoload.
2023-02-21 12:16:40 +00:00
Bart Schaefer
d2768f2f88 51431: "typeset -p" shouldn't change parameter flags 2023-02-20 10:32:40 -08:00
Oliver Kiddle
6f4aa1d949 51447: silence compiler maybe-uninitialized warning by combining a couple of variables 2023-02-17 23:38:14 +01:00
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.
2023-02-14 17:54:42 -08:00
Peter Stephenson
7e0c4406ce 51424: $(<...) shouldn't try to open a file with NO_EXEC 2023-02-14 09:21:32 +00:00
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
2023-02-13 18:20:11 -08:00
Bart Schaefer
f4c706f0c8 51417: Check subscripts in named reference values more rigorously. 2023-02-12 12:20:33 -08:00
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 $_
2023-02-12 11:51:41 -08:00