Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: unexpected end of string in findsep()
- X-seq: zsh-workers 7021
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: BUG: unexpected end of string in findsep()
- Date: Wed, 07 Jul 1999 17:58:31 +0200
- In-reply-to: ""Andrej Borsenkow""'s message of "Wed, 07 Jul 1999 19:28:58 DFT." <002401bec88d$6e8115d0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"Andrej Borsenkow" wrote:
> As a result of testing something else ...
>
> bor@itsrm2:~/test%> args "${(ps:'\C-@':)$(print -N *)}"
> 1
> DBI
> BUG: unexpected end of string in findsep()
> BUG: unexpected end of string in findsep()
I think the bug is in the error message: at the point it's actually
testing I don't see any reason why there shouldn't be the end of the
string. Maybe the patch below is what was intended.
By the way, you actually just need:
args "${(ps:\C-@:)$(print -N *)}"
since the single quotes are taken as literal characters inside the double
quotes. It seems to work without single quotes with the double quotes just
around the command substitution, too. I suspect trying to quote the
separation string is going to be problematic, because it isn't untokenized
properly. But until you can find something that doesn't work that
should...
--- Src/utils.c.fs Wed Jul 7 17:49:36 1999
+++ Src/utils.c Wed Jul 7 17:49:52 1999
@@ -1735,10 +1735,11 @@
if (!*t)
return i;
if (*(*s)++ == Meta) {
- (*s)++;
#ifdef DEBUG
- if (! **s)
+ if (! *(*s)++)
fprintf(stderr, "BUG: unexpected end of string in findsep()\n");
+#else
+ (*s)++;
#endif
}
}
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author