From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11845 invoked by alias); 26 Feb 2018 14:31:52 -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: List-Unsubscribe: X-Seq: 23171 Received: (qmail 26084 invoked by uid 1010); 26 Feb 2018 14:31:52 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(2.6/5.0):. Processed in 6.423741 secs); 26 Feb 2018 14:31:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NML_ADSP_CUSTOM_MED,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszu-zsh-users@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Scott Frazer Subject: Re: Dynamic named directories and completion Date: Mon, 26 Feb 2018 09:31:31 -0500 Message-ID: References: <20180224193420.0d7d7d5c@ntlworld.com> <20180224201237.5e1ee8b2@ntlworld.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <20180224201237.5e1ee8b2@ntlworld.com> Content-Language: en-US On 2/24/18 3:12 PM, Peter Stephenson wrote: > On Sat, 24 Feb 2018 20:49:14 +0100 > Mikael Magnusson wrote: >> I have some patches I was working on related to this, but I assume >> there was still some problem, or I would have committed them... >> There's two patches in this thread, >> http://www.zsh.org/mla/workers/2015/msg01439.html and then I think I >> never sent the third one, > > This is all quite complicated so I can well believe it's useful; I don't > think it fixes the behaviour I was seeing (but I may be getting > confused). > > On the same theme, I think the following is useful for those of us > using the _expand completer, which may well have nothing whatsoever to > do with the original problem. > > pws > > diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand > index a6e30e8..ee3681b 100644 > --- a/Completion/Base/Completer/_expand > +++ b/Completion/Base/Completer/_expand > @@ -43,7 +43,8 @@ zstyle -s ":completion:${curcontext}:" accept-exact tmp || > > if [[ "$tmp" != (yes|true|on|1) ]]; then > { [[ "$word" = \~(|[-+]) || > - ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ]] && return 1 } > + ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) || > + $word = \~\[*\]/* ]] && return 1 } > { [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word[2,-1]}*]} -gt 1 ) || > ( "$word" = *\$[a-zA-Z0-9_]## && > ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 } > Just this patch does not fix the completion issue (I even upgraded to 5.4.2 just to be sure). Since M-x complete-word does work, I may try looking at expand-or-complete to see if I can figure out what is happening. I'm no zsh expert though, so I will likely need help not breaking something else.