Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Alignment issue with multiple describes
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author