zsh-workers
 help / color / mirror / code / Atom feed
* Alignment issue with multiple describes
@ 2013-04-21  3:03 Felipe Contreras
  2013-04-21  3:03 ` Felipe Contreras
  2013-04-21  6:27 ` Bart Schaefer
  0 siblings, 2 replies; 10+ messages in thread
From: Felipe Contreras @ 2013-04-21  3:03 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-22  7:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-21  3:03 Alignment issue with multiple describes 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
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

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