about summary refs log tree commit diff
path: root/Src/subst.c
Commit message (Collapse)AuthorAgeFilesLines
* 43219 (except term{cap,info}.c): fix several memory leaksJun-ichi Takimoto2018-07-311-1/+1
|
* 42313: avoid null-pointer deref when using ${(PA)...} on an empty array resultJoey Pabalinas2018-01-231-1/+1
|
* 41877: Separate out SH_FILE_EXPANSION loop from parameter substitution.Peter Stephenson2017-10-131-16/+23
| | | | | Parameter substitution can add nodes that need to be rescanned by it, but not by file expansion, so the two don't play well together.
* 41828, 41830: skip SHFILEEXPANSION for new nodes added by stringsubst() in ↵Barton E. Schaefer2017-10-081-2/+17
| | | | prefork()
* Add typeset -p1, like typeset -p with newlinesPeter Stephenson2017-10-011-1/+3
|
* 41764 (test tweaked): allow [key]+=value when modifying arraysPeter Stephenson2017-09-271-4/+13
|
* 41747: Don't create hash entry if just checking existence.Peter Stephenson2017-09-251-4/+8
| | | | Pass a flag in indicating this case.
* Updates for ksh array element syntax.Peter Stephenson2017-09-241-7/+64
| | | | | | | | Move detection of key/value pairs down into prefork(). Detect normal array assignment and [key]=val array assignemnt separately. Mark key / value pairs with Marker and pass up flag. Deal with marked triads specially later on.
* 41661: Need to remove tokens before using bufferwords() for (z)Peter Stephenson2017-09-101-2/+6
|
* 40929 (replaces 40598): paramsubst() should always return scalar when ↵Barton E. Schaefer2017-04-021-13/+8
| | | | | | | | | PREFORK_SINGLE was passed in from prefork() Previous commit (74fe4d09) consumed too much of the input linked list, leading to later expansions being skipped. This commit converts from array to string sooner, but may thereby alter rc_expand_param and array element uniqueness behavior.
* 40832: fix $x:P when PWD=/Barton E. Schaefer2017-03-111-2/+10
|
* 40760: Always tokenize unquoted - to Dash.Peter Stephenson2017-03-071-17/+24
| | | | | | This fixes use of pattern match character ranges in unusual contexts. Attempt to detect a tokenized - in cases where we don't care.
* 40640: the (A) parameter flag forces array result even if assignment syntax ↵Barton E. Schaefer2017-02-251-0/+11
| | | | is not used
* 40598: paramsubst() should always return scalar when PREFORK_SINGLE was passedBarton E. Schaefer2017-02-201-1/+14
|
* 40593: SHWORDSPLIT + unset IFS should cause default splitting of $@Barton E. Schaefer2017-02-201-1/+2
|
* 40375: autoload with explicit path mustn't trash already loaded function.Peter Stephenson2017-01-181-4/+4
| | | | | Also remove unnecessary dupstring() on already duplicated string when expanding =cmd.
* users/22319: ${ary1:^ary2} should not change isarr state of expansion of ary1Barton E. Schaefer2017-01-031-2/+4
| | | | Unless ary1 is made from a scalar, semantics of (@) in double quotes is lost.
* 40071: change Dash back to "-" before evaluating named directory expansionsBarton E. Schaefer2016-12-031-0/+2
|
* 40034: clear badcshglob when ignoring errorsBarton E. Schaefer2016-11-291-1/+3
|
* 40035: Cosmetic fixes for comments and documentation.Eitan Adler2016-11-291-1/+1
| | | | Mostly fixes to doubled words.
* 39949: Special case for "-" in directory names.Peter Stephenson2016-11-151-8/+8
| | | | | It can be sh-tokenized to Dash to allow for appearing in ranges after substitution, so needs to be turned back to "-" in that case.
* 39579: Fix string calculation for parameter quoting.Julien Cretin2016-10-061-3/+3
| | | | | Where there was no closing quote the size or position of the null could be wrongly calculated.
* 34943: Fixes for "command" with multiple options.Peter Stephenson2016-09-291-1/+1
| | | | | | These need to combine properly, and alos "command -p" with either -v or -V needs to search for builtins and then using the default system path.
* zsh-users/21903: Fix ${...?...} in interactive shell.Peter Stephenson2016-09-141-0/+7
| | | | | On failure should abort back to top level, but we reset the error flag around commands. Add a hard error flag that's only reset at top level.
* 39252: internal: quotestring: Drop the 'e' parameter, which no caller uses.Daniel Shahaf2016-09-111-6/+6
|
* 39115: repair forced joining when (@) and (j) are used togetherBarton E. Schaefer2016-08-291-2/+3
|
* 39046 + 39061: New :P history modifier.Daniel Shahaf2016-08-221-0/+13
|
* 39035: ${(A)name=word} should expand as an array even when there is only one ↵Barton E. Schaefer2016-08-121-0/+1
| | | | element.
* 39028: more join/split cases fixed and tested.Barton E. Schaefer2016-08-121-3/+4
|
* 39019 (cf. PWS 39013): fix SHWORDSPLIT regression introduced by workers/29313Barton E. Schaefer2016-08-101-6/+15
| | | | Also add test cases for more join/split combinations
* 38973: Optimize indexing array parameters.Daniel Shahaf2016-08-011-4/+11
| | | | | | | | | | | % () { for 1 in $prefix/zsh/bin/zsh Src/zsh; do $1 -f -c 'a=( {1..1000000} ); repeat 3 time ( repeat 300 : $a[1] )'; done } ( repeat 300; do; : $a[1]; done; ) 1.68s user 0.01s system 98% cpu 1.718 total ( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.710 total ( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.714 total ( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total ( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total ( repeat 300; do; : $a[1]; done; ) 0.01s user 0.01s system 69% cpu 0.023 total
* 38599: skip the "no such named directory" warning when NO_EXEC is in effectBarton E. Schaefer2016-06-041-1/+1
|
* unposted: internal: Document modify().Daniel Shahaf2016-06-031-0/+13
|
* users/21352: ensure $'' doesn't get elided.Peter Stephenson2016-03-071-1/+5
| | | | | Assign nulstring to it if empty. Test for all forms of quotation marks.
* 37344: restore old printable quoting, add ${(q+)...}.Peter Stephenson2015-12-071-4/+10
| | | | | | The \C- form is only used inside quotedzputs(). ${(q+)...} outputs a quotedzputs() representation.
* 37206: fix ${(t)param} for "typeset -H param"Barton E. Schaefer2015-11-231-1/+1
|
* 37096: Another $${(P)...} tweak.Peter Stephenson2015-11-121-2/+17
| | | | Make a top level (P) work with nested ones, i.e. ${(P)${(P)...}...}
* 37094: Further tweaks to parameter name references.Peter Stephenson2015-11-111-3/+3
| | | | | | | | Safety in array test. Make nested references work. Add parameter tests.
* 37092: make nested ${(P)name} properly refer to parameter on returnPeter Stephenson2015-11-111-44/+70
|
* 37074: extend previous fix to over whitespace at endPeter Stephenson2015-11-071-14/+36
|
* 37073: another SH_WORD_SPLIT problem.Peter Stephenson2015-11-061-6/+34
| | | | | In cases like x${:- y} the space was simply removed instead of being used for splitting.
* 35694: fix handling of history modifiers applied across all elements of an ↵Barton E. Schaefer2015-07-061-2/+8
| | | | array parameter value
* 35343: Avoid $#name length handling for POSIX_IDENTIFIERSPeter Stephenson2015-05-311-1/+2
|
* 35326: $#- was misparsed as ${#-}Peter Stephenson2015-05-291-1/+1
|
* 35153: nested math substitutionPeter Stephenson2015-05-151-2/+11
|
* 35151: improved check for parameter q and b flagsPeter Stephenson2015-05-151-1/+2
|
* 35067: Add (b) parameter flag for pattern char backslashing.Peter Stephenson2015-05-101-2/+11
| | | | | | Doc tweak from Daniel in 35071. Includes test.
* 34606: fix up nested arithmetic substitutionPeter Stephenson2015-02-221-2/+18
| | | | | | | | Arithmetic within a parameter substitution is a special case that needs fixing with the introduction of the new Inparmath token. Add test.
* 34573: Safer failure to handle command substitutionPeter Stephenson2015-02-191-3/+7
|
* 34570: Another nasty command / math substituion thing.Peter Stephenson2015-02-191-11/+17
| | | | | | 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.