summaryrefslogtreecommitdiff
path: root/Src/loop.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-0344271: Fix breaks propagated from until or return.Peter Stephenson1-2/+6
If the until or return test caused continuation but there was a pending return, breaks didn't get cancelled causing enclosing scope to skip commands.
2017-09-1841723: one more case of 41627 in "while" loops.Barton E. Schaefer1-1/+1
2017-08-31Fix problem with ERR_RETURN.Peter Stephenson1-4/+3
It wasn't suppressed properly in the code following an if in some circumstances, in particular in initialsation scripts and also in a nested function where the caller had suppressed it.
2017-08-2441590 modified as 41595: make ERR_RETURN more logical.Peter Stephenson1-2/+7
It now operates separately at each function depth. To keep ERR_EXIT global, make the noerrexit variable usd bit flags. Extend tests.
2017-01-2940453: signal handler safety for callers of patcompile(PAT_STATIC), which is ↵Barton E. Schaefer1-1/+5
not re-entrant.
2016-12-05Extra case for ERR_RETURN and ERR_EXIT.Peter Stephenson1-0/+6
Don't trigger just because status is non-zero at end of complex shell construct as this may be a case we've already suppressed.
2016-11-0539844: fix "while" condition as per 39839 (commit 2c56c7e5)Barton E. Schaefer1-4/+3
2016-11-0539839: fix "return" from "if" conditionBarton E. Schaefer1-1/+2
2016-10-1339625: case needs to reset lastval if no pattern matchedMartijn Dekker1-2/+6
2016-10-1039599: Don't reset status before "case" executionPeter Stephenson1-1/+0
2016-09-2639448: reset REPLY in select on user actionMartijn Dekker1-0/+2
2016-06-2138734: fix final case clauses terminating with ;&Peter Stephenson1-1/+1
2016-01-2737804 (plus 37816): first word following "repeat" should be evaluated as mathBarton E. Schaefer1-1/+3
2015-10-03unposted: back out 36707, add test case for 36766Barton E. Schaefer1-6/+2
2015-09-3036707: distinguish ERR_RETURN value of retflag so that execif() can ignore ↵Barton E. Schaefer1-2/+6
it in the test sublist
2015-08-0936022 fix bug that some loop constructs could not be interrupted, revise ↵Barton E. Schaefer1-3/+38
signal queueing There are two underlying ideas here: (1) Keeping signals queued around anything that's doing memory management (including push/pop of the heap) has become crucial. (2) Anytime the shell is going to run a command, be it buitin or external, it must be both safe and necessary to process any queued signals, so that the apparent order of signal arrival and command execution is preserved.
2015-05-1835168: Improve parsing of case patterns.Peter Stephenson1-37/+51
"|" 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-01-10select: Fix leak of 256 bytes on every loop when zle is not usedMikael Magnusson1-1/+1
Reproduce by yes | head -n 1000000 | zsh -c 'select foo in a b c; do done; sleep 30; echo' Found by Coverity (Issue 439082).
2014-12-2734065: following an "if" condition, do not test lastval for ERR_EXIT until a ↵Barton E. Schaefer1-5/+11
new command is run Includes unposted regression tests.
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-4/+24
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-11-2533791: fatal errors in an "always" construct yield nonzero statusBarton E. Schaefer1-2/+3
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-04-2032569: lastval ($?) should not be reset between word list substitution and ↵Barton E. Schaefer1-3/+3
loop body execution in for/select Remove one other redundant and therefore confusing assignment to lastval.
2014-04-2032568: consistency in handling of errflag condition during substitutionsBarton E. Schaefer1-2/+12
Affects for/select word lists, function definition name position, and anonymous function argument lists.
2011-05-0929165: use term.h globally if needed at all.Peter Stephenson1-3/+3
2008-07-3125345, 25347: neaten interface from main shell to zlePeter Stephenson1-2/+3
2008-05-1225002: only ZLE should update attributes resulting from prompt expansionPeter Stephenson1-2/+2
2008-05-1124996: improve xtrace output for patternsPeter Stephenson1-3/+3
2008-05-11users/12848: return, break, continue in always block override try blockPeter Stephenson1-7/+7
2007-06-2723670: rationalise some linked list functionsPeter Stephenson1-8/+2
2007-01-1923115: ";|" at end of case clause causes later patterns to be testedPeter Stephenson1-3/+4
2006-05-3022474: use variable argument lists to improve error message handlingPeter Stephenson1-1/+1
2005-12-1521814: error handling for traps in "always" constructs.Bart Schaefer1-1/+10
2005-11-15Got rid of some unsigned-char/char pointer casts.Wayne Davison1-1/+1
2005-01-14c.f. 20675: improve zle as a basis for Unicode.Peter Stephenson1-2/+2
unposted: update version to 4.2.3-dev-1
2004-07-1120149: improve prompt-reset codePeter Stephenson1-1/+1
20150: commit ancient memory leak fix(?) in completion
2004-06-2220076, 20084: { ... } always { ... } syntax.Peter Stephenson1-0/+65
2004-06-02Marked unused parameters with the new UNUSED() macro.Wayne Davison1-3/+3
2004-05-28Made a variable (t2) size_t so that it matched the size of theWayne Davison1-1/+2
other variable it gets compared with (fw).
2003-12-1519295: $CONTEXT zle parameterPeter Stephenson1-1/+1
2003-02-1718252: pass ignoreeof as flag to zlereadPeter Stephenson1-3/+1
2003-02-1718251: Fix select and make it respect EOFPeter Stephenson1-1/+3
2002-02-25allow nterruption of empty while-loops with ^C (16711)Sven Wischnowsky1-31/+47
2001-10-23Fix infinite loop on `case' with xtrace.Bart Schaefer1-3/+2
2001-10-15for caching of compiled patterns: remember that singsub() might modify the ↵Sven Wischnowsky1-2/+2
string it gets, compare with unmodified string (16041)
2001-06-2515030: multi-parameter `for' loopsPeter Stephenson1-24/+43
2000-06-1711956: Fix off-by-one error.Bart Schaefer1-1/+1
2000-05-05Small doc fix and AIX dependency fixOliver Kiddle1-1/+1
2000-04-01Updated from list as far as 10376Peter Stephenson1-109/+271
1999-04-15Initial revisionTanaka Akira1-0/+421