1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00
Commit graph

33 commits

Author SHA1 Message Date
Peter Stephenson
52aeb9aaeb 35168: Improve parsing of case patterns.
"|" is now found properly by looking for words that come
from the lexical analyser, rather than hacking a pattern
returned in one dollop.

Update some completion functions that need extra quoting
as a result.

Add test for new parsing.

Update version number to 5.0.8-dev-3 because of wordcode
incompatibility.
2015-05-18 09:56:00 +01:00
Mikael Magnusson
573679c34b select: Fix leak of 256 bytes on every loop when zle is not used
Reproduce by
yes | head -n 1000000 | zsh -c 'select foo in a b c; do done; sleep 30; echo'

Found by Coverity (Issue 439082).
2015-01-10 08:48:18 +01:00
Barton E. Schaefer
d6a32ddeed 34065: following an "if" condition, do not test lastval for ERR_EXIT until a new command is run
Includes unposted regression tests.
2014-12-27 21:55:58 -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
05e919dc56 33791: fatal errors in an "always" construct yield nonzero status
Fatal errors in the try-block part of an "always" construct cause the
entire construct to have nonzero status, even when TRY_BLOCK_ERROR is
used to suppress the error.
2014-11-25 09:15:20 -08:00
Barton E. Schaefer
9da59238ff 32569: lastval ($?) should not be reset between word list substitution and loop body execution in for/select
Remove one other redundant and therefore confusing assignment to lastval.
2014-04-20 11:09:51 -07:00
Barton E. Schaefer
848badaa5f 32568: consistency in handling of errflag condition during substitutions
Affects for/select word lists, function definition name position, and
anonymous function argument lists.
2014-04-20 10:27:15 -07:00
Peter Stephenson
d89361739a 29165: use term.h globally if needed at all. 2011-05-09 09:49:08 +00:00
Peter Stephenson
0c9830d23c 25345, 25347: neaten interface from main shell to zle 2008-07-31 08:44:16 +00:00
Peter Stephenson
bd70d684fc 25002: only ZLE should update attributes resulting from prompt expansion 2008-05-12 13:50:42 +00:00
Peter Stephenson
58580d31f5 24996: improve xtrace output for patterns 2008-05-11 19:55:21 +00:00
Peter Stephenson
bab70abe6b users/12848: return, break, continue in always block override try block 2008-05-11 19:03:58 +00:00
Peter Stephenson
4d52b7ebe6 23670: rationalise some linked list functions 2007-06-27 13:56:10 +00:00
Peter Stephenson
de272e0309 23115: ";|" at end of case clause causes later patterns to be tested 2007-01-19 21:36:00 +00:00
Peter Stephenson
dd5602f59b 22474: use variable argument lists to improve error message handling 2006-05-30 22:35:03 +00:00
Bart Schaefer
174ad4a80f 21814: error handling for traps in "always" constructs. 2005-12-15 04:24:04 +00:00
Wayne Davison
e79af955f0 Got rid of some unsigned-char/char pointer casts. 2005-11-15 08:44:17 +00:00
Peter Stephenson
88a37cc187 c.f. 20675: improve zle as a basis for Unicode.
unposted: update version to 4.2.3-dev-1
2005-01-14 13:04:47 +00:00
Peter Stephenson
86ae90bc1c 20149: improve prompt-reset code
20150: commit ancient memory leak fix(?) in completion
2004-07-11 22:53:01 +00:00
Peter Stephenson
d591334e9d 20076, 20084: { ... } always { ... } syntax. 2004-06-22 13:09:55 +00:00
Wayne Davison
fb0937a69e Marked unused parameters with the new UNUSED() macro. 2004-06-02 22:14:25 +00:00
Wayne Davison
f297798397 Made a variable (t2) size_t so that it matched the size of the
other variable it gets compared with (fw).
2004-05-28 19:18:17 +00:00
Peter Stephenson
6eb5f99f1e 19295: $CONTEXT zle parameter 2003-12-15 22:45:27 +00:00
Peter Stephenson
4c149a8abc 18252: pass ignoreeof as flag to zleread 2003-02-17 14:06:39 +00:00
Peter Stephenson
40c29457f2 18251: Fix select and make it respect EOF 2003-02-17 11:41:58 +00:00
Sven Wischnowsky
4e354ca36f allow nterruption of empty while-loops with ^C (16711) 2002-02-25 09:21:14 +00:00
Bart Schaefer
14e13fb407 Fix infinite loop on `case' with xtrace. 2001-10-23 16:17:03 +00:00
Sven Wischnowsky
0e6f265516 for caching of compiled patterns: remember that singsub() might modify the string it gets, compare with unmodified string (16041) 2001-10-15 11:28:07 +00:00
Peter Stephenson
1897a361bf 15030: multi-parameter `for' loops 2001-06-25 16:07:51 +00:00
Bart Schaefer
af1339bacf 11956: Fix off-by-one error. 2000-06-17 17:05:53 +00:00
Oliver Kiddle
7c56ccdcbc Small doc fix and AIX dependency fix 2000-05-05 16:45:03 +00:00
Peter Stephenson
4852545255 Updated from list as far as 10376 2000-04-01 20:49:47 +00:00
Tanaka Akira
e74702b467 Initial revision 1999-04-15 18:05:38 +00:00