Oliver Kiddle
c4d557bb0a
50934: use OSC 52 escape sequence when copying to "* or "+ vi buffers
2022-11-17 20:05:12 +01:00
Bart Schaefer
8839e969bf
50929: fix handling of ERR_RETURN bent by 50928.
2022-11-09 21:48:46 -08:00
Bart Schaefer
1ba8714a7a
50928: fix tests for 50897, mention behavior change in NEWS
2022-11-09 21:37:56 -08:00
Bart Schaefer
61610ea4bd
50922: fix additional cases of signals for current shell jobs on the right of a pipeline.
...
Backs out part of 188c5cd5
(workers/50874). With this change, after a
new subshell is forked upon suspend of the right side of a pipeline, the
previous foreground subjob is resumed first and the new subshell remains
stopped until that job finishes.
2022-11-09 20:24:57 -08:00
Bart Schaefer
d873ed6026
50897: nonzero status of complex commands should trigger ERR_EXIT
2022-11-08 20:36:49 -08:00
Peter Stephenson
298919f43a
users/28338: command substitution with alias edge case.
...
See added regression test.
2022-11-08 14:12:01 +00:00
Bart Schaefer
188c5cd518
50874: fix handling of tty signals for jobs in the current shell when waiting for the right side of a pipeline.
...
Reverts 15bf8ace
(workers/50134). Thanks to Jun T. for debugging assistance.
Issues came down to two things:
1. update_job() may be called on a process group leader even when a
signal was NOT sent to any process in that process group. This
caused jobs to be resumed or backgrounded incorrectly or in the
wrong order.
2. When there is a current-shell complex command (in braces) on the
right side of a pipeline, external processes within it have their
own process groups, but a tty signal sent to such a process should
be treated as if received by the whole complex command.
This fixes:
* Suspend/resume of a foreground pipeline within a shell function
* Interrupt or suspend/resume of processes in a pipeline ending in { ... }
* Interrupt of such a pipeline after exit of the last process in { ... }
These affected interactive shells only (MONITOR set plus tty signals).
2022-11-06 11:25:47 -08:00
Jun-ichi Takimoto
f8d93888a8
50851: restore typtab when necessary
...
inittyptab() must be called when returning from a function with
"setopt localoptions MULTIBYTE|BANGHIST|SHSTDIN", and also in
function dosetopt() when setting these options (via $options, for
example). We intentionally did not take account of the options
EMACS/VI because these options are obsolete and their use is
not recommended.
2022-11-02 16:27:27 +09:00
Bart Schaefer
5b1c204c54
Unposted: Fix typo in comment
2022-10-23 16:28:14 -07:00
Wesley Schwengle
727b493e2b
50736: silence use-after-free warning (gcc-12.2)
2022-10-17 13:13:13 +09:00
Jun-ichi Takimoto
33938ad489
50668: treat 8bit chars correctly when multibyte is unset
...
The problem was found in character range, but may have existed in other
occasions
2022-09-27 15:20:24 +09:00
Jun-ichi Takimoto
1b421e4978
50658 + test: Enable to switch between C/UTF-8 locales in PCRE
2022-09-26 10:52:50 +09:00
Jun-ichi Takimoto
ac6257f150
50418: use setenv(3)/getenv(3) on newer macOS
2022-07-24 20:41:20 +09:00
Bart Schaefer
cb59dfb3a6
50379/50380: fix off-by-one side-effect of workers/49906 that broke $(jobs -l)
2022-06-21 18:04:45 -07:00
Bart Schaefer
f7441b4645
50368: adjust ztie'd bitflags so local variables cannot mess with database
2022-06-21 17:58:57 -07:00
Bart Schaefer
61f35bb626
50355: documentation and return status consistency in zsh/system module
2022-06-11 15:02:46 -07:00
Bart Schaefer
285b6c2538
50363: avoid use of heap memory that depends on parameter scoping
2022-06-09 15:10:43 -07:00
Matthew Martin
d4955bc0f9
50359: fix bad sticky-emulation in "functions -c"
2022-06-09 13:37:51 -07:00
Bart Schaefer
d24ab95469
50351: "functions -c" can set signal traps
2022-06-09 13:30:55 -07:00
Jun-ichi Takimoto
c36068357b
50342: fix test added by 50306
2022-06-09 15:08:39 +09:00
Bart Schaefer
734740a5ed
50341: disallow here-document markers containing newline
2022-06-08 20:48:42 -07:00
Peter Stephenson
b26b6b3fe0
Tweaks to MULTI_FUNC_DEF
...
Output multiple function definitions using "function" form.
Note exceptions to errors with NO_MULTI_FUNC_DEF
2022-06-07 10:02:14 +01:00
Bart Schaefer
3e3cfabcc7
50325: revert 38150 and fix in calling function cfp_matcher_range() instead
2022-06-03 20:08:15 -07:00
Jun-ichi Takimoto
22b1a91c2a
50306: fix wait for child that was stopped/continued
...
do not call addbgstatus() when child is stopped/continued
2022-06-03 19:32:56 +09:00
Jun-ichi Takimoto
c190883a0a
50192: use set{u,g}id() for dropping privilege on NetBSD
2022-05-11 11:22:46 +09:00
Bart Schaefer
276020522e
50150: Filenames need unmetafy for printing
2022-04-30 11:24:21 -07:00
Bart Schaefer
e127ceaae8
50149: Remove all remaining =(...) files at shell exit
2022-04-30 11:21:03 -07:00
Bart Schaefer
8181708feb
50136: Fix =(nosuchcommand) race/deadlock first reported in workers/42609
2022-04-29 20:37:09 -07:00
Bart Schaefer
15bf8ace16
50134: Tweak process group handling to prevent unkillable pipelines
...
In some cases the process group leader of the forked-left side of a
pipe needs to be set to the pipe process PID rather than to the group
leader PID returned by entersubsh().
2022-04-29 20:25:53 -07:00
Bart Schaefer
df0c783f4b
50133: use read-ahead and lseek-rewind for efficient line-buffered input
2022-04-28 21:06:51 -07:00
Bart Schaefer
007c7df74a
50101: sysread -o with param adjusted to match documentation
2022-04-28 17:08:10 -07:00
Bart Schaefer
0ccc3c1494
50162: Fix multios with current-shell "exec" (aka nullexec).
2022-04-28 17:03:31 -07:00
Peter Stephenson
c5a891a29d
50049: care with signed characters
...
Some signed-to-unsigned casts needed for a couple of cases of pointers
used as indices.
2022-04-25 17:51:59 +01:00
Jun-ichi Takimoto
09ad15b986
50081: reset global mbstate_t variables when LC_CTYPE changes
2022-04-20 21:06:53 +09:00
Jun-ichi Takimoto
baa12a413f
50080: add missing STOUC() in casemodify()
2022-04-20 21:01:08 +09:00
Bart Schaefer
d24d7242fe
50068: 'exit' in trap causes calling function to return
2022-04-14 16:31:50 -07:00
Mikael Magnusson
1039b09c0c
50042: Another fix for 49915
...
If the last element in the list is a duplicate, we would walk off the end
2022-04-11 23:31:11 +02:00
Bart Schaefer
ebad5f8164
49994: Single-byte equivalence of users/22601 and workers/40891
2022-04-05 09:10:45 -07:00
Peter Stephenson
02747bbbd3
49989: Single byte versions of nice quoting.
...
Align interfaces for "nice" printing of characters with those for
multibyte to make more available in single-byte compilation.
2022-04-05 09:40:07 +01:00
Bart Schaefer
0d9c2422bf
49992: further unify single- and multi-byte implementations of nicechar()
2022-04-04 14:48:21 -07:00
Bart Schaefer
b80d160039
49991: single-byte brace expansion handles $'\0' and control character output aligns with multibyte
2022-04-04 14:21:50 -07:00
Bart Schaefer
bdd37b4c14
49990: casemodify() avoids metafying characters that it otherwise did not touch
2022-04-04 13:20:45 -07:00
Bart Schaefer
f27e48827c
unposted: Fix typo from 49955
2022-04-04 10:19:57 -07:00
Bart Schaefer
c77cdb27db
49955: Src/glob.c: fix bad free in incremental-pattern-search matching
2022-04-04 09:14:59 -07:00
Mikael Magnusson
9eda397354
49957: Brown paper bag for 49915
...
The code would crash when n == 0. There's not really any point doing any
of this when n is 0 so just skip everything. It also tried to NULL
terminate a list a little to eagerly.
2022-04-03 11:28:14 +02:00
Matthew Martin
95749e9e65
49933: Add nonblock to sysopen
2022-03-31 17:40:41 -05:00
Mikael Magnusson
774c634d2e
49926: remove unused variable from 49915
2022-03-30 20:34:37 +02:00
Peter Stephenson
98e4634086
49906 (Bart), 49911: Fixes to querying jobs in subshell.
...
Don't attempt to query invalid job off end of table, resulting in
crashes from $jobtstates.
If background task started in subshell, look at tatsks within subshell
instead of main shell. Document and add test.
2022-03-30 09:28:43 +01:00
Mikael Magnusson
054ccf7666
49820: Fix a crash when completing with combination of -Q and braces
...
minimal reproducer .zshrc:
zstyle ':completion:*' completer _oldlist _complete
setopt nolistambiguous
autoload compinit; compinit
compdef _foo foo;_foo() { compadd -Q -- stash@{{0,1}} }
2022-03-30 08:08:09 +02:00
Mikael Magnusson
d7b8619396
49813: <<<: Document newline behavior and fix optimization
...
The =(<<<foo) optimization forgot to add a newline, but =(cat<<<foo)
always did, make the behavior consistent, and document it.
2022-03-30 08:07:39 +02:00