summaryrefslogtreecommitdiff
path: root/Src/lex.c
AgeCommit message (Collapse)AuthorFilesLines
2024-08-15unposted: fix parsing of Bang token in value side of array element assignmentBart Schaefer1-1/+2
2024-04-0152864: Change ${|var|...} to ${{var} ...}, limit local REPLY to ${|...}Bart Schaefer1-1/+1
2023-11-1552202: improve handling of quoting in ${var/pattern/replacement}Bart Schaefer1-21/+32
2023-09-1652154, 52155: Implement, document, and test non-forking command substitution.Bart Schaefer1-12/+60
Comprises workers/51957, 51985, 51987, 51988, 51993, 52131, 52139, plus fixes for return values, parse errors, and trailing newlines (which were incorrectly removed) in ${ ... }
2023-03-0551483: Enable assignment and expansion of parameters with ksh-like namespace ↵Bart Schaefer1-1/+1
prefixes.
2022-12-1651212: remove STOUC() macroOliver Kiddle1-5/+5
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-11-08users/28338: command substitution with alias edge case.Peter Stephenson1-0/+8
See added regression test.
2021-07-2349182: Turn off correction inside command substition.Peter Stephenson1-0/+1
In "A=$(PWD)" we dont't have the information to correct at the level of the PWD subcommand, so don't try to do it as this causes a crash.
2020-05-2345900: Fix issues with escaped newline in $-substitution.Peter Stephenson1-0/+21
2020-04-02Add SHORT_REPEAT optionMikael Magnusson1-1/+1
2019-12-1145004: Fix typos in commentsMartijn Dekker1-1/+1
2018-11-2943854: Set tok to LEXERR on generic parse error.Peter Stephenson1-0/+1
Needed by main loop which detects an error this way.
2018-10-2343695: minor but simple optmiisation to use existing string lengthSebastian Gniazdowski1-4/+4
2018-04-0442581(?): Fix ZLE inline history expansion.Peter Stephenson1-1/+1
Seen with magic-space. If there's a parse error in command subtitution we need to complete reading history to ensure the command line buffer is finished.
2018-01-0842245: Abort last word on interactve comment.Peter Stephenson1-1/+1
Last recorded word should be the previous one.
2017-10-1741902: ${(z)...} continues parsing on unmatched quote when CSH_JUNKIE_QUOTES ↵Barton E. Schaefer1-4/+10
is set Tests for 41902 and 41873
2017-10-1341873: temporarily disable effects of ${(Z:n:)...} for parsing $(...) within ↵Barton E. Schaefer1-1/+5
the parameter value Also fix minor typo in commit b3fa5c52 ChangeLog.
2017-08-0941504: make empty strings work in case patterns with no leading parenthesisPeter Stephenson1-3/+3
2017-04-2340995: Don't disable alias expansion when finding command substitution limitsPeter Stephenson1-3/+0
This is needed in some unusual cases in order to identify the exit condition without encountering a parse error.
2017-03-0740760: Always tokenize unquoted - to Dash.Peter Stephenson1-10/+6
This fixes use of pattern match character ranges in unusual contexts. Attempt to detect a tokenized - in cases where we don't care.
2016-11-0339815: Read input to end on parse error in $(...) inside a string.Peter Stephenson1-2/+11
This allows ${(z)} to output the whole string, although we can't do word splitting from the error onwards.
2016-09-0739185: Only set word begin for completion word if not alias.Peter Stephenson1-1/+1
This is consistent with other ZLE code in lex.c and fixes a crash in some completions involving aliases, e.g. if uncompleted quotes.
2016-06-22unposted: remove flag unneded from previous fixPeter Stephenson1-2/+1
2016-06-2238746: Fix suffix alias expansion recursion.Peter Stephenson1-3/+4
This was problematic if the expansion landed you back in command position. Delay marking the alias as out of use until the text that caused the expansion is finished.
2016-05-1038468: wb,we values in gotword() needed assignment in additional case to ↵Barton E. Schaefer1-0/+4
avoid core dump Bug introduced by 38248. Also fix ChangeLog entry for 38248 to correctly reference Src/lex.c
2016-04-0738248: fix word position calculation when completing on or just before a ↵Barton E. Schaefer1-3/+7
redirection operator The completion result is still in need of some repair; e.g., if the first thing on the line is the redirection, completion before it is not taken to be in command position, and in this and other cases a necessary space is not inserted between the completed word and the redirection.
2016-01-2937700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax.Daniel Shahaf1-2/+7
2016-01-2037705: don't turn - to Dash after start of brace parameterPeter Stephenson1-2/+4
2016-01-1937682: when SH_GLOB is set, do not parse bare parentheses in arguments as a ↵Barton E. Schaefer1-1/+1
pattern grouping.
2016-01-1937689: ! and ^ need to be tokenised in character setsPeter Stephenson1-11/+20
2016-01-1937678: Now possible to quote "-" in pattern rangePeter Stephenson1-6/+24
2015-11-1837145: suppress alias expansion in skipcomm()Barton E. Schaefer1-0/+3
Thus defer parsing aliases in $(...) et al. into the subshell
2015-11-1737128: work around alias expansion trashing subscript parsingPeter Stephenson1-6/+22
2015-09-2736669: fix ${(z)...} of an an incomplete math expression by restoring "((" ↵Barton E. Schaefer1-0/+9
at the front of the token
2015-07-2935953: fix handling of command substitution in math contextBarton E. Schaefer1-1/+5
2015-07-0235668: Improved fix for command/proc subst starting in alias.Peter Stephenson1-10/+16
Use input flag to suppress the unwanted backtracking. Add test for the extra case covered.
2015-07-0135667: fix command substitution that starts but doesn't finish in aliasPeter Stephenson1-4/+10
2015-06-2635615: fix completion after tyepsetPeter Stephenson1-0/+1
2015-06-24various posts: Implement assignment parsing for typeset.Peter Stephenson1-2/+2
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.
2015-05-2135248: treat fully parenthised zsh patterns as complete case patterns againPeter Stephenson1-2/+0
2015-05-1835168: Improve parsing of case patterns.Peter Stephenson1-0/+2
"|" 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-05-1535155: cmdpop() could be called erroneously on errorPeter Stephenson1-2/+4
2015-05-0635046: unwind cmdstack when erroring out of lexing a parameter expansion in ↵Barton E. Schaefer1-1/+4
braces
2015-04-1734905: no parse error after keyboard interrupt.Peter Stephenson1-4/+6
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.
2015-03-2934817: Catch some errors earlier when reading history.Peter Stephenson1-0/+2
Mostly for the case of an interrupt. Don't try to process words when we know something's gone wrong. Also abort history reading earlier on an interrupt.
2015-03-2834781: add implicit space after alias expansion of tokens that form words ↵Barton E. Schaefer1-0/+10
without spacing fixes crash when using completion immediately following such an alias
2015-03-2834804: refine POSIX_ALIAS change to preserve old behavior of [[ ]] conditionalsBarton E. Schaefer1-4/+1
2015-03-2734788: refine errflag handling in cmd_or_math()Barton E. Schaefer1-1/+1
2015-03-2234759: improve implementation of last commitPeter Stephenson1-6/+6
2015-03-2234758: fix yet more history / command subst interaction.Peter Stephenson1-0/+19
In general we need to wind back over the history text input inside command substitution because there's no level of the input mechanism between history and the lexer.