1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-21 19:31:50 +02:00
Commit Graph

1224 Commits

Author SHA1 Message Date
Jun-ichi Takimoto
1b8446e1cd 52188: skip tests that fail if multibyte is not available 2023-09-27 23:45:00 +09:00
Bart Schaefer
1becbba0b6 users/29160, workers/52156: Fix repetition of substitution modifier. 2023-09-16 20:51:27 -07:00
Bart Schaefer
293d36ae1e 52155: Test file missed out from previous commit 2023-09-16 20:03:32 -07:00
Jun-ichi Takimoto
0eab788437 52122 + 52129: fix (#) parameter expansion flag
Without the X flag, null string "" is substituted for bad math expression.
2023-09-13 09:59:42 +09:00
Bart Schaefer
e3c2af216b 52115: permit repeated "private" declarations as long as types aren't changed 2023-09-05 18:04:09 -07:00
Bart Schaefer
9ff1b2810e users/29220: fix bug with assignment to private following explicit unset 2023-09-03 11:42:00 -07: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
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
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
Marlon Richert
6c993144bd 51860: simplify suffix handling in _prefix to remove less accurate hack
This solves the following problems in the _prefix completer:
- The old code had logic for dealing with compstate[unambiguous] that
  was unnecessary. It works fine without it.
- Because of this logic, if a widget set compstate[insert]=1 after
  calling _main_complete, an `x` was left after the completion on the
  command line.
- If the same widget also set `compstate[to_end]=`, then instead, the
  last character of the inserted completion would be treated as an
  autoremovable suffix, with the actual suffix being inserted to the
  line as a normal character.
- After inserting a completion, the cursor would move to the end of the
  entire current word on the command, not the end of word that was
  inserted. This is not what you want with _prefix, since you are trying
  to complete a word _before_ the one on the command line, after which
  you usually want to insert a separator, such as a space or slash,
  before the next word.
2023-06-22 13:13:09 -07:00
Peter Stephenson
78102120b9 51816: add :S history modifier with pattern match 2023-06-06 09:16:46 +01:00
Marlon Richert
63400fdbc5 51779: update completion test for 51761 2023-06-06 11:03:09 +09:00
Marlon Richert
caa1c38c6f 51348: Fix subscript completion bugs inside ~[...]
When completing inside ~[...] (_with_ the trailing `]` present), the
following bugs occured:
- Subscript completion was skipped entirely when there were one or more
  slashes ('/') in the subscript, which is incorrect, since slashes are
  allowed there.
- Instead of going through _complete, $_comps[-subscript-] was called
  immediately, causing _setup to be skipped.
- If succesful, _main_complete was exited right after, causing
  menu-style, comppostfuncs and other essential completion features to
  be skipped.
2023-05-21 03:24:17 +02:00
Marlon Richert
bb441f77a7 51758: Make dynamic dir completion easier to implement 2023-05-21 03:05:20 +02: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
Jun-ichi Takimoto
7f2bdf55a3 51692: not skip tests for [[ -r/-N file ]] on Cygwin 2023-05-08 12:53:37 +09: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
Peter Stephenson
12e5db145b 51608: Don't execute commands after "continue &&"
Also ! continue ||
2023-03-29 10:52:05 +01: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
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
acb15e3cc9 51403: Tests and documentation for 51402, clean up some other tests. 2023-02-12 11:57:31 -08:00
Bart Schaefer
3e55a135c1 51374: Expose named references in $parameters, fix substitution error. 2023-02-12 11:29:10 -08:00
Bart Schaefer
143e153259 51361: Tests for 51360. 2023-02-12 11:23:06 -08:00
Oliver Kiddle
6502d05897 51320, 51383: fixes to prevent later reappearance of old attributes
Also associated test updates and a test fix for TERM=dumb.
2023-02-09 00:10:19 +01:00
Peter Stephenson
d6b027c3c1 51350: ${(S)...//#%...} didn't match the whole string 2023-02-06 14:16:17 +00:00
Peter Stephenson
76d095df9d 51306: error message in ${unset?error} should be expanded 2023-02-02 10:12:17 +00:00
Peter Stephenson
21baad1037 51307: Improve error on attempt to define function from aliased name 2023-02-02 10:09:21 +00:00
Daniel Shahaf
096e72ce78 unposted (cribbed from users/28784 by Roman): Add XFail tests for substituting a single-quoting backslash. 2023-01-27 18:42:42 +00:00
Peter Stephenson
03292bceec 51278: make (i) subscript flag for zero-length string consistent 2023-01-16 11:10:02 +00:00
Oliver Kiddle
857bc4343b 51297: update expected test results to match more optimised escape sequences with recent changes 2023-01-11 18:41:10 +01:00
Oliver Kiddle
667ead3a64 51258, 51272: refactor handling of terminal attributes, removing OFF flags in zattr 2023-01-10 20:53:17 +01:00
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.
2022-12-17 00:37:19 +01:00
Jun-ichi Takimoto
2701ab161d 51207: fix for read -d when the delimiter is a byte >= 0x80 2022-12-17 00:35:36 +01:00
Oliver Kiddle
7fb6c133bf 51215: consume whole CSI sequences from the input
This affects CSI sequences that aren't explicitly bound but arrive
within the usual KEYTIMEOUT time limits. A single undefined-key widget
is run instead of unintended bindings for Escape and other characters in
the sequence.
2022-12-16 23:23:53 +01:00
Peter Stephenson
67d4bf5bb9 51134: ! return doesn't change the return status 2022-12-12 10:30:13 +00:00
Philippe Altherr
f253ea6b9d 51076: fix ERR_EXIT when used with "eval" or "source"; documentary comments 2022-12-03 21:14:26 -08:00
Philippe Altherr
259f1e944b 51071: fix ERR_RETURN for functions in conditional statements 2022-12-03 21:03:36 -08:00
Philippe Altherr
dd3ba3d599 51001: fix for ERR_EXIT following shell function; update tests 2022-12-03 20:44:10 -08:00
Philippe Altherr
d47b8480f0 51001: fix for ERR_EXIT with pipeline negation ("!"); update tests 2022-12-03 20:42:13 -08:00
Philippe Altherr
fda6fd9513 51001: fix for ERR_EXIT with "always" blocks; update tests 2022-12-03 20:35:58 -08:00
Philippe Altherr
23dc19f005 51001: Reverts 8839e969b, most of 1ba8714a, and d873ed60.
Also correct ChangeLog
2022-12-03 20:31:42 -08:00
Jun-ichi Takimoto
1be52186b4 51079: metafy sep in array subscript flag (s:sep:)
this enable sep to contain \0 etc.
2022-12-02 19:32:11 +09:00
Daniel Shahaf
291940bae6 unposted (cf. 51016): Add a test case for underscore-followed-by-digits in math context. 2022-11-23 14:22:02 +00:00