From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19063 invoked by alias); 4 Oct 2013 14:42:57 -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: 31788 Received: (qmail 12163 invoked from network); 4 Oct 2013 14:42:51 -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: <131004074256.ZM4048@torch.brasslantern.com> Date: Fri, 04 Oct 2013 07:42:56 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Minor glitch with misuse of _describe; doc? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii I was fiddling with trying to get multiple completion tag groups to all align their match/description separators in a neat column, and wrote this little (broken) completer: _describe_t () { local -a commands extra commands=('one:command one' 'two:command two') extra=('extraone:extra command one' 'zbiggertoshowthealignissue:extra command two') _describe -t commands 'commands' commands -- -t extra 'extra' extra } compdef _describe_t zzz Got this very unexpected result: torch% zzz - extra -2V extraone -a -J _a_13 _tmpd -d _tmpm -D zbiggertoshowthealignissue -default- one # command one two # command two The correct usage is (I think) _describe -t commands 'commands' commands -- extra (that is, you can't repeat the "-t tag description" part after the "--") but something about throwing too many arguments after the "--" causes a bunch of internal bits of _describe to show up as possible completions. What exactly are the "completion options OPTS" that can be passed through _describe as mentioned in the manual? _describe [ -oO | -t TAG ] DESCR NAME1 [ NAME2 ] OPTS ... -- ... This function associates completions with descriptions. Multiple groups separated by -- can be supplied, potentially with different completion options OPTS. I think perhaps that should say "compadd options"? (Same for _combination ?)