From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16687 invoked by alias); 21 Apr 2013 18:28:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31315 Received: (qmail 8440 invoked from network); 21 Apr 2013 18:28:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130421112734.ZM6597@torch.brasslantern.com> Date: Sun, 21 Apr 2013 11:27:34 -0700 In-reply-to: Comments: In reply to Felipe Contreras "Re: Alignment issue with multiple describes" (Apr 21, 3:31am) References: <130420232740.ZM12405@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Felipe Contreras Subject: Re: Alignment issue with multiple describes Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.