1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 17:20:25 +02:00
Commit graph

4113 commits

Author SHA1 Message Date
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
Mikael Magnusson
3bf95b91f0 49870: Fix NULL reference in match code more
This reverts "49658: Fix NULL reference in match code." and adds a check
inside the block, as well as a failsafe check at the end.

The above commit (49658) causes a crash due to ll being calculated as
0 which leads to rr being an invalid pointer. Only adding a check for
when ll is 0 just leads to bck-i-search pattern not working at all (the
final hunk).  Restoring the condition and adding an explicit NULL check
for replstr seems to make matters work as intended.
2022-03-30 08:07:39 +02:00
Mikael Magnusson
6a9b3bb290 49915: Efficient dedup for unsorted completions 2022-03-30 08:07:39 +02:00
Mikael Magnusson
48be30e530 49893: Fix comments for UNIQCON/ALL 2022-03-30 08:07:39 +02:00
Jun-ichi Takimoto
8154ddc62d 49853 + 49882/49883: make "${arr[*]:off}" compatible with ksh/bash 2022-03-29 11:09:36 +09:00
Peter Stephenson
1e814ba48b 49890: Avoid scanning unallocated memory in saved command line. 2022-03-28 15:27:51 +01:00
Peter Stephenson
1640457f47 49792: Non-interative shell input is line buffered. 2022-03-03 19:19:35 +00:00
Peter Stephenson
6a8aa2aa5a 49783: Consistently use old job table in parameter module 2022-03-01 17:27:42 +00:00
Daniel Shahaf
45182eb4d4 unposted: Fix some typos and markup. 2022-02-22 13:11:02 +00:00
Oliver Kiddle
c3ea1e5d52 security/41: Don't perform PROMPT_SUBST evaluation on %F/%K arguments
Mitigates CVE-2021-45444

(cherry picked from commit c187154f47)
2022-02-12 10:29:55 -06:00
Mikael Magnusson
8bf0f0cf45 49694 + doc: Allow using empty STTY= to freeze tty for a single command
Previously, doing this would just run stty with no arguments, which
normally causes it to print some terminal settings to stdout.
2022-01-30 18:14:54 +01:00
m0viefreak
d82604843b 38150: fix off-by-one error in matcher spec parsing 2021-12-24 13:09:25 -08:00
Peter Stephenson
7f240e6aa9 49658: Fix NULL reference in match code.
A test when acquiring the replacement pattern match in the globbing
code erroneously allowed the use of a NULL pointer.  This appears to
be an unnecessary test case added alongside other surgery back in 2008.
2021-12-21 10:31:26 +00:00
Oliver Kiddle
6b763233b2 49653: fix array indexing issue introduced with 49518 due to using decimal rather than hex 20
Also avoid comparing the current word against all options when the word
doesn't start with - or +.
2021-12-16 14:27:59 +01:00
Oliver Kiddle
7cb980b536 49518: fix exclusions for mixed - and + stacked options 2021-12-14 12:30:55 +01:00
Oliver Kiddle
91b7baf259 49646: allow colors in WATCHFMT with %F/%K 2021-12-13 21:06:57 +01:00
Oliver Kiddle
ba225155e4 49612: avoid startup error with clashing non-local module parameter name 2021-11-30 18:36:57 +01:00
Oliver Kiddle
b3519a9603 49611 based on 49590 (Martijn Dekker): disable Inf and NaN in math expressions for sh emulation 2021-11-30 18:27:53 +01:00
Oliver Kiddle
07c77dad50 49606: remove old NIS-specific code for retrieving user data 2021-11-28 20:55:02 +01:00
Oliver Kiddle
926a1a7296 49602: only set LOGCHECK from the watch module 2021-11-28 20:51:41 +01:00
Oliver Kiddle
78958c08bf 49601: don't create ambiguous history file entries for lines ending with a backslash 2021-11-28 20:49:30 +01:00
Jun-ichi Takimoto
138f5bf144 49586: fix :a and :A modifiers (with PWD="/") on Cygwin⁩ 2021-11-22 18:21:29 +09:00
Jun-ichi Takimoto
a361b88717 49563: fix build problem of watch module on Cygwin 2021-11-15 10:00:12 +09:00
Dimitris Apostolou
356dcb20ce github #82: Fix typos 2021-11-12 23:54:34 +01:00
Oliver Kiddle
dfb7ac94bb 49561: add zformat -F option, similar to -f but ternary expressions check for existence instead of doing math evaluation 2021-11-12 20:33:52 +01:00
Oliver Kiddle
631576de0f 49544: only tie watch/WATCH if both come from the module 2021-11-07 12:55:27 +01:00
Oliver Kiddle
271cfc685b 49534, 49539: separate watch/log functionality out into a module 2021-11-02 21:41:53 +01:00
Jun-ichi Takimoto
b067ab08d6 49535: fix completion for ${<TAB> and ${(a)<TAB> 2021-11-01 23:33:57 +09:00
Oliver Kiddle
68c8c60eaa 49533: add null check for preprompt functions list that could occur following an error when loading a module 2021-10-30 23:35:53 +02:00
Oliver Kiddle
632fee7cdf 49528: allow multiple -D options to compadd 2021-10-30 23:35:04 +02:00
Oliver Kiddle
8764cba90b 49516: bail out early from matching control if command line content is too short for the coanchor 2021-10-26 18:25:38 +02:00
Oliver Kiddle
e40938c128 49499 based on 49496 by Jun T.: fixes to option -A of _arguments 2021-10-23 18:21:24 +02:00
Peter Stephenson
0b3b259794 49433: Don't assume EPROG references are bounded by function depth.
We use references for efficient function copy, so there is no useful limit any more.
2021-10-05 16:45:55 +01:00
Bart Schaefer
fa4c88ca25 49456: clean up detection of private params in nested scopes, update doc 2021-10-04 09:02:27 -07:00
Oliver Kiddle
0a8d5cdbc8 49450: don't display explanation with compadd -x if any of -D, -A or -O are also used 2021-09-28 23:40:38 +02:00
Jun-ichi Takimoto
dd51ffa5b4 49422: improve support of --disable-dynamic-nss
see also 49392 (Vincent) and 49412 (Axel)
2021-09-22 13:36:57 +09:00