mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
18836: read with metafied delimiter didn't work.
This commit is contained in:
parent
9deb9a4e96
commit
2d2ce4ecc2
3 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-07-09 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 18836: Src/builtin.c, Test/B04read.ztst: `read -d' failed with
|
||||||
|
metafied delimiters, in particular null.
|
||||||
|
|
||||||
2003-07-07 Peter Stephenson <pws@csr.com>
|
2003-07-07 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* 18824: Functions/Zle/kill-word-match: deleted to the end
|
* 18824: Functions/Zle/kill-word-match: deleted to the end
|
||||||
|
|
|
||||||
|
|
@ -4231,7 +4231,8 @@ bin_read(char *name, char **args, Options ops, int func)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OPT_ISSET(ops,'d')) {
|
if (OPT_ISSET(ops,'d')) {
|
||||||
delim = *OPT_ARG(ops,'d');
|
char *delimstr = OPT_ARG(ops,'d');
|
||||||
|
delim = (delimstr[0] == Meta) ? delimstr[1] ^ 32 : delimstr[0];
|
||||||
if (SHTTY != -1) {
|
if (SHTTY != -1) {
|
||||||
struct ttyinfo ti;
|
struct ttyinfo ti;
|
||||||
gettyinfo(&ti);
|
gettyinfo(&ti);
|
||||||
|
|
|
||||||
|
|
@ -63,3 +63,9 @@
|
||||||
0:read with timeout (no waiting should occur)
|
0:read with timeout (no waiting should occur)
|
||||||
>hello
|
>hello
|
||||||
>0
|
>0
|
||||||
|
|
||||||
|
print -n 'Testing the\0null hypothesis\0' |
|
||||||
|
while read -d $'\0' line; do print $line; done
|
||||||
|
0:read with null delimiter
|
||||||
|
>Testing the
|
||||||
|
>null hypothesis
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue