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

34 commits

Author SHA1 Message Date
Barton E. Schaefer
9958684574 36022 fix bug that some loop constructs could not be interrupted, revise 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-08-09 16:13:52 -07:00
Peter Stephenson
b3aa3b7791 35910: Don't add to raw lex buffer if lex stopped.
This was causing a segmentation violation in completion when parsing
an incomplete math expression, e.g. 'echo $((3*4)<TAB>'.
2015-07-25 21:50:55 +01:00
Peter Stephenson
2afdb3985a 35668: Improved fix for command/proc subst starting in alias.
Use input flag to suppress the unwanted backtracking.

Add test for the extra case covered.
2015-07-02 10:01:42 +01:00
Peter Stephenson
3774bae034 34784: fix old bug with history word selection 2015-03-26 20:28:13 +00:00
Peter Stephenson
89aca2d0a0 34752: another fix for history expansion in cmd subst 2015-03-20 11:02:23 +00:00
Peter Stephenson
9b21dcada9 Fix up memory allocation for previous patch 2015-02-17 09:56:09 +00:00
Peter Stephenson
126fb61c7c 34560: Fix $(( that's actually a multiline cmd subst. 2015-02-16 17:16:57 +00:00
Barton E. Schaefer
2c13d9fb0d 34543: Prevent crash on garbage bytes inside $(...)
Garbage input (nul bytes, etc.) can cause the $(...) parser to become
confused during look-ahead and attempt to back up the input too far.
This commit catches the error but does not fix the underlying cause.
2015-02-14 10:43:10 -08:00
Peter Stephenson
3b32abafdb 34220: new $(...) handling needs to back up over alias expansion 2015-01-10 20:28:57 +00:00
Peter Stephenson
c0d01a6fe0 Fix command substitutions to parse contents as they are read in.
Do this by refactoring misnamed lexsave()/lexrestore() to allow
continuity of history and input.

Add test.
2015-01-08 12:24:00 +00: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
21bbd96d0d 31869: reduce WINCH-twaddling in shingetline() 2013-10-21 08:36:52 -07:00
Bart Schaefer
d19e18c68d 31350: block SIGWINCH nearly all the time, except
when about to calculate prompts or do synchronous read, so
syscalls are not interrupted by window size changes.
2013-04-30 00:08:49 -07:00
Peter Stephenson
a7bc22ca00 Paul 28538 / me 28540 / couple of unposted casts:
use char * for pointer arithmetic rather than void *
2010-12-20 10:28:43 +00:00
Peter Stephenson
e71df91bd2 27827: fix infinite loop in recursive alias at end of parsed string 2010-03-25 14:03:40 +00:00
Peter Stephenson
036cb0ce95 Joakim Rosqvist: 27591 as modified in 27594:
KEYBOARD_HACK variable
2010-01-13 12:05:22 +00:00
Wayne Davison
693fd5b56e Check the return value of all pipe(), read(), and write() calls.
Gets rid of all the remaining "ignoring return value" compiler
warnings, and makes some read/write operations safer by ensuring
that an EINTR is handled.
2009-12-16 18:39:06 +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
25413054c1 24699: bug with ${(Q)...} on initial ">"
bug with ${(z)...} on string with unterminated "("
2008-03-08 01:20:49 +00:00
Peter Stephenson
dd5602f59b 22474: use variable argument lists to improve error message handling 2006-05-30 22:35:03 +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
6eb5f99f1e 19295: $CONTEXT zle parameter 2003-12-15 22:45:27 +00:00
Peter Stephenson
815bc92148 a la 19209: zcalloc -> zshcalloc 2003-10-29 19:17:30 +00:00
Peter Stephenson
e65a811520 18941: history wrong after parse error during alias expansion 2003-08-11 13:19:48 +00:00
Peter Stephenson
4c149a8abc 18252: pass ignoreeof as flag to zleread 2003-02-17 14:06:39 +00:00
Oliver Kiddle
5d11abfa3b 16492: add RPROMPT2 variable for right prompts in multi-line commands 2002-01-31 14:44:06 +00:00
Clint Adams
6feb3f57f4 16361: include <stdio.h> to avoid implicit declarations. 2001-12-18 01:13:22 +00:00
Sven Wischnowsky
757168e2c8 remove 13108 (trap queues); replace with signal queueing to ensure that user signal handlers are only executed when it is safe to run them (13365) 2001-01-16 13:44:18 +00:00
Peter Stephenson
c292a3ae50 Sven: 13108: Handle traps synchronously
pws: 13109, 13111: clear up zle display when output produced in trap.
2000-11-11 19:50:27 +00:00
Wayne Davison
2e96c8f074 Removed the spaceflag variable. 2000-07-18 07:49:16 +00:00
Tanaka Akira
e74702b467 Initial revision 1999-04-15 18:05:38 +00:00