1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 05:00:59 +01:00

39028: more join/split cases fixed and tested.

This commit is contained in:
Barton E. Schaefer 2016-08-12 00:55:32 -07:00
parent 4234fccef6
commit 68e14c41f2
3 changed files with 17 additions and 5 deletions

View file

@ -3461,11 +3461,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
val = sepjoin(aval, sep, 1);
isarr = 0;
ms_flags = 0;
} else if (force_split && nojoin == 2) {
} else if (force_split && (spsep || nojoin == 2)) {
/* Hack to simulate splitting individual elements:
* first join on what we later use to split
* forced joining as previously determined, or
* join on what we later use to forcibly split
*/
val = sepjoin(aval, spsep, 1);
val = sepjoin(aval, (nojoin == 1 ? sep : spsep), 1);
isarr = 0;
}
}