From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10507 invoked by alias); 27 Oct 2013 20:43:39 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18063 Received: (qmail 2014 invoked from network); 27 Oct 2013 20:43:33 -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: <131027134336.ZM28029@torch.brasslantern.com> Date: Sun, 27 Oct 2013 13:43:36 -0700 In-reply-to: Comments: In reply to Thiago Padilha "How to capture a list of completions from a zle widget" (Oct 27, 4:16pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Thiago Padilha , zsh-users@zsh.org Subject: Re: How to capture a list of completions from a zle widget MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 27, 4:16pm, Thiago Padilha wrote: } } How can I capture a list of possible completions for the current values } of $LBUFFER $RBUFFER and $CURSOR in a zle widget? You need to override the "compadd" builtin. Have a look at the example _expand_word_and_keep function in Functions/Zle/keeper. Which, I've just noticed, unnecessarily uses both the "function" keyword and the "name()" syntax; only one or the other is necessary. Also the "always" block in _expand_word_and_keep really should cover the entire definition of the compadd function. So many nits to be picked ...