diff options
-rw-r--r-- | Doc/Zsh/expn.yo | 4 | ||||
-rw-r--r-- | Src/subst.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index 7e35cd13e..a22296c84 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -817,6 +817,10 @@ access single words in the result, one has to use nested expansions as in `tt(${${(z)foo}[2]})'. Likewise, to remove the quotes in the resulting words one would do: `tt(${(Q)${(z)foo}})'. ) +item(tt(0))( +Split the result of the expansion on null bytes. This is a shorthand +for `tt(ps:\0:)'. +) enditem() The following flags (except tt(p)) are followed by one or more arguments diff --git a/Src/subst.c b/Src/subst.c index 67de61418..f67a745d8 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -1232,6 +1232,13 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) sep = "\n"; break; + case '0': + spsep = zhalloc(3); + spsep[0] = Meta; + spsep[1] = '\0' ^ 32; + spsep[2] = '\0'; + break; + case 's': tt = 1; /* fall through */ |