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

Bug somewhere in verbose output for completion listing

I expect this to be greeted with something like the cough from the back
of the room when Krusty the Clown tells a joke --- I can't reproduce
this reliably at the moment --- but something determining output width
in completion listings (I'm using the zsh/complist module) isn't being
reset properly.

After a while, the following:

_wtf () {
	local stuff
	stuff=('SpoobleOne:2012/11/02 Description of SpoobleOne'
               'SpoobleTwo:2013/02/13 Description of SpoobleTwo')
	_describe -t stuff 'Stuff to complete.' stuff
compdef _wtf wtf

starts producing completion listings in verbose mode (the default) with

zstyle ':completion:*' list-separator '#'

(hence the "#" below) that look like

Completing Stuff to complete.
SpoobleOne                                                                                               # 
SpoobleTwo                                                                                               # 

From that point on this happens every time.  In case they get wrapped,
there are only three lines there, the second and thrid long with lots of
spaces between the completion and what should be the description, which
is missing.

This doesn't happen when I first start the shell; I get the expected

Completing Stuff to complete.
SpoobleOne     # 2012/11/02 Description of SpoobleOne
SpoobleTwo     # 2013/02/13 Description of SpoobleTwo

I think some extra long output from _describe or similar is causing it
to go haywire thereafter.  In my case that seems to be to do with long
completions generated by _perforce, but it's unlikely to be specific to
that.  I suspect some static in complist isn't being reset: I have a
memory the logic is a bit tortuous.

If I find a moment I'll try to make it more reproducible (although
simply attaching to a running shell might be good enough to track it


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