summary refs log tree commit diff
path: root/Src/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow short loops with "while"Peter Stephenson2018-04-231-1/+3
|
* 42365: Use .zwc file if timestamp identical to source.Martijn Dekker2018-03-051-4/+4
| | | | This can happen if the files are bundled together.
* 42110: Fix redirections between variable assignments at start of linePeter Stephenson2017-12-121-0/+4
|
* 41802 (minor tweaks): use heap during shell function call.Peter Stephenson2017-10-041-1/+2
| | | | | | Replaces stack for more efficient memory management. Also fix debug message when FUNCNEST is increased.
* 41633: Fix problem backgrounding function definitions.Peter Stephenson2017-09-041-1/+6
| | | | | Owing to being marked as simple sublists the instruction to background was ignored. This applied to anonymous functions.
* 41504: make empty strings work in case patterns with no leading parenthesisPeter Stephenson2017-08-091-10/+38
|
* 41402: Delay has_tokens() in ecstrcode as may not be neededSebastian Gniazdowski2017-07-091-1/+5
|
* 41402: Add hasher to ecstrcode to reduce string comparisonsSebastian Gniazdowski2017-07-091-1/+5
|
* 40173: Off-by-one error checking for {varid}.Peter Stephenson2017-05-081-1/+1
| | | | | This caused a single unprintable character in braces before a redirection to be treated as an indentifier.
* users/22688: Allow mixing redirs and arguments after anon functions.Peter Stephenson2017-05-081-4/+15
| | | | | These are parsed differently from the case of normal functions which can't take normal arguments at that point.
* Fix combination of HERE document and |&.Peter Stephenson2017-05-081-1/+1
| | | | | | | | A missing flag setting up the HERE document mean that the size of the wordcode needed to append the 2>&1 was counted incorrectly, so the resulting wordcode was garbled. Add test.
* 40760: Always tokenize unquoted - to Dash.Peter Stephenson2017-03-071-14/+27
| | | | | | This fixes use of pattern match character ranges in unusual contexts. Attempt to detect a tokenized - in cases where we don't care.
* 40453: signal handler safety for callers of patcompile(PAT_STATIC), which is ↵Barton E. Schaefer2017-01-291-0/+1
| | | | not re-entrant.
* Add features associated with autoloading a function using an absolutePeter Stephenson2017-01-111-9/+15
| | | | | | | | | | | | | path. -d defaults to normal fpath -r remembers the path without actually loading. May be combined with -d. -R does the same but it's an error if not found -X can now take a directory path: this is used to output not yet loaded functions that have an associated path.
* 40306 with doc tweaks: Change behaviour expanding alias in () function ↵Peter Stephenson2017-01-101-0/+14
| | | | | | | definition. Now an error unless the () is part of the same error as the name. Add ALIAS_FUNC_DEF option to allow it again.
* 39777: $() is a valid empty command substitutionPeter Stephenson2016-10-301-1/+1
|
* 39332: support ksh's [[ -v varname ]] condition for checking if variables ↵Oliver Kiddle2016-09-161-2/+2
| | | | are set
* unposted: remove duplicated assignmentOliver Kiddle2016-09-151-1/+0
|
* 39292: Distinguish "=" and "==" tests in output.Peter Stephenson2016-09-131-2/+7
| | | | | This is both in xtrace output and shell code rebuilt from internal structures.
* 38111: Remove redundant return values in parsing.Peter Stephenson2016-03-071-11/+4
| | | | Return values from par_list() and par_list1() are no longer used.
* 38106: if...then if...else should be a parse error.Barton E. Schaefer2016-03-061-1/+1
|
* 37700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax.Daniel Shahaf2016-01-291-0/+10
|
* 37469: do NOT allow semicolons in place of line breaks in conditionalsBarton E. Schaefer2015-12-311-14/+16
|
* 37468: allow line breaks in more places in [[ ... ]]Barton E. Schaefer2015-12-311-8/+12
|
* 36974: fix some functions with empty argument listsPeter Stephenson2015-10-271-1/+1
|
* 36566: check for regular file before lseek()Barton E. Schaefer2015-09-191-0/+3
|
* unposted: fix up for 5.0.8-test-2 zsh-5.0.8-test-2Peter Stephenson2015-08-211-1/+1
|
* 36265 plus FAQ: fix alias expansion after "function"Peter Stephenson2015-08-211-2/+3
| | | | | | | Owing to interesting historical parsing, names after the first were treated as command words so had non-global aliases expanded. Add an FAQ note that use of the function keyword works around other alias problems
* 36022 fix bug that some loop constructs could not be interrupted, revise ↵Barton E. Schaefer2015-08-091-0/+8
| | | | | | | | | | | 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.
* 35643: Redirections after typeset assignments were broken.Peter Stephenson2015-06-281-0/+2
|
* various posts: Implement assignment parsing for typeset.Peter Stephenson2015-06-241-21/+110
| | | | | | | | | | | | Typeset assignments now work like raw assignments except for no "+=" and no GLOB_ASSIGN. Documented in typeset builtin doc and mentioned in release notes. Tests to ensure basic sanity. Enabled by default, can be turned off by "disable -r" with typeset family of commands.
* 35306: "test -z \(" failed due to parse confusionPeter Stephenson2015-05-271-8/+17
|
* 35250: Fix case documentation (SH_GLOB)Peter Stephenson2015-05-211-2/+2
|
* 35248: treat fully parenthised zsh patterns as complete case patterns againPeter Stephenson2015-05-211-10/+85
|
* 35184: Additional case fix for 35168.Peter Stephenson2015-05-181-2/+0
| | | | | Lexical analysis flags got screwed up after a "|", so we didn't parse patterns properly, in particular those with parentheses.
* 35168: Improve parsing of case patterns.Peter Stephenson2015-05-181-66/+23
| | | | | | | | | | | | | | "|" 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.
* 34921: handle error in recursive par_event().Peter Stephenson2015-04-171-0/+1
| | | | Here documents in an interrupted list caused bad juju.
* 34905: no parse error after keyboard interrupt.Peter Stephenson2015-04-171-1/+1
| | | | | | | | Handled generally, though only showing up in special nested cases. Also fix ZLE so it doesn't cancel the interrupt flag when not actually returning from a local keymap.
* 34514: Back out 34485, an alternate solution needs to be worked out.Barton E. Schaefer2015-02-121-2/+4
| | | | (Tweaked to keep the unrelated hunk of the E01 test.)
* 34485: More rationalisation for anonymous functions.Peter Stephenson2015-02-091-4/+2
| | | | | | | | Don't attempt to treat as "simple" case as there are too many hidden problems. Pull out some post-execution functions to a common case in execcmd().
* Rearrange context saving.Peter Stephenson2015-01-091-3/+80
| | | | | | | Variables are now associated with the module that declares them, being initialised and saved/restored there. However, as many variables are used for communication between modules, many of them are set in multiple places, so the assignment is ambiguous.
* Fix command substitutions to parse contents as they are read in.Peter Stephenson2015-01-081-9/+20
| | | | | | | Do this by refactoring misnamed lexsave()/lexrestore() to allow continuity of history and input. Add test.
* 33876: etc.: Separate errors and keyboards interruptsPeter Stephenson2014-12-111-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* unposted: fix compiler set-but-not-used warning.Wayne Davison2014-11-281-2/+4
|
* 33346: another bit of the 33345 repairBart Schaefer2014-10-031-1/+2
|
* 33345: fix anonymous function complex command handling.Peter Stephenson2014-10-031-83/+84
| | | | | | Longstanding problem caused simple anonymous function incorrectly to reset the overall "complext" state, causing wordcode to be diverted into execsimple(), which caused a crash 'cos ist wasn't simple.
* unposted: comments in previous commit were reversedPeter Stephenson2014-10-031-4/+4
|
* 33343: Variant anonymous function synax with arguments.Peter Stephenson2014-10-031-7/+24
| | | | Don't expand arguments as if in command position. Test.
* 33285: apply function definition redirections at executionPeter Stephenson2014-09-291-9/+78
|
* 33242: tokens following if, for, repeat, while aren't in command positionPeter Stephenson2014-09-261-2/+14
|