Peter Stephenson
0ac87e3f59
34641: make it possible to alias tokens
2015-03-04 15:56:17 +00:00
Peter Stephenson
52e938bac9
34570: Another nasty command / math substituion thing.
...
Mark arithmetic substitutions with tokens to make sure the substitution
go knows what to do. Before it was guessing by counting the
parentheses at the end.
2015-02-19 10:22:40 +00:00
Peter Stephenson
126fb61c7c
34560: Fix $(( that's actually a multiline cmd subst.
2015-02-16 17:16:57 +00:00
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.
2015-02-14 10:43:10 -08:00
Peter Stephenson
c6c9f5daf2
34322: bug with interface to parsestr() etc.
...
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +00:00
Peter Stephenson
e34ce85151
34319: fix alias expansion in history for command substitution
2015-01-18 16:43:26 +00:00
Peter Stephenson
f2a2f28f7b
32413: turn off history word marking in cmd subst
2015-01-16 20:12:40 +00:00
Peter Stephenson
db05cc51fa
34304: improve use of new cmd subst in completion
2015-01-16 13:20:05 +00:00
Peter Stephenson
968dd7387c
34234: use structures for normal and raw lexical buffer state
2015-01-11 19:12:58 +00:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
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.
2015-01-09 21:33:39 +00:00
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.
2015-01-08 12:24:00 +00:00
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.
2014-12-11 09:41:17 +00:00
Jun-ichi Takimoto
45d0046d8f
33940: handle backslash-meta correctly in lexer
2014-12-10 08:20:40 +09:00
Barton E. Schaefer
8727049674
33298: make lexrestore() more signal-safe
2014-09-30 20:34:58 -07:00
Peter Stephenson
920db696cb
32789: --enable-zsh-valgrind allows analysis of heap allocation
2014-06-24 18:50:50 +01:00
Peter Stephenson
31c5c7bb11
unposted: fix previous commit: ihwend -> hwend
2013-07-22 21:00:50 +01:00
Peter Stephenson
6533ae0719
31559: Fix history line problem with aliases and comments
2013-07-22 20:58:57 +01:00
Peter Stephenson
64e925bd65
30783: We don't want leading "="s to be active when
...
tokenising strings that aren't going to be treated as command line
arguments
2012-11-08 12:28:11 +00:00
Peter Stephenson
eb562c9f2c
30715: use enum lextok for variables containing lexical tokens
2012-10-05 21:35:05 +00:00
Peter Stephenson
61b9529ff8
users/17310: we can't treat < after [ as a normal character.
...
Document problem and test for case that needs to work.
2012-10-03 18:11:12 +00:00
Peter Stephenson
76590bd93c
users/17304: angle brackets aren't associated with special parsing
...
inside square brackets
2012-10-02 12:46:45 +00:00
Peter Stephenson
e3182c18de
29955++: IGNORE_CLOSE_BRACES option
2011-12-08 19:42:07 +00:00
Peter Stephenson
724fd07a67
29934: Stef van Vlierberghe: uninitialised memory after lexer realloc
2011-12-03 17:24:45 +00:00
Peter Stephenson
3dba9a8614
29776: fix case of double quotes in double-quote-style
...
parsing where end character is something else
2011-09-15 14:04:51 +00:00
Peter Stephenson
962624e8c3
29491: remove some variables set but not used
2011-06-19 16:26:10 +00:00
Mikael Magnusson
72cb7cfc6f
29307, 29308 + replies: Fix some doubled words in docs and comments.
2011-05-19 16:10:46 +00:00
Peter Stephenson
655370ff3c
28799: lexical analyser didn't stop early enough with completion words
2011-02-24 13:48:47 +00:00
Peter Stephenson
73ebca4fe9
28783: allow parentheses to be special in more places with SH_GLOB
2011-02-21 11:32:47 +00:00
Peter Stephenson
c8d07027c8
28537: fix word splitting on "((" when it was nested subshells rather than
...
arithmetic
2010-12-19 17:42:09 +00:00
Peter Stephenson
ef5cf45780
unposted: another neatening of lexflags use in ZLE
2010-12-14 10:40:42 +00:00
Peter Stephenson
ebcead7543
lexsave/lexrestore lexflags
...
add new LEXFLAGS_ZLE
2010-12-14 10:35:38 +00:00
Peter Stephenson
eab4f9a83c
28528: Rearrange zleparse to lexflags
...
Add (z+n+)
2010-12-14 09:59:04 +00:00
Peter Stephenson
5858e79f4d
28526: remove bogus newline with stripped comment zplitting
2010-12-13 11:20:46 +00:00
Peter Stephenson
0a5702457b
28510: add (z+c+) and (z+C+) parameter flags
2010-12-12 22:44:50 +00:00
Peter Stephenson
23bdfc7fd2
28418: add ${NAME:OFFSET:LENGTH} substitution
2010-11-18 10:07:55 +00:00
Peter Stephenson
f1495f5099
28259: Finally fix some ancient problems with here-documents
2010-09-14 14:46:26 +00:00
Peter Stephenson
edc01c0455
Mikael: 27929 + doc: global aliases shouldn't trigger HIST_IGNORE_SPACE
2010-04-28 08:55:35 +00:00
Peter Stephenson
08dec290d4
Fix ZLE access to pushed history line
2010-03-22 16:22:13 +00:00
Peter Stephenson
b397fbbe7a
27556: sanitize more variables in lexsave()
...
avoiding crashes in inner loops
2010-01-04 12:21:06 +00:00
Peter Stephenson
8e25f4449f
26675: add POSIX_ALIASES option
2009-03-03 17:26:03 +00:00
Peter Stephenson
a85db68271
26622: improve comments within $(...) and add test
2009-02-27 10:23:58 +00:00
Peter Stephenson
3d63a33407
26617 c.f. Tomáš Smetana, 26610: comments weren't handled in $(...)
2009-02-26 23:01:48 +00:00
Peter Stephenson
10182c766b
c.f. 26586: rename yylex to zshlex and yytext to zshlextext
2009-02-25 10:23:58 +00:00
Peter Stephenson
14231691e1
26061: fix clash between process subst and numeric glob
...
26062: additional compmatch change, missed from 26047
2008-11-18 10:07:31 +00:00
Peter Stephenson
35a8612f21
26042 with some fixes from 26043 (Mikael):
...
allow <(...) and >(...) to occur in the middle of strings
and =(...) to have extra text following
2008-11-13 21:18:14 +00:00
Peter Stephenson
2e3363ef7d
25571: when parsing use line numbers for the start of a token, not the end
...
add test and move debug trap tests to new file
2008-08-31 19:50:47 +00:00
Peter Stephenson
25413054c1
24699: bug with ${(Q)...} on initial ">"
...
bug with ${(z)...} on string with unterminated "("
2008-03-08 01:20:49 +00:00
Peter Stephenson
fd2e321313
24588: tweak glob qualifier completion
...
24590: turn down error reporting when unquoting
2008-02-23 18:33:57 +00:00
Peter Stephenson
1ac4f6a77f
unposted: minor typo
2007-12-17 14:20:25 +00:00
Peter Stephenson
6176062298
24271: handle parse failures in command substitution better
2007-12-16 22:20:31 +00:00
Peter Stephenson
db3ba137b3
23795: improve ${(Q)...} with $'..'
2007-08-23 22:04:25 +00:00
Peter Stephenson
83cbc075ac
23757: suppress correction of command words followed by ()
2007-08-14 11:51:16 +00:00
Peter Stephenson
023f6ce4e1
23511: error if here document too large
2007-06-03 17:44:20 +00:00
Peter Stephenson
61a5c826c8
23126, modified: bug in zle history inside $( and $((
2007-01-23 16:07:46 +00:00
Peter Stephenson
de272e0309
23115: ";|" at end of case clause causes later patterns to be tested
2007-01-19 21:36:00 +00:00
Peter Stephenson
94bdf92a06
23097: splitting of $'...' strings in completion
2007-01-08 22:05:54 +00:00
Peter Stephenson
f50dfd61f6
23051: ${(Q)...} of RCQUOTE expression failed with DEBUG active
2006-12-13 18:49:06 +00:00
Peter Stephenson
4a67f24798
22544: Improve use of ztype tests for multibyte characters. Add
...
POSIX_IDENTIFIERS option to control allowability of multibyte
alphanumeric characters in parameter and module names.
2006-07-10 13:08:22 +00:00
Peter Stephenson
dd5602f59b
22474: use variable argument lists to improve error message handling
2006-05-30 22:35:03 +00:00
Wayne Davison
4cb83571c4
Changed some structures to avoid gcc's type-punned warnings.
2006-03-07 21:30:36 +00:00
Peter Stephenson
cca66ab341
21862/21863: GLOB_SUBST shouldn't swallow up backslashes in parameter
...
substitutions that don't match anything.
2005-10-11 16:48:05 +00:00
Peter Stephenson
2a888b3d5a
c.f. 21590: metafy_line()/unmetafy_line() now support wide characters
2005-08-10 10:56:40 +00:00
Peter Stephenson
88a37cc187
c.f. 20675: improve zle as a basis for Unicode.
...
unposted: update version to 4.2.3-dev-1
2005-01-14 13:04:47 +00:00
Oliver Kiddle
95231270ed
19595: rename DO to DOLOOP to avoid conflict with curses.h on Tru64 5.1
2004-03-11 14:25:12 +00:00
Peter Stephenson
3ffb3ad2f2
19014: add alias -s suf=handler
2003-09-03 10:15:32 +00:00
Peter Stephenson
b38f3c9a17
18938: Export some data symbols.
2003-08-11 10:45:08 +00:00
Peter Stephenson
74f47913da
18864: unnecessary space with ${(Q)...}
2003-07-17 09:44:38 +00:00
Bart Schaefer
d4c7657014
17760: Fix case-pattern parsing bug in sh emulation.
2002-10-06 18:38:14 +00:00
Oliver Kiddle
af0697b705
17503: fix various typos and spelling mistakes in source code comments
2002-08-05 12:35:59 +00:00
Sven Wischnowsky
3013e98ca4
fix completion after var+= to use value context (16418)
2002-01-08 15:33:23 +00:00
Oliver Kiddle
52b8303537
16353: add += parameter assignments
2001-12-17 17:17:38 +00:00
Bart Schaefer
bc1bdea9db
Fix PS2 for dquote nested in braceparam.
2001-08-27 07:31:37 +00:00
Bart Schaefer
fc4511ecb7
Fix subscripting bug with backslash-double-quote.
2001-04-23 15:30:22 +00:00
Bart Schaefer
219674c48b
More parameter/subscript cleanup.
2001-04-21 18:49:12 +00:00
Bart Schaefer
220ad9aa23
Parameter repairs, mostly for subscripting.
2001-04-20 06:13:35 +00:00
Sven Wischnowsky
684c9eebe5
make the parser use real memory for the ecbuf to avoid having hrealloc() throw away lots of memory (13576)
2001-03-06 13:00:40 +00:00
Sven Wischnowsky
061c1ce912
add `aliases' option to be able to disable alias expansion (13554)
2001-02-28 09:12:54 +00:00
Peter Stephenson
0c96a1b963
Joel Smith: 13230: avoid name clashes with Linux kernel
2000-12-05 10:34:23 +00:00
Sven Wischnowsky
b97dd45909
missing mod_export (12613)
2000-08-14 12:53:17 +00:00
Wayne Davison
9e7b3f1d25
If an alias starts with a space, set aliasspaceflag to 1 instead of
...
calling remhist().
2000-07-19 20:42:37 +00:00
Wayne Davison
2e96c8f074
Removed the spaceflag variable.
2000-07-18 07:49:16 +00:00
Sven Wischnowsky
c3082d546e
slightly improved (z) flag for parsing conditions; recognising glob flags in conditions still doesn't work (12237)
2000-07-13 08:42:10 +00:00
Sven Wischnowsky
d861bb9805
fix for (z) flag, don't take # as comment (12228)
2000-07-12 10:31:29 +00:00
Sven Wischnowsky
4900804b61
make (e) flag be silent unless (X) is given, too (11768)
2000-06-06 08:35:54 +00:00
Peter Stephenson
9121d78354
11561: no RC_QUOTES in $'..'
2000-05-24 17:20:26 +00:00
Sven Wischnowsky
7f9f81f3e2
save and restore more variables in bufferwords(); move gotword() into core (11523)
2000-05-23 08:20:56 +00:00
Sven Wischnowsky
1f86bccc2d
parse_subst_string() should use modified version of `len' (11145)
2000-05-04 10:44:24 +00:00
Sven Wischnowsky
4f80c3fedf
save and restore `len' in lexsave/restore (11142)
2000-05-04 08:43:30 +00:00
Andrew Main
181811bf80
zefram2: Src/lex.c: Support "3&> foo" etc.
2000-04-06 17:21:52 +00:00
Andrew Main
835572ae23
10444: Src/lex.c, Src/pattern.c: Insist on proper syntax
...
for numeric globbing (with the "-"). Also fix the bug whereby
"echo 1<2-3>" would lose the "1".
2000-04-04 01:16:25 +00:00
Tanaka Akira
e74702b467
Initial revision
1999-04-15 18:05:38 +00:00