From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21297 invoked from network); 13 Oct 2008 03:09:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Oct 2008 03:09:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 88036 invoked from network); 13 Oct 2008 03:09:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Oct 2008 03:09:25 -0000 Received: (qmail 19491 invoked by alias); 13 Oct 2008 03:09:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25868 Received: (qmail 19467 invoked from network); 13 Oct 2008 03:09:06 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Oct 2008 03:09:06 -0000 Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by bifrost.dotsrc.org (Postfix) with ESMTP id 207F080524C0 for ; Mon, 13 Oct 2008 05:09:01 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.215]) by vms173005.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K8N0060FQ30X9M3@vms173005.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 12 Oct 2008 22:09:00 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m9D38xpP027705 for ; Sun, 12 Oct 2008 20:08:59 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m9D38wG8027704 for zsh-workers@sunsite.dk; Sun, 12 Oct 2008 20:08:58 -0700 Date: Sun, 12 Oct 2008 20:08:58 -0700 From: Bart Schaefer Subject: Re: Get description of the completion In-reply-to: To: zsh-workers@sunsite.dk Message-id: <081012200858.ZM27703@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <237967ef0810071536i447835f9k58dcd04dcddc3ad9@mail.gmail.com> Comments: In reply to ( Text in unknown character set UTF-8 not shown ) Sommer "Re: Get description of the completion" (Oct 13, 12:21am) X-Virus-Scanned: ClamAV 0.92.1/8415/Mon Oct 13 03:06:19 2008 on bifrost X-Virus-Status: Clean On Oct 13, 12:21am, Joerg wrote: } } % grep -h<$MAGIC_KEY> } -h -- suppress printing of filenames What you're effectively asking for is a way to use the knowledge that is encapsulated in the completion system as the documentation output by run-help. I can't think of any good way to do this. It's sort of antithetical to the design of the completion system, which is is organized around finding what's *not* present, often to the point of explicitly excluding from consideration whatever already is present. Since "-h" is already on the line, it (usually) won't be considered as a candidate for completing again. So you'd have to note what character was there, backspace over it, invoke the completion and capture the list of descriptions, then put the character back, filter for the corresponding description, and call _message to display it. "Invoke the completion and capture the list" is difficult at best; you'd need to copy the tricks used by _complete_help. What's nearly impossible is knowing exactly what you need to remove from the line, in any given context, in order to cause what's on the line when you begin, to be included as a possible completion (and ideally to be treated as the *only* possible completion).