* BUG: unexpected end of string in findsep()
@ 1999-07-07 15:28 Andrej Borsenkow
1999-07-07 15:58 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1999-07-07 15:28 UTC (permalink / raw)
To: ZSH workers mailing list
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()
This is pws-25 with
6962 6966 6967 6968 6969 6970 6971 6973 6974 6975 6977
6979 6981 6982 6984 6986 6987 6992 6995 6996 6998 7000
7001
/andrej
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG: unexpected end of string in findsep()
1999-07-07 15:28 BUG: unexpected end of string in findsep() Andrej Borsenkow
@ 1999-07-07 15:58 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-07-07 15:58 UTC (permalink / raw)
To: ZSH workers mailing list
"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@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-07-07 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-07 15:28 BUG: unexpected end of string in findsep() Andrej Borsenkow
1999-07-07 15:58 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).