From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3857 invoked by alias); 21 Sep 2016 21:40:54 -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: 21955 Received: (qmail 25211 invoked from network); 21 Sep 2016 21:40:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f54.google.com 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(209.85.220.54):SA:0(0.0/5.0):. Processed in 0.163175 secs); 21 Sep 2016 21:40:54 -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=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=bUsy4UnraSG238Qx0PIiBnWXB3eiJYxcEo2lIgLzAz0=; b=BDLEVOZjKcH5nde4uBI4OoPE+XW394aNyOD8rDcr8IqEr9FVwpLffFRfzKdWMQocPN S4Vtw/l+R3yAWcL8sFeSSe1muw228Lsvi1aRoasI1AIFS9y8E1TirIRDH69bs2zOls9j e2/HHkwYXeeaORd0hPij/+AsAQfA9/mF/RkGOYDfHfaCiKD2QgQPgvJm1OeiyazrzoOp UbAwRHel0ubeoa1rPpjBugBhiV5ziBPF002Gd17omhVSOCdrHzwEUzR6gHBzFjg+qGvT 9AGYcg6XJ6AtPzwipHZluPxBtjU2/u9O29uDJCDNi/pcqU8FLKiEVXFZgYM2/+XOQ6yv UdoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=bUsy4UnraSG238Qx0PIiBnWXB3eiJYxcEo2lIgLzAz0=; b=Xu3EAoZwz1KyFv7GVglU1LijIo4tfA2g8GcojfsY/ql+ZUBzQPS/sT0EsMX5irfgA7 ZoBIIv3Lx3NzrDiIrPUvC3RCpYbtMIP+acQ6/tz4xXU7tOUCygWx6Fu4ccXkSrzDbIDn W0V0Wincrd+SC7QeU/jrh4pcvTEfa04G0TEl7uTXzqfBoFy2i8i96AC6sK5GYxkACaOA pBArfB89ikE3MxSrsay3qaDuwq1NdwxOuD8C6Al2Bgf3Prc1ol+ax2tOEXCNLyow2p6o LxHg1oDytBmYDGNJuoK6Bw1Wq/MjDldhYxcE1J53pIsLhXQPOraaeEIYA2jOj/3BExNR nuug== X-Gm-Message-State: AE9vXwPBnAKIyEeejCCfj2Tcb4qnN+yXA+ivikSg/bml07j/E+J35Kx1os3YgVS+ofs65Q== X-Received: by 10.66.26.232 with SMTP id o8mr67838596pag.103.1474489848713; Wed, 21 Sep 2016 13:30:48 -0700 (PDT) From: Bart Schaefer Message-Id: <160921133051.ZM3481@torch.brasslantern.com> Date: Wed, 21 Sep 2016 13:30:51 -0700 In-Reply-To: <160920223246.ZM862@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: File completion with **/ (with solution)" (Sep 20, 10:32pm) References: <160920175623.ZM32730@torch.brasslantern.com> <160920223246.ZM862@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: File completion with **/ (with solution) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 20, 10:32pm, Bart Schaefer wrote: } } There's a typo above; should be } zstyle :completion::user-expand::: tag-order expansions all-expansions } } I'm not sure why there are fewer colons in user-expand than in tag-order. } I think there's a similar typo in _user_expand looking up that style. There's an additional bug in _user_expand that breaks tag-order when there is exactly a single match. I think the -gt test (see diff) was expecting $exp[1] to be the original input pattern and wanted to skip that, or something. I'll apply the patch below to make the above tag-order work in zsh 5.3, but for all prior versions you'll have to do: zstyle :completion::user-expand::: tag-order 'expansions all-expansions' diff --git a/Completion/Base/Completer/_user_expand b/Completion/Base/Completer/_user_expand index cf3d172..066e2e8 100644 --- a/Completion/Base/Completer/_user_expand +++ b/Completion/Base/Completer/_user_expand @@ -27,7 +27,7 @@ exp=("$word") # Now look for user completions. -zstyle -a ":completion:${curcontext}" user-expand specs || return 1 +zstyle -a ":completion:${curcontext}:" user-expand specs || return 1 for spec in $specs; do REPLY= @@ -95,7 +95,7 @@ if [[ -z "$compstate[insert]" ]] ;then else _tags all-expansions expansions original - if [[ $#exp -gt 1 ]] && _requested expansions; then + if [[ $#exp -ge 1 ]] && _requested expansions; then local i j normal space dir if [[ "$sort" = menu ]]; then