summaryrefslogtreecommitdiff
path: root/Src/input.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-2652244: Fix a batch of minor defects reported by Coverity.Bart Schaefer1-12/+0
Coverity defects 1547831, 1547826 (remove unused function), 1521551, 1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789, 1255787, 1255782, 1255750
2023-10-0352198: put back incorrectly removed zfree()Bart Schaefer1-0/+1
2023-09-1652153: mapfile without HAVE_MMAP should not trim newlinesBart Schaefer1-7/+37
2023-02-0251307: Improve error on attempt to define function from aliased namePeter Stephenson1-2/+3
2023-01-1051258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle1-1/+1
in zattr
2022-12-1651212: remove STOUC() macroOliver Kiddle1-4/+4
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-04-2850133: use read-ahead and lseek-rewind for efficient line-buffered inputBart Schaefer1-1/+23
2022-03-0349792: Non-interative shell input is line buffered.Peter Stephenson1-7/+14
2021-09-08unposted: add 'static' to shinsavestackJun-ichi Takimoto1-1/+1
2021-08-2749290: Replace stdio for buffered shell input.Peter Stephenson1-11/+111
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.
2021-04-1148504: use SEEK_ macros in fseek() callsOliver Kiddle1-2/+2
2018-09-2143511: Initialiase alias entry on input stack.Peter Stephenson1-0/+2
This didn't happen if neither history nor alias expansion was in use.
2017-06-1941322: reduce number of changes in signal queuing/blocking state during ↵Barton E. Schaefer1-3/+5
shingetline() to improve read speed
2017-01-1040306 with doc tweaks: Change behaviour expanding alias in () function ↵Peter Stephenson1-0/+27
definition. Now an error unless the () is part of the same error as the name. Add ALIAS_FUNC_DEF option to allow it again.
2016-12-0940117: Revert a hunk of 40035 that changed semantics incorrectly.Daniel Shahaf1-1/+1
2016-11-2940035: Cosmetic fixes for comments and documentation.Eitan Adler1-1/+1
Mostly fixes to doubled words.
2015-08-0936022 fix bug that some loop constructs could not be interrupted, revise ↵Barton E. Schaefer1-2/+10
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-07-2535910: Don't add to raw lex buffer if lex stopped.Peter Stephenson1-1/+2
This was causing a segmentation violation in completion when parsing an incomplete math expression, e.g. 'echo $((3*4)<TAB>'.
2015-07-0235668: Improved fix for command/proc subst starting in alias.Peter Stephenson1-1/+1
Use input flag to suppress the unwanted backtracking. Add test for the extra case covered.
2015-03-2634784: fix old bug with history word selectionPeter Stephenson1-9/+18
2015-03-2034752: another fix for history expansion in cmd substPeter Stephenson1-2/+14
2015-02-17Fix up memory allocation for previous patchPeter Stephenson1-4/+5
2015-02-1634560: Fix $(( that's actually a multiline cmd subst.Peter Stephenson1-2/+31
2015-02-1434543: Prevent crash on garbage bytes inside $(...)Barton E. Schaefer1-2/+4
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-01-1034220: new $(...) handling needs to back up over alias expansionPeter Stephenson1-0/+6
2015-01-08Fix command substitutions to parse contents as they are read in.Peter Stephenson1-5/+8
Do this by refactoring misnamed lexsave()/lexrestore() to allow continuity of history and input. Add test.
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-1/+2
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.
2013-10-2131869: reduce WINCH-twaddling in shingetline()Barton E. Schaefer1-2/+4
2013-04-3031350: block SIGWINCH nearly all the time, exceptBart Schaefer1-0/+2
when about to calculate prompts or do synchronous read, so syscalls are not interrupted by window size changes.
2010-12-20Paul 28538 / me 28540 / couple of unposted casts:Peter Stephenson1-1/+1
use char * for pointer arithmetic rather than void *
2010-03-2527827: fix infinite loop in recursive alias at end of parsed stringPeter Stephenson1-9/+12
2010-01-13Joakim Rosqvist: 27591 as modified in 27594:Peter Stephenson1-14/+26
KEYBOARD_HACK variable
2009-12-16Check the return value of all pipe(), read(), and write() calls.Wayne Davison1-1/+1
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.
2008-07-3125345, 25347: neaten interface from main shell to zlePeter Stephenson1-1/+2
2008-05-1225002: only ZLE should update attributes resulting from prompt expansionPeter Stephenson1-1/+1
2008-03-0824699: bug with ${(Q)...} on initial ">"Peter Stephenson1-0/+12
bug with ${(z)...} on string with unterminated "("
2006-05-3022474: use variable argument lists to improve error message handlingPeter Stephenson1-2/+2
2005-11-15Got rid of some unsigned-char/char pointer casts.Wayne Davison1-2/+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-6/+7
20150: commit ancient memory leak fix(?) in completion
2003-12-1519295: $CONTEXT zle parameterPeter Stephenson1-1/+4
2003-10-29a la 19209: zcalloc -> zshcallocPeter Stephenson1-1/+1
2003-08-1118941: history wrong after parse error during alias expansionPeter Stephenson1-0/+14
2003-02-1718252: pass ignoreeof as flag to zlereadPeter Stephenson1-2/+4
2002-01-3116492: add RPROMPT2 variable for right prompts in multi-line commandsOliver Kiddle1-1/+4
2001-12-1816361: include <stdio.h> to avoid implicit declarations.Clint Adams1-0/+4
2001-01-16remove 13108 (trap queues); replace with signal queueing to ensure that user ↵Sven Wischnowsky1-3/+1
signal handlers are only executed when it is safe to run them (13365)
2000-11-11Sven: 13108: Handle traps synchronouslyPeter Stephenson1-1/+3
pws: 13109, 13111: clear up zle display when output produced in trap.
2000-07-18Removed the spaceflag variable.Wayne Davison1-29/+41
1999-04-15Initial revisionTanaka Akira1-0/+530