From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2523 invoked by alias); 11 Oct 2014 18:12:02 -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: 33435 Received: (qmail 10600 invoked from network); 11 Oct 2014 18:12:01 -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 From: Bart Schaefer Message-id: <141011091935.ZM1151@torch.brasslantern.com> Date: Sat, 11 Oct 2014 09:19:35 -0700 In-reply-to: <11354.1413020781@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: [Bulk] Re: [PATCH] Add xxd completion" (Oct 11, 11:46am) References: <20141008082016.GC1712@tarsus.local2> <30554.1412778907@thecus.kiddle.eu> <20141009082124.GC1737@tarsus.local2> <11354.1413020781@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [Bulk] Re: [PATCH] Add xxd completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii } Daniel Shahaf wrote: } } > Done. 'xxd -grou' now DTRTs; however, 'xxd -g' gives me: } > } > % xxd -g } > -groupsize -- specify the number of octets per group } > } > and the display doesn't change even if I press again. This } > seems odd: why am I not offered both -g and -groupsize as possible } > completions? At this point in the completion, "-g" is an ignored prefix of the "-g+" completion, which means it is part of the word to be completed but should not be shown in the list of matches. So it isn't. } > And if "-groupsize" is offered in the message, why does pressing } > not complete the command-line word to the one possible } > completion? The listing doesn't change on subsequent TABs because the fact that -g is a possible completion makes -groupsize ambiguous. You have to do something to disambiguate, e.g., type a number (of octets) or an "r" before pressing TAB. On Oct 11, 11:46am, Oliver Kiddle wrote: } } It'll perhaps seem clearer if you set the format style with the } descriptions tag We had a brief discussion a few weeks ago of supplying a set of default zstyles, I've been gradually building up a suggested list. Both of these were the first things on it: } zstyle ':completion:*:descriptions' format '%B%d%b' } zstyle ':completion:*' group-name '' } } This makes it clearer that you have two groups, one of which has no } associated matches, just a heading. } } What subsequent tab presses does, depends a lot on your configuration. In this case it doesn't, really; because one of the groups is empty, there's not much else that can happen, e.g., menu completion has no alternatives to cycle through.