Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: splitting with empty separator.



On May 15, 12:59pm, Sven Wischnowsky wrote:
} Subject: PATCH: Re: splitting with empty separator.
}
} > Hm.  Splitting with empty separator generates curious result.
} > Maybe a metafied character is splitted?
} 
} Yes, seems as if it was only missing for the special case of a given
} but empty separator string.

Hm again.

Here's the 3.0.8 prelease with 11368 applied:

zagzig% a="$(print -P '\0')"
zagzig% b=(${(s::)a}); print $#b
1
zagzig% print -R - "$b" | cat -v
^@

Now here's 3.1.7-pre-3 with 11368 applied:

zagzig% a="$(print -P '\0')"
zagzig% b=(${(s::)a}); print $#b
2
zagzig% print -R - "$b" | cat -v
^@ 
zagzig% print -R - "$a" | cat -v
^@

What's the second character in $b in 3.1.7-pre-3?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author