Subject: Re: [PATCH] _describe and literal \n
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Sat, 23 Jul 2016 18:27:05 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jul 24,  1:27am, Oliver Kiddle wrote:
} Subject: Re: [PATCH] _describe and literal \n
}
} Daniel Shahaf wrote:
} > Current master:
} >     % _f() { a=( $'foo:hello\nworld' $'bar:lorem\nipsum' $'baz:lorem\nipsum' ); _describe descr a }
} >     % f <TAB>
} >     baz  
} >     foo  -- lorem\nipsum
} >     bar  -- hello\nworld
} 
} I'm not especially fond of the \n escapes. Would prefer they were mapped
} to spaces. However, failing to group baz and foo is clearly wrong.

Happens with \t, \a, etc. as well, though not with e.g. a backslash before
a space.  So something odd is going on with the string comparisons; maybe
a shared global buffer is getting overwritten during sorting?