From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10290 invoked from network); 12 Dec 2023 00:28:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Dec 2023 00:28:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/LhULUXg1SlQ5odW/lu/FRsIY7kjD2Kr6jUjwx1kcXg=; b=P8Mj91jWwSvE+7mYO/x0Fr+fY1 dHevpRehEPB7hrJwGWfWuPSZxQZWgHDOTLND/2BS5fNKbuzbmp6hjIlilV7WpJLuSFaEbloXYUwiU WEXUQu1O41XGu395zM0FXdChxGqIyIi2pbMv0wG0mxdFAmqhoYaUC9unLAtHbeKDPw/S9ETm0Hnig TGdrJEdn4UEUp8Zk59gWTfYDa1WLoGlIWOD46JYaVICk96I2pXXJbOm4JsqOjt6OisaPHPc0wlr13 8auhdlOA7+sXscR8cawhPxmxPa1DFftjT8v2DlkfCX7g6Ak6FfeIZL/kv7hiEDzIyzccrM1uxdyq5 cX7i4atw==; Received: by zero.zsh.org with local id 1rCqdl-000Lrq-Hd; Tue, 12 Dec 2023 00:28:49 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rCqdF-000LZL-Mi; Tue, 12 Dec 2023 00:28:17 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1rCqd9-0009YK-Kh; Tue, 12 Dec 2023 01:28:16 +0100 cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: To: Bart Schaefer Subject: Re: Completion oddities MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <36722.1702340891.1@hydra> Date: Tue, 12 Dec 2023 01:28:11 +0100 Message-ID: <36723-1702340891.599700@Cxey.Q8kE.H2LY> X-Seq: 52407 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Bart Schaefer wrote: > Maybe I'm just confused. > > #1 > It appears that setting MENUSELECT globally, overrides the "no-select" > string in the "menu" zstyle. I would think it should be the other way > around. The menu selection was built to work even with compctl completion. MENUSELECT is the interface _main_complete uses to control it. So the way it is doesn't surprise me. > #2 > When the "original" style is true for _approximate and _correct, the > REC_EXACT option seems to be ignored. Is there a way around that? While you've since posted a solution, I've not managed to construct an example to demonstrate the difference. > #3 > According to _complete_debug output, this is the context _approximate > is using for looking up a style when called from _correct_word (that > is, as "_main_complete _correct"): > zstyle -t ":completion:correct-word:correct-1:::" original > Appending the count to the completer is documented for _approximate > but not mentioned in _correct. The documentation does state under _correct that "It is based on _approximate" so that can imply that some functionality is shared. That does continue with "but the completer field in the context name is correct." So perhaps it should be explicit about the change count also being in that field. > #4 > The way that the function field of a context is computed is a bit > annoying. For example, if I call > zle _correct_word > from _generic, then instead of the widget name in the function slot, > the function is correct-word. This makes it impossible to specify > styles for the widget separately from styles for using _correct_word > directly. It's done this way by a large number of functions. > How are you calling `zle _correct_word` from _generic? In my testing, this worked fine: zle -C corrupt-word complete-word _generic zstyle ':completion:corrupt-word:*' completer _complete_word bindkey '^Xz' corrupt-word zstyle ':completion:corrupt-word:*' ignored-patterns '*?.h' Oliver