From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20145 invoked by alias); 11 Jan 2014 22:14:27 -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: 18317 Received: (qmail 19545 invoked from network); 11 Jan 2014 22:14:23 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=eKdMnrCLiUE3+6ACpYps4zMmrY42KPkNQriIxDHBfSU=; b=Ab0CIjauivVu2S3/b+RzKQQawbKDsdwHGyIQZepH9/UJA0auK5D7nss5Bv6ffGG0Pi idmSD7cHQneUI4eF5qzVARsU/BV/uhKffZmeC3dz9EptGE/7h3THy4+ZO3fYpqMUZZcG ZSewq4BBESJ5xC63aS3jowM3GX1PPE1U4fxbxCpKmGxulOY+ewhXnU/2qoR3pWsfbQop 1XfQd009ZfRt5UtZDSi69q/P5L39qTUzJdnAd9gNeiDrgRamoPDzIXdAs0dXEp12NIl+ nN9HbdjeGuo+4OVphRTwcjzpEpUAv0e5dWlX2GYCB2lWyjhsSSVnS36MOUHtqiIsShcO o8Tw== X-Received: by 10.49.48.106 with SMTP id k10mr22926669qen.57.1389478459235; Sat, 11 Jan 2014 14:14:19 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <140111095818.ZM14468@torch.brasslantern.com> References: <140110213433.ZM22191@torch.brasslantern.com> <140110233725.ZM22285@torch.brasslantern.com> <140111095818.ZM14468@torch.brasslantern.com> From: "Keerthan jai.c" Date: Sat, 11 Jan 2014 17:13:59 -0500 Message-ID: Subject: Re: Approximate file path completion for git? To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=047d7b67827efc653604efb92983 --047d7b67827efc653604efb92983 Content-Type: text/plain; charset=ISO-8859-1 Backing out 31159 and unsetopt nomatch; works for me. However, unsetopt nullglob breaks it again. On Sat, Jan 11, 2014 at 12:58 PM, Bart Schaefer wrote: > On Jan 10, 11:37pm, Bart Schaefer wrote: > } > } - files=(${(0)"$(_call_program files git ls-files -z --exclude-standard > $opts -- ${pref:+$pref\\\*} 2>/dev/null)"}) > } + files=(${(0)"$(setopt no_nomatch; _call_program files git ls-files -z > --exclude-standard $opts -- ${pref:+$pref\*} 2>/dev/null)"}) > > That needs nullglob turned off as well. Here's a corrected patch: > > > diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git > index 43a01d9..e9a5318 100644 > --- a/Completion/Unix/Command/_git > +++ b/Completion/Unix/Command/_git > @@ -5683,7 +5683,7 @@ __git_files () { > # TODO: --directory should probably be added to $opts when --others is > given. > > local pref=$gitcdup$gitprefix$PREFIX > - files=(${(0)"$(_call_program files git ls-files -z --exclude-standard > $opts -- ${pref:+$pref\\\*} 2>/dev/null)"}) > + files=(${(0)"$(unsetopt nullglob nomatch; _call_program files git > ls-files -z --exclude-standard $opts -- ${pref:+$pref\*} 2>/dev/null)"}) > __git_command_successful $pipestatus || return > > # _wanted $tag expl $description _files -g '{'${(j:,:)files}'}' > $compadd_opts - > -- have a nice day -jck --047d7b67827efc653604efb92983--