1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-23 17:01:05 +02:00
Commit graph

127 commits

Author SHA1 Message Date
Jun-ichi Takimoto
a4020e10a3 37868: add 'static' to file local variables 2016-02-03 01:25:33 +09:00
Peter Stephenson
c2b6bd51f9 37693: turn Dash into '-' in glob qualifiers 2016-01-19 17:38:59 +00: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
Barton E. Schaefer
b4643fce2d 37483: save and possibly restore cshnullglob failure state around each evaluation of an (e:...:) glob qualifier. 2016-01-01 19:20:14 -08:00
Peter Stephenson
830d54e629 37092: make nested ${(P)name} properly refer to parameter on return 2015-11-11 18:04:20 +00:00
Peter Stephenson
58f4cccb1f 37022: add GLOB_STAR_SHORT option to abbreviate ** and *** 2015-10-30 12:28:07 +00:00
Peter Stephenson
5336587307 36711: Allocate unmetafied pattern trial string on the heap 2015-09-30 10:19:16 +01:00
Barton E. Schaefer
a5a6c58ff8 unposted: fix typo in comment. 2015-09-29 13:36:43 -07: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
Mikael Magnusson
bd5806aa0a 36603: glob: fix dirfd leak during Y shortcut qualifier 2015-09-24 20:52:56 +02:00
Jun-ichi Takimoto
8b1676e3b7 36491: Multibyte support for parameter expansion flags B,E,N 2015-09-12 20:35:56 +09:00
Peter Stephenson
c0df3440a4 36264: glob and pattern variable pathbuf is metafied.
Document this and unmetafy it when passing to system calls, including
lchdir() which is a system-level interface.
2015-08-21 15:17:18 +01:00
Barton E. Schaefer
45424e735d 36084: use zrealloc() consistently 2015-08-10 12:55:56 -07:00
Barton E. Schaefer
df5f825538 36033: a few more queue_signals() to protect global state changes 2015-08-09 17:37:23 -07:00
Peter Stephenson
f1923bdfa6 Add non-metafied character length handling.
Use this in regex module and add test using $'\ua0'.

Rename mb_metacharinit() to mb_charinit() as it does not involve
metafied characters.
2015-06-12 09:30:39 +01:00
Barton E. Schaefer
fae07f65a3 34965: consistent use of zalloc/zrealloc/zfree 2015-04-25 12:40:35 -07:00
Barton E. Schaefer
1fa68938dc 34837: avoid loss of original file path when applying colon-modifiers in glob qualifiers 2015-04-03 09:55:11 -07:00
Barton E. Schaefer
628d2f4f8a 34634: avoid infinite recursion on (/)# extendedglob 2015-02-27 10:10:19 -08:00
Peter Stephenson
d067ebcacd 33876: etc.: Separate errors and keyboards interrupts
Combination of 12 commits from interrupt_abort branch.

Basic strategy is to introduce bits to errflag and to set and
reset them separately.

Remove interrupt status on return to main keymap.

Turn off ERRFLAG_INT for always block.

Restore bit thereafter: we probably need a new variable in order
to allow user interrupts to be reset in the always block.

Add TRY_BLOCK_INTERRUPT

This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too.

Ensure propagation of SIGINT from exited job.

If received by foreground job, shell uses ERRFLAG_INT, not
ERRFLAG_ERROR, to set the new state.

Reset errflag before precmd()

Add always block in _main_completion to fix ZLS_COLORS

Ensures we get the right state of $ZLS_COLORS at the end of _main_complete
even if there's an interrupt.  However, the "right state" is a bit messy
as it depends on styles.
2014-12-11 09:41:17 +00:00
Barton E. Schaefer
9ddd022ff0 33854: errors end recursion through scanner()
Makes **/ more easily interruptible
2014-12-07 11:20:01 -08:00
Peter Stephenson
691a7e4b3d users/19143: fix depth glob search with trailing slashes 2014-09-25 19:12:34 +01:00
Mikael Magnusson
78dd672e1a 33136: P glob qual appends words when negated 2014-09-16 00:27:05 +02:00
Mikael Magnusson
33ad7174f6 33038: Fix {^@..a} hanging 2014-08-21 01:23:32 +02:00
Barton E. Schaefer
417cb94fe1 32931: with NO_NOMATCH, a subscript glob qualifier on a not-matching pattern returns the original pattern 2014-07-31 23:46:21 -07:00
Jun T
e6d7d7b013 32767: another spot to tweak bracechardots() 2014-06-11 10:19:24 -07:00
Barton E. Schaefer
d1da134c63 32766: bracechardots() agrees with xpandbraces() about what constitutes a {C1..C2} pattern, thus preventing crash 2014-06-10 23:52:38 -07:00
Jun T
e1fbf76de0 32765: fix build when not MULTIBYTE_SUPPORT 2014-06-10 23:46:15 -07:00
Barton E. Schaefer
32756f78af 32723: add braces around some if/else branches 2014-06-05 21:10:23 -07:00
Daniel Shahaf
69378db3c5 32708: glob qualifier (Y) implies (oN)
plus incidental patch to avoid adding a meaningless bitvalue to sort-order flags
2014-06-04 22:47:20 -07:00
Daniel Shahaf
9381bb6a2d 32694: the number of matches to find is the suffix argument of (Y) qualifier 2014-06-03 23:46:07 -07:00
Daniel Shahaf
06a4913245 users/18870: fix glob scanner insert counting check.
Was causing problems with globs in paths with (Y) glob qualifier
2014-06-02 14:32:51 +01:00
Daniel Shahaf
10ae77c0cf users/18857: add (Y) glob qualifier to generate only one match per pattern 2014-06-01 14:18:21 -07:00
Peter Stephenson
501f2003a8 32640: (#q) in [[ ... ]] forces globbing 2014-06-01 20:55:39 +01:00
Manuel Presnitz
973e5dc37d 32412 / 32415: New giga- and terabyte units for glob qualifiers 2014-03-01 19:08:17 +00:00
Peter Stephenson
73db206838 32414: improved error message for missing delimiters.
For glob qualifiers "u" and "g".
2014-02-19 15:34:17 +00:00
Peter Stephenson
d26461a3c6 users/18298 (tidied up): add {<char>..<char>} expansion 2014-01-09 10:05:13 +00:00
Peter Stephenson
8e2d4c2cf7 32030: need to revert empty glob qualifier change.
It failed on an empty expansion that (N) was supposed to remove.
Add test for this case.
2013-11-20 17:35:57 +00:00
Barton E. Schaefer
12fb09c336 31995: Han Pingtian: glob qualifiers cannot follow an empty pattern, so a leading paren means grouping 2013-11-18 08:24:54 -08: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
Barton E. Schaefer
27f9c515ff unposted: improve an error message. 2013-09-21 16:39:25 -07:00
Peter Stephenson
347a63da0c 31465: fix basic completion and globbing uses of disabled patterns 2013-06-13 18:40:36 +01:00
Peter Stephenson
68d0d76db5 31441: use array to decide which forms of pattern are enabled 2013-06-01 20:39:09 +01:00
Peter Stephenson
c3fb9dbfa3 Dima Kogan: 30515: fix globbing problem with large files:
failure owing to bad cast with large integers
2012-06-18 09:05:01 +00:00
Peter Stephenson
86f8e8de69 30307 plus tweak suggsted by Wayne: use %lld for zlong when long long 2012-03-05 10:06:28 +00:00
Mikael Magnusson
47a48ced0e 30276: Src/glob.c: Use zlong rather than int when calculating brace expansions of the form {1..9}. 2012-02-29 17:06:07 +00:00
Peter Stephenson
53f893d062 30181, plus rename of PF_* flags to PREFORK_*:
Pass sh-wordsplitting instructions to paramsubst() using flags,
avoiding side effects of explicitly setting and unsetting the
SHWORDSPLIT option.
2012-02-12 20:27:48 +00:00
Peter Stephenson
acb97e6115 29991: allow explicit "d" for days in time qualifiers 2011-12-11 17:22:59 +00:00
Oliver Kiddle
fe1dc5102a 29952: fix cut'n'paste error in nanosecond timestamp support 2011-12-07 01:31:20 +00:00