summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* unposted: remove dead codeOliver Kiddle2026-06-142-3/+2
|
* unposted: use _tilde_files in cdrecord completionOliver Kiddle2026-06-142-2/+4
|
* 54665: new utility function for mixing in extra valuesOliver Kiddle2026-06-1411-15/+118
|
* 54762: make curjob and prevjob work betterMikael Magnusson2026-06-143-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, these two sequences were still broken after 54294: % v() { vim "$@"; }; v [suspend vim] % urxvt & [3] 12707 % bg %- bg: job already in background % fg [1] continued [exit vim] % fg before: fg: no current job after: [3] + running urxvt % sleep 100 ^Z zsh: suspended sleep 100 % bg [1] continued sleep 100 % fg before fg: no current job after: [1] - running sleep 100 The changed test expected the sole remaining job to be %- which should not be possible, and now it is properly %+ instead.
* unposted: add some usage notes to zpty -d and -tMikael Magnusson2026-06-142-7/+14
|
* 54753: zpty: register pty fd as FDT_MODULE so it isn't closed when forkingMikael Magnusson2026-06-143-4/+5
| | | | This lets us remove these mysterious braces too.
* 54751: make the W02 test not take a full minute on linuxMikael Magnusson2026-06-142-12/+16
| | | | | | | Apparently on OSX (and BSD kernels?) the pty device won't wait for every last process closing its reference, but on Linux it does. We can just set up the sleep commands to close their fds since they aren't using them anyway.
* 54721: illegal -> invalid, invalid option -> bad optionMikael Magnusson2026-06-1423-50/+59
| | | | Combinations of options can remain invalid, though.
* 54715: compctl: print multibyte errors correctly (phew)Mikael Magnusson2026-06-142-67/+72
|
* 54714: add MB_NICECHAR and use itMikael Magnusson2026-06-145-18/+13
|
* 54713: fix multibyte error reporting in zparseoptsMikael Magnusson2026-06-142-3/+15
| | | | | | | | This one is complicated by the fact it's using fprintf. If the user passed a nonprintable char as an option, we shouldn't print that, which nicechar handles for us. Fixes 54077.
* 54712: handle the Pound token in error messageMikael Magnusson2026-06-142-1/+3
| | | | | | | | otherwise we print this: parse error in ${...\M-D...} substitution In practice, I'm not sure how to hit this path, I uncommented the condition to test it.
* 54711: print invalid option to getopts correctlyMikael Magnusson2026-06-142-3/+8
|
* 54710: handle multibyte arguments in error messagesMikael Magnusson2026-06-1414-59/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | A lot of places check option strings char by char, then send that char to zwarn/zerr, instead of reading out the full multibyte character. Doing so is quite easy with unmeta_one in most cases, so just go ahead and do that. The print functions in fact expect a wchar_t for %c anyway. Also renames "unknown option" to "bad option" because that's what every other place calls it (also one place was missing the colon, added that). To reproduce the math errors, since it's slightly less obvious (you need a multibyte character that is also an invalid parameter name, otherwise it actually works fine) % zsh -c '(( ¯ ))' zsh:1: bad math expression: illegal character: ^ % zsh -c 'zmodload zsh/mathfunc; (( sin(1¯) ))' zsh:1: bad math expression: illegal character: ^ % zsh -c 'の=5; echo $(( の ))' # unchanged because it is working 5 Also adds some tests because B12 was looking very empty, not sure if this is the correct way to handle the intersection of possibly not compiled module with possibly not available UTF-8 locale, but X02 and some others do a similar thing with ZSH_TEST_LANG, though in those cases that's handled specially by comptest, not the test itself.
* 54677: tests: improve readabilitydana2026-06-103-31/+89
|
* unposted: kill: fix -l argument error, add testsdana2026-06-103-0/+29
| | | | | | | fixes this issue: % kill -l 6term kill: unknown signal: SIGterm
* ChangeLog for preceding 3 commitsBart Schaefer2026-06-091-0/+11
|
* 54731: Adapt gdbm code to named referencesPhilippe Altherr2026-06-092-28/+58
|
* 54727: Implement references to positional parametersPhilippe Altherr2026-06-092-12/+150
|
* 54722: Fix nameref issues in builtin "unset"Philippe Altherr2026-06-093-24/+263
|
* 54695: regexp-replace and ^, word boundary or look-behind operators (and more).Stephane Chazelas2026-06-103-61/+74
|
* 54707: fix autoload +X nonexist leaving funcdef at dummyMikael Magnusson2026-06-102-4/+7
| | | | | | | | | | | % autoload +X nonexist zsh:999: nonexist: function definition file not found % nonexist exec.c:6086: function definition nonexist has zero reference count All the paths that set shf->funcdef in loadautofn call freeeprog on the old one first anyway, so rather than make a new mkautofn if loadautofn fails, just keep the old one.
* 54705: ksh93: fix use after free of .sh.edcharMikael Magnusson2026-06-102-2/+4
| | | | | | | | | | | | | | | | | | % bindkey T foo % zle -N foo % foo() { emulate -L ksh; () { zle -M ${.sh.edchar} } } % zmodload zsh/ksh93 % [press T twice] \M-(\M-^Ak\M-<\M-G^? or alternatively, emulate ksh in the main shell and just define this, but then you have to make sure you're in a zsh -f shell so random things aren't entering functions in the background. % foo() { zle -M ${.sh.edchar} } the code tries to restore sh_edchar = sh_unsetval; in the else branch, but this doesn't ever run in the above scenario because we never enter or leave a function with ksh emulation enabled (or indeed at all).
* 54704 + 54728: remove obsolete workaround in ksh93 moduleMikael Magnusson2026-06-102-10/+3
| | | | | After 54475 changed deleteparamdef to use getnode2 instead, this workaround isn't needed anymore.
* 54696: unset REPLY before e:: and oe:: so things don't break if it had ↵Mikael Magnusson2026-06-102-0/+5
| | | | | | acquired a weird type Reported in 43032.
* 54693: show ARGV0 and - precommand more clearly in xtrace outputMikael Magnusson2026-06-102-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported in 48901. Also has a secondary effect of correcting the string sent to the command_not_found_handler. If you don't have such a handler, then the errors are correct before the patch as well. command_not_found_handler() { echo -E >&2 command not found: $1 } Before: % ARGV0=foobar blurg zsh:1> ARGV0=foobar foobar command not found: foobar % - blurg +zsh:1> -blurg command not found: -blurg % ARGV0=foobar - blurg +zsh:1> ARGV0=foobar foobar command not found: foobar After: % ARGV0=foobar blurg +zsh:1> ARGV0=foobar blurg command not found: blurg % - blurg +zsh:1> - blurg command not found: blurg % ARGV0=foobar - blurg +zsh:1> ARGV0=foobar - blurg command not found: blurg
* 54692: untokenize string sent to matheval for (#) flagMikael Magnusson2026-06-102-0/+5
| | | | Fixes 49409.
* 54691: fix :W and :w duplicating inputMikael Magnusson2026-06-103-1/+12
| | | | Reported in 50991 and introduced in 22525.
* 54688: handle Stéphane correctlyMikael Magnusson2026-06-103-4/+33
| | | | | | | | | | | | | | | | | | | | In the original report we had [[ é = *$'\xa9' ]] which has op == P_STAR, in this case charstart is filled out inline, in the other cases it's done by the patrepeat function. If ptlen > P_LS_LEN(next) we have returned, if it is < then we have backtracked into the region where charstart is valid and we can check that, and finally if they are equal we know we are on a valid character boundary (but charstart might not be valid here, in fact multiple tests fail if you leave out the ptlen check). Separately, % [[ éé = é#$'\xa9' ]]; echo $? pattern.c:4113: closure following more than one character 0 % [[ éé = (é)#$'\xa9' ]]; echo $? 1 so just treat multibyte single characters as "not simple", which fixes that case too.
* 54687: fix brace completionMikael Magnusson2026-06-106-7/+15
| | | | | | | | | | | | | | | | | % mkdir 'a b c'; touch 'a b c'/{'a b c','d e f'} % ls a\ b\ c/{<tab> corrupts the command line into % ls a\ b\ {c/ and the effect is worse the more backslashes there are. It seems like this code should simply always use bp->qpos so there is no reason to keep hasunqu around either. For the compctl path, the curpos members need to be whatever they're determined to be at the start by addwhat for the comparison with ppl and psl, so just fix them at the end before add_match_data. The quotename in get_comp_string fixes subsequent completions, eg % ls a\ b\ c/{a\ b\ c,<tab>
* 54686: count lines in showmsg more correctlyMikael Magnusson2026-06-102-3/+6
| | | | | | | | | | If you do this, wide() { zle -M ${(l:$COLUMNS::a:)} }; zle -N wide; bindkey W wide then we would move the cursor up one row too many after printing the message. The hunks with 1 + are triggered by this (one is MULTIBYTE the other not), wide() { zle -M ${(l:$COLUMNS::a:)}$'\n'b }; zle -N wide; bindkey W wide
* 54683: fix for ctrl-r with combining characters or nonprintable wide charsMikael Magnusson2026-06-102-18/+78
| | | | | | | | | | | | | | | | | | | Typing one of these characters in isearch caused the terminal cursor to jump to the wrong row, and various other problems, because we totally lost track of things. Make use of addmultiword() to draw the combining characters, analogously to how the main input line does it. This resolves ccs/vcs getting out of sync with the display, because there are no top level glyphs of zero width anymore. The code seems to simply have forgotten about nonprintable wide characters that weren't ascii control characters, so handle those like in the main line redraw code. I didn't bother handling the ZSH_INVALID_WCHAR range because I don't see how you could possibly insert one of those in the isearch buffer. If you manage to do this, congratulations.
* 54674: ::= didn't respect parameter flagsMikael Magnusson2026-06-103-3/+31
| | | | | | | | | | | | | | | | | | | The documentation says ${name::=word} In the first form, if name is unset then set it to word; in the second form, if name is unset or null then set it to word; and in the third form, unconditionally set name to word. In all forms, the value of the parameter is then substituted. Particularly that "the value of the parameter is substituted", not "the word is substituted". This is what happens before the fix, and similarly for array flags like "unique": % typeset -E3 fl; hi=5; echo ${fl::=hi} hi % echo $fl 5.00e+00
* unposted: NEWS: document COLUMNS+LINES change from w/54676dana2026-06-082-0/+5
|
* 54676: preserve COLUMNS + LINES from the environmentdana2026-06-086-2/+52
|
* unposted: NEWS: fix 5.9 changes headerdana2026-06-082-2/+4
|
* 54659: comparguments: support zsh-style '-' terminator with -S -Sdana2026-06-0837-52/+98
|
* unposted: zgetopt: fix error name, behaviour after auto-loadingdana2026-06-083-7/+37
| | | | | | | | | | | | - fix error name to (1) handle no_function_argzero and (2) not print a redundant caller name when executed as a script - fix checks for function case that are wrong on the first call after marking for auto-load - add tests for the above - test usage-error return status
* ChangeLog for preceding commitBart Schaefer2026-06-081-0/+4
|
* 54718: Remove support for named references to subscripted variablesPhilippe Altherr2026-06-084-417/+335
|
* ChangeLog for preceding commitBart Schaefer2026-06-081-0/+4
|
* 54475: Don't perform dereferencing when looking up certain special parametersPhilippe Altherr2026-06-087-20/+21
| | | | Tweaked to account for workers/54328
* ChangeLog for preceding commitBart Schaefer2026-06-081-0/+3
|
* 54700: Refine string and array slice assignmentsPhilippe Altherr2026-06-082-117/+89
|
* ChangeLog for preceding 3 commitsBart Schaefer2026-06-081-0/+11
|
* 54294: Fix %- (prevjob) picking wrong job after resumingMikel Ward2026-06-083-18/+55
| | | | Also corrects exit status of "wait %%" (TBD from workers/43945)
* 54278: Detect invalid variable names in reference initializersPhilippe Altherr2026-06-082-17/+34
|
* 54277: reference loops are detected at create time, remove loop taggingPhilippe Altherr2026-06-081-9/+1
|
* unposted: fix NULL termination in ksh93Mikael Magnusson2026-06-082-0/+5
| | | | | | | | | | I'm not sure how I messed this up in 54558, but now it should be actually correct. I even tested it: % [[ foo = (#m)(#b)f(o)o ]] % zmodload -F zsh/ksh93 p:.sh.match % () { setopt localoptions ksharrays; typeset -p .sh.match } typeset -g -ar .sh.match=( foo o )
* unposted: add :S from 51816 to completionMikael Magnusson2026-06-072-0/+4
|