Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Alignment issue with multiple describes
- X-seq: zsh-workers 31303
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Alignment issue with multiple describes
- Date: Sat, 20 Apr 2013 22:03:05 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=Zec0V7qRqzdwvR6cT57yV2lQeVrxG6Lsg9Ba8uOlj6g=; b=fNgkSjwW77UuvRGdxFVOafN3Fr7mNWa1LtMjeT19wDrBMvA3dH6TPOOPTunnrQf8hc VKzk5edpooSPEJ4ioZQ9bsnh7IYpnVa/aU0BFhED5CrXrOlQfXgAl/t7hhozdV2D4op8 XzeHpDrRAv3Uv8WM8VdZoIljHBFkj8169WevWYDzzPwMWS8MXBY6JmKbj6TWVqLD+0fs SxwOq06+ysFwACJue3nTwNoRVpeRGe67HTDb1PSarL7SP78hxPpV3sqDZx1PLVd4FW8A MfYJzpFGk4CiRL8rUPx9SkrNDXWKjSVhSzIDK7U6+4r37PqECYQ0UI4fRNuahOQaWm69 +k6w==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
I'm trying to write a completion script for many multiple subcommands,
and I want to group them in different tags, which works more or less
fine, however, I've noticed a problem when using more than one
describe: the completion's description is aligned, but only to the
same description, even if they are not grouped.
For example, the script below throws this:
---
extraone -- extra command one
one -- command one
two -- command two
zbiggertoshowthealignissue -- extra command two
---
If the tags are group together, the problem is less noticeable, but as
soon as you enter the menu, the alignment changes again (to a proper
one).
You can even see this with zsh's official git completion.
Any ideas?
#compdef foobar
_foobar ()
{
local -a commands extra
commands=('one:command one' 'two:command two')
_describe -t commands 'commands' commands
extra=('extraone:extra command one' 'zbiggertoshowthealignissue:extra
command two')
_describe -t extra 'extra' extra
}
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author