Bart Schaefer
98a6892cb1
52244: Fix a batch of minor defects reported by Coverity.
...
Coverity defects 1547831, 1547826 (remove unused function), 1521551,
1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789,
1255787, 1255782, 1255750
7 months ago
Bart Schaefer
86196843bd
52198: put back incorrectly removed zfree()
8 months ago
Bart Schaefer
355cfc1b95
52153: mapfile without HAVE_MMAP should not trim newlines
8 months ago
Peter Stephenson
21baad1037
51307: Improve error on attempt to define function from aliased name
1 year ago
Oliver Kiddle
667ead3a64
51258, 51272: refactor handling of terminal attributes, removing OFF flags in zattr
1 year ago
Oliver Kiddle
a73c705b0c
51212: remove STOUC() macro
...
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
1 year ago
Bart Schaefer
df0c783f4b
50133: use read-ahead and lseek-rewind for efficient line-buffered input
2 years ago
Peter Stephenson
1640457f47
49792: Non-interative shell input is line buffered.
2 years ago
Jun-ichi Takimoto
309d899507
unposted: add 'static' to shinsavestack
3 years ago
Peter Stephenson
e5cd2dd980
49290: Replace stdio for buffered shell input.
...
The previous method allowed memory management to interact with signal
handlers, causing occasional crashes on some system.
Instead, use a simple pre-allocated buffer and raw system calls.
3 years ago
Oliver Kiddle
704d10989e
48504: use SEEK_ macros in fseek() calls
3 years ago
Peter Stephenson
e76ea18477
43511: Initialiase alias entry on input stack.
...
This didn't happen if neither history nor alias expansion was in use.
6 years ago
Barton E. Schaefer
9de905b22f
41322: reduce number of changes in signal queuing/blocking state during shingetline() to improve read speed
7 years ago
Peter Stephenson
bb218704d2
40306 with doc tweaks: Change behaviour expanding alias in () function definition.
...
Now an error unless the () is part of the same error as the name.
Add ALIAS_FUNC_DEF option to allow it again.
7 years ago
Daniel Shahaf
7e40a89053
40117: Revert a hunk of 40035 that changed semantics incorrectly.
8 years ago
Eitan Adler
110ffae9fe
40035: Cosmetic fixes for comments and documentation.
...
Mostly fixes to doubled words.
8 years ago
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.
9 years ago
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>'.
9 years ago
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.
9 years ago
Peter Stephenson
3774bae034
34784: fix old bug with history word selection
9 years ago
Peter Stephenson
89aca2d0a0
34752: another fix for history expansion in cmd subst
9 years ago
Peter Stephenson
9b21dcada9
Fix up memory allocation for previous patch
9 years ago
Peter Stephenson
126fb61c7c
34560: Fix $(( that's actually a multiline cmd subst.
9 years ago
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.
9 years ago
Peter Stephenson
3b32abafdb
34220: new $(...) handling needs to back up over alias expansion
9 years ago
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.
9 years ago
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.
10 years ago
Barton E. Schaefer
21bbd96d0d
31869: reduce WINCH-twaddling in shingetline()
11 years ago
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.
11 years ago
Peter Stephenson
a7bc22ca00
Paul 28538 / me 28540 / couple of unposted casts:
...
use char * for pointer arithmetic rather than void *
14 years ago
Peter Stephenson
e71df91bd2
27827: fix infinite loop in recursive alias at end of parsed string
14 years ago
Peter Stephenson
036cb0ce95
Joakim Rosqvist: 27591 as modified in 27594:
...
KEYBOARD_HACK variable
15 years ago
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.
15 years ago
Peter Stephenson
0c9830d23c
25345, 25347: neaten interface from main shell to zle
16 years ago
Peter Stephenson
bd70d684fc
25002: only ZLE should update attributes resulting from prompt expansion
16 years ago
Peter Stephenson
25413054c1
24699: bug with ${(Q)...} on initial ">"
...
bug with ${(z)...} on string with unterminated "("
16 years ago
Peter Stephenson
dd5602f59b
22474: use variable argument lists to improve error message handling
18 years ago
Wayne Davison
e79af955f0
Got rid of some unsigned-char/char pointer casts.
19 years ago
Peter Stephenson
88a37cc187
c.f. 20675: improve zle as a basis for Unicode.
...
unposted: update version to 4.2.3-dev-1
20 years ago
Peter Stephenson
86ae90bc1c
20149: improve prompt-reset code
...
20150: commit ancient memory leak fix(?) in completion
20 years ago
Peter Stephenson
6eb5f99f1e
19295: $CONTEXT zle parameter
21 years ago
Peter Stephenson
815bc92148
a la 19209: zcalloc -> zshcalloc
21 years ago
Peter Stephenson
e65a811520
18941: history wrong after parse error during alias expansion
21 years ago
Peter Stephenson
4c149a8abc
18252: pass ignoreeof as flag to zleread
22 years ago
Oliver Kiddle
5d11abfa3b
16492: add RPROMPT2 variable for right prompts in multi-line commands
23 years ago
Clint Adams
6feb3f57f4
16361: include <stdio.h> to avoid implicit declarations.
23 years ago
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)
24 years ago
Peter Stephenson
c292a3ae50
Sven: 13108: Handle traps synchronously
...
pws: 13109, 13111: clear up zle display when output produced in trap.
24 years ago
Wayne Davison
2e96c8f074
Removed the spaceflag variable.
24 years ago
Tanaka Akira
e74702b467
Initial revision
25 years ago