zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: Alignment issue with multiple describes
Date: Sun, 21 Apr 2013 11:27:34 -0700	[thread overview]
Message-ID: <130421112734.ZM6597@torch.brasslantern.com> (raw)
In-Reply-To: <CAMP44s0mnhRbq6pfhKDAE_moVyab0cR2tvuOmVzPjmE1f49S-g@mail.gmail.com>

On Apr 21,  3:31am, Felipe Contreras wrote:
}
} > That you've chosen not to display the groups separately doesn't mean
} > they aren't grouped internally.
} 
} Well, I didn't choose it, that's the way it is by default.

Yes, so that a simple zstyle setting can be used to alter display order,
rather than having to rewrite the shell functions.
 
} That is indeed very interesting, but to me, it's a bug that the output
} of the first completion is not the same as the second. And that it
} also depends on the order of the _describe commands. The completion
} clearly waits until all the _describe commands have been issued, and
} then renders them (ordered), so couldn't this maximum width be
} calculated at that point?

No.  The display layout is calculated as each group is created and is
stored with the data structures.  The render-time code is relatively
dumb (except for all the smarts about manipulating the terminal device
for coloring and so on) and just spits out what the data structures say.
As far as I can tell (and I'm by no means the person most familar with
this code [*]) the layout of each group is calculated without reference
to the other groups except for static globals that keep track of the
widest column from any group encountered so far.

[*] Unfortunately the person most familiar with this code has not been
active in zsh development for 12 years.  On the other hand, it's been
12 years and you're the first person ever to notice/mention this, so it
probably doesn't affect anyone's usage of the shell.


  reply	other threads:[~2013-04-21 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21  3:03 Felipe Contreras
2013-04-21  3:03 ` Felipe Contreras
2013-04-21  6:27 ` Bart Schaefer
2013-04-21  8:31   ` Felipe Contreras
2013-04-21 18:27     ` Bart Schaefer [this message]
2013-04-21 20:59       ` Felipe Contreras
2013-04-21 21:09         ` Mikael Magnusson
2013-04-21 22:00         ` Felipe Contreras
2013-04-22  6:59         ` Bart Schaefer
2013-04-22  7:30           ` Felipe Contreras

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=130421112734.ZM6597@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=felipe.contreras@gmail.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).