about summary refs log tree commit diff
path: root/Src/subst.c
Commit message (Collapse)AuthorAgeFilesLines
* 52878: Fix ${foo:^bar} where bar is an associative arrayMikael Magnusson2024-04-071-0/+3
|
* 52864: Change ${|var|...} to ${{var} ...}, limit local REPLY to ${|...}Bart Schaefer2024-04-011-44/+96
|
* 52759: ${ ... } trims one trailing newline; "${ ... }" preserves that newline.Bart Schaefer2024-03-171-2/+6
|
* 52612: %l replacment of zwarning() does literal string outputBart Schaefer2024-03-021-1/+3
|
* 52482: strip trailing newlines in emulation modes of ${ command; }Bart Schaefer2024-01-241-0/+6
|
* 52325: Clarify doc for edge cases of named references and nofork substitutionBart Schaefer2023-11-231-1/+1
| | | | Unposted whitespace change avoids a parse error in ${ ... } with comments.
* 52202: improve handling of quoting in ${var/pattern/replacement}Bart Schaefer2023-11-151-0/+7
|
* 52214: allow extra byte for nul terminator in allocationOliver Kiddle2023-10-111-1/+1
|
* 52169: a few more improvements of (#) flagJun-ichi Takimoto2023-09-271-8/+7
| | | | | | fix (#X) in C locale in FreeBSD, DragonFly, NetBSD. Negative values such as ${(#X):--1} are now error. UCS4 is limited to < 0x8000_0000 (in OSes without __STDC_ISO_10646__).
* 52176: metafy return from ${ ... } substitutionBart Schaefer2023-09-221-3/+4
|
* users/29160, workers/52156: Fix repetition of substitution modifier.Bart Schaefer2023-09-161-2/+4
|
* 52154, 52155: Implement, document, and test non-forking command substitution.Bart Schaefer2023-09-161-7/+150
| | | | | | Comprises workers/51957, 51985, 51987, 51988, 51993, 52131, 52139, plus fixes for return values, parse errors, and trailing newlines (which were incorrectly removed) in ${ ... }
* 52122 + 52129: fix (#) parameter expansion flagJun-ichi Takimoto2023-09-131-3/+10
| | | | Without the X flag, null string "" is substituted for bad math expression.
* 51816: add :S history modifier with pattern matchPeter Stephenson2023-06-061-3/+9
|
* 51509 (+ fix typo): Add ${(!)name} for the referred-to name of a named referenceBart Schaefer2023-03-061-7/+31
| | | | Extend ${!name} in ksh emulation for same
* 51483: Enable assignment and expansion of parameters with ksh-like namespace ↵Bart Schaefer2023-03-051-6/+9
| | | | prefixes.
* 51360: Initial implementation of named references.Bart Schaefer2023-02-121-1/+2
|
* 51350: ${(S)...//#%...} didn't match the whole stringPeter Stephenson2023-02-061-0/+3
|
* 51306: error message in ${unset?error} should be expandedPeter Stephenson2023-02-021-1/+5
|
* 51258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle2023-01-101-2/+9
| | | | in zattr
* 51212: remove STOUC() macroOliver Kiddle2022-12-161-3/+3
| | | | | This served as a workaround for ancient compilers where casts to unsigned char were broken.
* 49853 + 49882/49883: make "${arr[*]:off}" compatible with ksh/bashJun-ichi Takimoto2022-03-291-3/+18
|
* 49166: fix coredump in ${name:offset:length} with ill-formatted lengthJun-ichi Takimoto2021-07-191-5/+7
|
* 49102: Ignore dynamic directory name failure if NO_EXECPeter Stephenson2021-06-281-1/+1
|
* 48560: add TYPESET_TO_UNSET option to remove initialization of parametersBart Schaefer2021-04-181-1/+2
| | | | | | | | | | Changes typeset such that ${newparam-notset} yields "notset" and "typeset -p newparam" does not show an assignment to the parameter. This is similar to the default behavior of bash and ksh, with minor differences in typeset output. Also add tests for some POSIX incompatibilities plus minor changes for test harness robustness.
* 48379: Make the parameter expansion subscript flags parse error message, ↵Daniel Shahaf2021-04-081-3/+25
| | | | "error in flags", identify the location of the parse error.
* Unposted - fix commentBart Schaefer2020-09-131-1/+1
|
* 47364: Enable extendedglob in pattern with ${(*)name/pattern/replacement}Bart Schaefer2020-09-131-4/+15
| | | | Mikael Magnusson: 47382: Completion for 47364
* users/24971: ${(-)var} sorts on signed integersPeter Stephenson2020-07-031-0/+4
|
* 46100: Fix =subst before =(subst)Peter Stephenson2020-06-261-1/+1
| | | | | | This occurs with SH file expansion ordering. Add test.
* Support ${name:offset:length} with an empty offsetMikael Magnusson2020-05-121-5/+15
|
* 45583/0003: chrealpath: Let caller decide how the return value should be ↵Daniel Shahaf2020-03-251-2/+2
| | | | allocated.
* 45583/0002: chrealpath: Make symlink resolution optional.Daniel Shahaf2020-03-251-2/+2
|
* 45058: internal: Add symbolic names to possible values of zexit()'s ↵Daniel Shahaf2019-12-171-1/+1
| | | | "from_where" parameter. No functional change.
* 45004: Fix typos in commentsMartijn Dekker2019-12-111-6/+6
|
* 44435: Handling digita arguments for :h and :t.Peter Stephenson2019-06-201-10/+27
| | | | | | | Pick number of leading or trailing path components to substitute. Active in history, brace parameters, glob qualifiers. Add tests for all three environments.
* 43921: ${\var} should be an errorBart Schaefer2018-12-211-1/+1
|
* 43837 plus test from Daniel: Empty string in nested subst.Peter Stephenson2018-11-211-0/+2
| | | | Skip Nularg or there is a bogus character at the start.
* 43616: Various parameter setting and display fixes.Peter Stephenson2018-10-081-2/+2
| | | | | | Mostly to do with typeset -p and tied variables and their interaction. Some general tied variable fixes.
* 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
|