zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Bug somewhere in verbose output for completion listing
Date: Thu, 03 Oct 2013 14:00:25 +0100	[thread overview]
Message-ID: <20131003140025.227f5bc1@pwslap01u.europe.root.pri> (raw)

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
down).

pws


             reply	other threads:[~2013-10-03 13:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03 13:00 Peter Stephenson [this message]
2013-10-03 13:32 ` Peter Stephenson
2013-10-03 22:54   ` Bart Schaefer
2013-10-03 14:50 ` Bart Schaefer
2013-10-03 15:09   ` Bart Schaefer
2013-10-03 16:19     ` Bart Schaefer
2013-10-03 16:20     ` Peter Stephenson
2013-10-03 16:34       ` Peter Stephenson
2013-10-04  4:01       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131003140025.227f5bc1@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).