From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7948 invoked by alias); 21 Apr 2013 03:04:06 -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: 31304 Received: (qmail 15423 invoked from network); 21 Apr 2013 03:04:05 -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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.173 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=fAhAUZrjp7pBBiEChH9Wkb/ISeePars11/7e6Z3A0y8=; b=Da7TZet/WnQMEocoAJIhDKxYeeEHHiVpR9sEbhUvJrBRocNoGNuBIvhtmaaaIjMLZr VvZI3HqpBhR0mMJjUS0PEUlZ8jiNc4x01WQZc3y6VzIgHOrDrCR1SPtHXGUnoHc3FPyW 5N3Na6NStC3jMuH0J+QmeqhV9LQNJb85ijqHPU14y+A51o+A5NYlKrO+W1nJeQiWj9iU rHh3YRAoh5md3GpL5UG94BAoLKocgCKqswKTOkzARdOv+ti6qPF7V8V85lKCdnVrM301 MAQ1vTGfPxUI8x7egGZbokeiJtTmYT6lnlf+pUt0CZ4XbeUYSMC6xOHJc7RhQnW5r8G9 74cQ== MIME-Version: 1.0 X-Received: by 10.112.139.226 with SMTP id rb2mr9809320lbb.12.1366513439497; Sat, 20 Apr 2013 20:03:59 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Apr 2013 22:03:59 -0500 Message-ID: Subject: Re: Alignment issue with multiple describes From: Felipe Contreras To: zsh-workers@zsh.org Cc: Felipe Contreras Content-Type: text/plain; charset=UTF-8 Please keep me in Cc. On Sat, Apr 20, 2013 at 10:03 PM, Felipe Contreras wrote: > 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