From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16852 invoked by alias); 13 Feb 2014 18:14:46 -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: 18443 Received: (qmail 3469 invoked from network); 13 Feb 2014 18:14:40 -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=-0.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_NUMERIC_HELO,SPF_HELO_PASS autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Yuri D'Elia Subject: Re: widget special PREFIX variable and cursor position with complete_in_word Date: Thu, 13 Feb 2014 19:12:01 +0100 Message-ID: References: <140212214707.ZM25929@torch.brasslantern.com> <140213092531.ZM26966@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.106.183.18 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0 In-Reply-To: <140213092531.ZM26966@torch.brasslantern.com> On 02/13/2014 06:25 PM, Bart Schaefer wrote: > } Yes, at this point I'm shown the completion list for the first > } ambiguous position, and I need to know the string up to the cursor > } location (not the entire argument), in order to match the ambiguous > } character in the list. > > You want $compstate[unambiguous] and $compstate[unambiguous_cursor], > but you can't examine them until after the rest of completion is done > with its work -- perhaps by poking something into the $comppostfuncs > array (see the _all_matches completer for an example). Indeed, I was already looking at $compstate[unambiguous], but it's not yet set for my purposes. Even after reading the _all_matches example, I'm not sure I follow you about using comppostfuncs. It would still be called too late for my purposes.