Bart Schaefer
ce8909b494
unposted: Record as comments some notes about namespace usage exceptions.
2024-02-03 19:52:39 -08:00
Peter Stephenson
aa8e4a0290
52008: Pattern bug with branches + exclusion
...
Add tests.
2023-08-01 14:32:55 +01:00
Oliver Kiddle
a73c705b0c
51212: remove STOUC() macro
...
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
2022-12-16 23:28:10 +01:00
Jun-ichi Takimoto
09ad15b986
50081: reset global mbstate_t variables when LC_CTYPE changes
2022-04-20 21:06:53 +09:00
Bart Schaefer
408a830483
47913: implement CASE_PATHS option to make NO_CASE_GLOB more sensible
2021-04-10 14:26:46 -07:00
Felipe Contreras
94b5446838
47784: silence a compiler waring from pattern.c
2021-04-04 14:48:01 +09:00
Jens Schleusener
11dbe4c286
45269: Fix misspellings in completions and elsewhere.
2020-01-09 13:42:02 +00:00
Martijn Dekker
c578f0a08b
45004: Fix typos in comments
2019-12-11 02:37:39 +00:00
Peter Stephenson
4b85edface
44361: Initialise variables in pattern matching.
...
These are used recursively and it's a bit obscure if there
are case where the value can leak.
2019-05-28 20:53:53 +01:00
Stephane Chazelas
5ac1c6f555
42790: make [[:blank:]] match non-ASCII blanks
2018-05-17 23:42:27 +02:00
Jun-ichi Takimoto
171e7fa4c1
41090: Replace iswprint() if unicode9 is enabled.
...
If wcwidth() or iswprint() is broken, force enable unicode9.
2017-05-12 12:10:13 +09:00
Peter Stephenson
f3f8537cfa
40760: Always tokenize unquoted - to Dash.
...
This fixes use of pattern match character ranges in unusual contexts.
Attempt to detect a tokenized - in cases where we don't care.
2017-03-07 10:43:58 +00:00
Peter Stephenson
e90a512aa6
40265: Fix problems with pure string in patterns with Meta.
...
Copy instead of relying on jiggery pokery with memory reallocation.
Problem was triggering with string ending with Dash converted to -.
2017-01-03 14:43:41 +00:00
Peter Stephenson
11343d89ef
39688: Skip out of P_EXACTLY pattern loop if P_PURES.
...
If it's really a pure string, there's only one exact match. We could
overwrite the next pointer; usually this didn't matter because
we'd hit a termination, but if we reallocated we might be looking
at garbage.
2016-10-20 12:20:18 +01:00
Peter Stephenson
d2c9f85f59
39683: Update scan pointers after possible alloc.
...
Problem could cause next scan index to point into an invalid block
when handling meta characters.
2016-10-20 10:43:52 +01:00
Barton E. Schaefer
09e991a20a
38188: signal re-entrancy, maybe
...
Crams several globals into a struct so they can be saved/restored as one,
and then tries pushing the signal queue management down into patmatch()
from pattryrefs().
2016-03-21 15:46:59 -07:00
Barton E. Schaefer
ef6f1eb1c5
38142: signal re-entrancy, maybe
2016-03-21 15:46:59 -07:00
Peter Stephenson
ad16356e19
37689: ! and ^ need to be tokenised in character sets
2016-01-19 17:24:12 +00:00
Peter Stephenson
8eb9070d67
37678: Now possible to quote "-" in pattern range
2016-01-19 09:55:46 +00:00
Peter Stephenson
b498bd7ce5
36982: Fix bug with (#cN) patterns and remove redundant description.
...
We need to restore the current count of matches when returning to
match at the point where we previously matched.
2015-10-27 11:54:19 +00:00
Peter Stephenson
faeb9555d3
36760: more care with already unmetafied pattern trial strings
2015-10-03 20:25:57 +01:00
Peter Stephenson
807a8338a3
36737: Ensure we don't dreference unterminated zero-length string
2015-10-01 16:21:18 +01:00
Peter Stephenson
5336587307
36711: Allocate unmetafied pattern trial string on the heap
2015-09-30 10:19:16 +01:00
Peter Stephenson
d07783628e
36700: unmetafy early for parameter match
2015-09-29 19:47:21 +01:00
Peter Stephenson
f9d7651c25
36682: expand pattern interface to optimise unmetafication
2015-09-28 20:31:51 +01:00
Peter Stephenson
df0d86b847
36559: test earlier for overflow in pattern range
2015-09-19 23:08:46 +01:00
Peter Stephenson
e86b3cce47
36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests.
2015-09-10 20:05:48 +01:00
Peter Stephenson
938c4c1e4a
36421: fix breakage in pattern change in 36415
2015-09-04 13:40:28 +01:00
Peter Stephenson
f52795ea3e
36415: remap bytes from invalid multibyte characters.
...
These now go to 0xdc00 + index. If wchar_t is a Unicode code point,
this is by construction an invalid character within the Unicode range.
If it isn't, we would hope the result was no worse than the current
fudge.
2015-09-04 10:07:51 +01:00
Barton E. Schaefer
df5f825538
36033: a few more queue_signals() to protect global state changes
2015-08-09 17:37:23 -07:00
Han Pingtian
77130df674
35514: [[:foo:]] tests in completion should be more specific
2015-06-24 14:56:32 +01:00
Peter Stephenson
2abba7243a
35386: expand tabs where useful in builtins outputing function.
...
Also add to zed -f.
Option is -x <numm>.
2015-06-05 11:21:22 +01:00
Peter Stephenson
e86720190e
35131: allow "[]" to match empty character set.
...
This only works if there's no further "]" in the pattern,
since if there is the first "]" has to match a literal character.
2015-05-15 09:35:24 +01:00
Jun-ichi Takimoto
a6db0b41ca
35064: rename ISPRINT to ZISPRINT to avoid conflict
2015-05-09 16:02:37 +09:00
Jun-ichi Takimoto
4bc554bb8b
34636: replace broken isprint() on Mac OS X
2015-03-05 01:48:34 +09:00
Peter Stephenson
8bf3595e3a
users/19059 based on users/19058: remove ineffiency with multiple * matches
2014-09-08 16:38:51 +01:00
Barton E. Schaefer
8672d19f0c
32500: handle interrupts during pattern matching
2014-03-20 07:56:30 -07:00
Peter Stephenson
db23c63005
32136: fix problem with kshglob.
...
Non-pattern characters that could be followed by "(" to introduce
a ksh glob but weren't caused failures.
2013-12-16 22:20:06 +00:00
Peter Stephenson
375115c7df
unposted: updates for 4.0.2-test-1.
...
Update references to 4.0.2 to 4.0.3.
Additional mod_export declarations.
Additions to .distfiles.
2013-11-06 19:25:07 +00:00
Peter Stephenson
1c172cb080
31877: fix behaviour of disable -p with parentheses
2013-10-24 18:45:50 +01:00
Mikael Magnusson
fa03332635
31805: Add $patchars and $dis_patchars to zsh/parameter module
2013-10-11 14:57:57 +02:00
Peter Stephenson
60debf388f
31764: Dewreakify havoc caused by pattern disables on glob qualifiers.
...
Don't use the zpc_specials array before it's defined, it's rude.
2013-09-23 21:02:31 +01:00
Peter Stephenson
347a63da0c
31465: fix basic completion and globbing uses of disabled patterns
2013-06-13 18:40:36 +01:00
Peter Stephenson
fdf2867e5f
31444: Basic code for enable/disable -p
2013-06-13 18:38:33 +01:00
Peter Stephenson
68d0d76db5
31441: use array to decide which forms of pattern are enabled
2013-06-01 20:39:09 +01:00
Bart Schaefer
0c226a6282
31158: following a wildcard with a repetition produces a bad pattern error
2013-03-19 15:05:35 +00:00
Peter Stephenson
f0287c6e17
users/14723: invalid converted characters should never match valid ones
2010-01-21 11:11:05 +00:00
Peter Stephenson
71865fd36d
27021: fix length of saved glob flags in pattern matching
2009-05-29 21:06:40 +00:00
Peter Stephenson
85c513894d
26047: convert lower levels of completion matching to use
...
multibyte strings and wide characters
2008-11-15 21:27:45 +00:00
Peter Stephenson
b4d336aaca
25845: fix pattern but with backslashed and metafied charaters
2008-10-11 21:57:03 +00:00