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

Re: arr=('') broken



> Assigning empty strings to arrays (set -A still works OK) was broken
> by the changes in untokenisation.  This broke my multicomp function.
> 
> % sofar=('')
> % print $#sofar
> 0
> 
> The patch should be something like the following.  I've written it
> this way on the assumption that if we get as far as the array code,
> the list must have passed through globlist and hence has had unwanted
> elements pruned already.  As I understand it, globlist() now always
> returns untokenised text, and one needs to be careful not to
> untokenise twice which can in principal do bad things to
> eight-bit-cleanliness, which is why I added the first hunk and removed
> the untokenize() in the second hunk.

I also discovered this bug and fixed yesterday :-) in a bit different way.
There is no problem calling untokenize twice.  Untokenize does not affect
8-bit cleannes.  8-bit conversion is only done when zsh communicates with
the outer world.

zsh-3.0-pre1 will be out today which will have this fixed.

Zoltan




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