Commit Graph

142 Commits (master)

Author SHA1 Message Date
Bart Schaefer 76019f7174 52864: Change ${|var|...} to ${{var} ...}, limit local REPLY to ${|...} 2 months ago
Bart Schaefer e6ad117ccb 52202: improve handling of quoting in ${var/pattern/replacement} 6 months ago
Bart Schaefer 3aaef16569 52154, 52155: Implement, document, and test non-forking command substitution.
Comprises workers/51957, 51985, 51987, 51988, 51993, 52131, 52139, plus
fixes for return values, parse errors, and trailing newlines (which were
incorrectly removed) in ${ ... }
8 months ago
Bart Schaefer a9ba166216 51483: Enable assignment and expansion of parameters with ksh-like namespace prefixes. 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
Peter Stephenson 298919f43a users/28338: command substitution with alias edge case.
See added regression test.
2 years ago
Peter Stephenson 50dc7f2913 49182: Turn off correction inside command substition.
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.
3 years ago
Peter Stephenson 40723b3991 45900: Fix issues with escaped newline in $-substitution. 4 years ago
Mikael Magnusson 8923d2a618 Add SHORT_REPEAT option 4 years ago
Martijn Dekker c578f0a08b 45004: Fix typos in comments 5 years ago
Peter Stephenson ef20425381 43854: Set tok to LEXERR on generic parse error.
Needed by main loop which detects an error this way.
6 years ago
Sebastian Gniazdowski 5556e00c65 43695: minor but simple optmiisation to use existing string length 6 years ago
Peter Stephenson 3517e4a9a5 42581(?): Fix ZLE inline history expansion.
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.
6 years ago
Peter Stephenson 36fcaeb167 42245: Abort last word on interactve comment.
Last recorded word should be the previous one.
6 years ago
Barton E. Schaefer dcd4f02845 41902: ${(z)...} continues parsing on unmatched quote when CSH_JUNKIE_QUOTES is set
Tests for 41902 and 41873
7 years ago
Barton E. Schaefer 1fb6939b94 41873: temporarily disable effects of ${(Z:n:)...} for parsing $(...) within the parameter value
Also fix minor typo in commit b3fa5c52 ChangeLog.
7 years ago
Peter Stephenson cfd34c75ac 41504: make empty strings work in case patterns with no leading parenthesis 7 years ago
Peter Stephenson 68466f327e 40995: Don't disable alias expansion when finding command substitution limits
This is needed in some unusual cases in order to identify the exit
condition without encountering a parse error.
7 years ago
Peter Stephenson f3f8537cfa 40760: Always tokenize unquoted - to Dash.
This fixes use of pattern match character ranges in unusual contexts.

Attempt to detect a tokenized - in cases where we don't care.
7 years ago
Peter Stephenson 4073a6655c 39815: Read input to end on parse error in $(...) inside a string.
This allows ${(z)} to output the whole string, although we can't do
word splitting from the error onwards.
8 years ago
Peter Stephenson ef862262e7 39185: Only set word begin for completion word if not alias.
This is consistent with other ZLE code in lex.c and fixes a crash
in some completions involving aliases, e.g. if uncompleted quotes.
8 years ago
Peter Stephenson 7ae2deb437 unposted: remove flag unneded from previous fix 8 years ago
Peter Stephenson 954cdd77d7 38746: Fix suffix alias expansion recursion.
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.
8 years ago
Barton E. Schaefer c712e7511a 38468: wb,we values in gotword() needed assignment in additional case to avoid core dump
Bug introduced by 38248.

Also fix ChangeLog entry for 38248 to correctly reference Src/lex.c
8 years ago
Barton E. Schaefer b911398064 38248: fix word position calculation when completing on or just before a 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.
8 years ago
Daniel Shahaf bced1beb8c 37700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax. 8 years ago
Peter Stephenson 1c41f98aab 37705: don't turn - to Dash after start of brace parameter 8 years ago
Barton E. Schaefer cfa8d8bcad 37682: when SH_GLOB is set, do not parse bare parentheses in arguments as a pattern grouping. 8 years ago
Peter Stephenson ad16356e19 37689: ! and ^ need to be tokenised in character sets 8 years ago
Peter Stephenson 8eb9070d67 37678: Now possible to quote "-" in pattern range 8 years ago
Barton E. Schaefer 59235205c6 37145: suppress alias expansion in skipcomm()
Thus defer parsing aliases in $(...) et al. into the subshell
9 years ago
Peter Stephenson ca0cb17011 37128: work around alias expansion trashing subscript parsing 9 years ago
Barton E. Schaefer 4bed2cf256 36669: fix ${(z)...} of an an incomplete math expression by restoring "((" at the front of the token 9 years ago
Barton E. Schaefer c0a80171ee 35953: fix handling of command substitution in math context 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 dce1f33c02 35667: fix command substitution that starts but doesn't finish in alias 9 years ago
Peter Stephenson 77a0278bcc 35615: fix completion after tyepset 9 years ago
Peter Stephenson 39b28980f3 various posts: Implement assignment parsing for typeset.
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.
9 years ago
Peter Stephenson afb78f5d14 35248: treat fully parenthised zsh patterns as complete case patterns again 9 years ago
Peter Stephenson 52aeb9aaeb 35168: Improve parsing of case patterns.
"|" 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.
9 years ago
Peter Stephenson d52bf91659 35155: cmdpop() could be called erroneously on error 9 years ago
Barton E. Schaefer aa34d2f165 35046: unwind cmdstack when erroring out of lexing a parameter expansion in braces 9 years ago
Peter Stephenson 4508d25710 34905: no parse error after keyboard interrupt.
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.
9 years ago
Peter Stephenson f1c702f2a4 34817: Catch some errors earlier when reading history.
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.
9 years ago
Barton E. Schaefer 81ba837972 34781: add implicit space after alias expansion of tokens that form words without spacing
fixes crash when using completion immediately following such an alias
9 years ago
Barton E. Schaefer 7d2b53f65b 34804: refine POSIX_ALIAS change to preserve old behavior of [[ ]] conditionals 9 years ago
Barton E. Schaefer ab4065623a 34788: refine errflag handling in cmd_or_math() 9 years ago
Peter Stephenson f6be7bc19f 34759: improve implementation of last commit 9 years ago
Peter Stephenson 4fb669a72d 34758: fix yet more history / command subst interaction.
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.
9 years ago
Barton E. Schaefer 32b4cb0e73 34734: further aliasing adjustments and doc
restrict token aliasing (34641) to global aliases; tighten up POSIX_ALIASES to better match spec; update Aliasing doc to cover this and clarify older behavior

2015-03-18  Peter Stephenson  <p.stephenson@samsung.com>

	* 34723: configure.ac: turn off fixed site function directory if
9 years ago