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,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_KAM_HTML_FONT_INVALID,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9901 invoked from network); 18 Oct 2020 18:24:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Oct 2020 18:24:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1603045442; b=MWN5kv/ixGQyEqkrI4Js3XuP7LM22Z6sntlAKQpGSvD3zcI8eXnS+IsYZV4Cz/N0VkYnPM6WNH rhEhTxo7fk9tfPkwXwnNPhNf5ISepM1/obQZPvD5sTOlyDvsYTNDJTdJrWT6LsM4/5RBY4DHTp D/+4GxLTG0GieQzCdK6LlTw1NfXz/lgTT3pXdIeJtzTVQLdhDp97wnin/dKfza9VDZLWXzXp+S ozqzDuxTtjNFIDkD8XMUP3alDrMckg8pFp1CLy8bfHaRbuaYiO36RooAR9gKCkM0wlAbijrMrn Wf3cZHI10CiwbzvgJwEjbqYRVGVjxR3aAUu7FWIthvDjRw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f41.google.com) smtp.remote-ip=209.85.210.41; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1603045442; bh=xFTbvLocbWTzHf78GfZ96jrPvyMfTfA0OW5JbTv2gLU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=UJiTKiywWFaUI7jJq3/HXbEW5oviecgOWUBOGImh0Sf0NJNRmcXWYGmUQf++6hVneXVIjvZFdM pEnpVt8c1maAEyG6T8MWkBS2ykr5C3BSu97n1cAXOAnQqWCb0DMWWjca8cRImlK29+Rs8HUC/T lBz6lQwk2lb/nKvWmK2RZO70zSup7/IFlKkSS0Y/PUN7GE8jDpWPzJwrns5SDyP20nIqwPkAnj CPYsoszsUNmk4lsqMivTuf5VqxlPLsnj2lQD4rAhOp8VwZO98S2MSUjIoBAN1DIvs/VsbeYfTn BYdmWDWNHGEUViSypo/QqVt+8lemrYfTvcthyAdbTlhXdQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=31kfdlWG8cpJONI5S8QJ8uslQp4SDueyXo9PkSkSKIU=; b=nmIbVdknH89RPDUMWgP0VvL6ap MnpSC+Mf1dfsx1Ict42lW+QrtKj9aAn0oZ8AjcAp+SqOfrIk5yrngSky8+OR2ADrC+ceyor3+DCHe a9mJUz3ATzxUZmbHbbvG5GB/SR15IJki2DHtLlp0FYcSPfzPgSpCkAnzRpS3tiwG2Vr8idyMOWRZX gSnSeoBQoIQy+p4aijqh6k69JkZyAXRTp/+u4a3QtdXBzamJ4lrOPx9eqh9MmpiZjjuyVCZq+rxaw 8f1+8EDdLNrMf34axSHrls8hLEN7GcMUPpDfwbPtTGA9WJTUiPb4o59k9Nb+0THU1CXn29bH0QSLw +QnikcDg==; Received: from authenticated user by zero.zsh.org with local id 1kUDLc-0002jK-7r; Sun, 18 Oct 2020 18:24:00 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f41.google.com) smtp.remote-ip=209.85.210.41; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ot1-f41.google.com ([209.85.210.41]:43792) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kUDL3-0002Lp-Bm; Sun, 18 Oct 2020 18:23:26 +0000 Received: by mail-ot1-f41.google.com with SMTP id k68so3897964otk.10; Sun, 18 Oct 2020 11:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=31kfdlWG8cpJONI5S8QJ8uslQp4SDueyXo9PkSkSKIU=; b=qX0W8I1VbnukXmuVoeEGLVJUc17JnbEiKUgwqKOF4hQW0cn+i+rq5drSpxyXe1XeMJ orUHtu3I8HTaUefnQ72REj9eS0a98KZgStRPjx3UvRGvCHh/ZE7x1RssmAgF8cojR2yh Z7oaS8Gl1i/Pd5GuRzq9RztewcsabI/UDcgP4GMl4g7xCotWHFtDqBUEFZA0AmL/BUq1 54V3B6UuQZEWjps0WXl89KgrXC1YbGPRvJjPUnHdxqXH64CZsInGG1st/DGZ/4AG1/Hl evVBMUTV4zTAtHoyQwx9yATqJOngRwVf04w7cebsbW2W+9KTM97cjBPk5cSYdLIDkib2 Nmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=31kfdlWG8cpJONI5S8QJ8uslQp4SDueyXo9PkSkSKIU=; b=bCEnaNjpRNftUoHb1crBg/exV+aBJ1GkOOk8zI6ZJX9zftdRMYIi2+qfQjizqBIYGK zloIj8Wsu2jY03M6W/w1vx3R4UK0KpGvE9TdePNvqC10SDqlh27nk4FqogNhdCKjYwWo DwsvI/oXzYRL7MRZ1t2zjUlPu1CrUdpCaUKYsUF7OHLlBNZ+zUw9ECnnoa39VCM/uInw egGmfjU/2tRZ/8TO+6NuB39UOnNDOmyGDiMGBIfd+nQ8bbthdtpBB8ICuXgsV1NzlYJg Vo/so4NEUxu1GCHa4IDxASNIESx6a1Ry8UFdAHOTQhjAPZ0JW/MvniXCaTcH9mQ9CloO BJtw== X-Gm-Message-State: AOAM531n20yT9KZE3n/cg5MeJ7uy6u/eTVTI7Eh27xi3BVs4BkDjt0Ye xwsrYyarY8/cPiSnutZMHOu+bbNRIgXvf2wt9ro= X-Google-Smtp-Source: ABdhPJz2BtT3FmexlOXqKD6mGMXRGkIssJIXsfq79ejnj10vG4L5pIGkgdGVJ89HR8BXqo0IzJCDQy2+ZFYI366mGYo= X-Received: by 2002:a05:6830:1f22:: with SMTP id e2mr9958561oth.339.1603045403612; Sun, 18 Oct 2020 11:23:23 -0700 (PDT) MIME-Version: 1.0 References: <51151-1602923600.276703@fJFe.e1_b.HfoP> In-Reply-To: From: Ahmad Ismail Date: Mon, 19 Oct 2020 00:23:12 +0600 Message-ID: Subject: Re: git diff HEAD - only show modified files in completion To: Bart Schaefer Cc: Oliver Kiddle , Zsh Users Content-Type: multipart/alternative; boundary="000000000000d7591305b1f617ee" X-Seq: 26112 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --000000000000d7591305b1f617ee Content-Type: text/plain; charset="UTF-8" Hi Bart Schaefer, Thank you very much. *Best Regards,Ahmad Ismail* On Sun, Oct 18, 2020 at 4:15 AM Bart Schaefer wrote: > On Sat, Oct 17, 2020 at 8:24 AM Bart Schaefer > wrote: > > > > I was thinking there should be some way to implement this with a > > zstyle by changing the program invoked by _call_program > > Finally had a chance to poke at this a bit more ... > > On Sat, Oct 17, 2020 at 9:25 AM Ahmad Ismail wrote: > > > > I have asked this question on reddit afterwards. > > In your post there, you said: > > > I also tried zstyle :completion::complete:git-difftool:argument-rest:' > command 'git ls-files -m'. Apparently it is doing nothing. > > So very close. > > zstyle ':completion::complete:git-diff*:argument-rest:tree-files' > command 'git ls-files -m' > > One question is why ^Xh (list-tags) shows the "files" tag for that > context but not the "tree-files" tag. If you invoke completion > immediately after "git diff " (instead of after "git diff HEAD ") then > the context is "changed-in-working-tree-files" and THAT gets shown > correctly by ^Xh. > --000000000000d7591305b1f617ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Bart Schaefer,

Thank you = very much.

Best Regards,

Ahmad Ismail


On Sun, Oct 18, 2020 at 4:15 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
On Sat, Oct 17, 2020 a= t 8:24 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> I was thinking there should be some way to implement this with a
> zstyle by changing the program invoked by _call_program

Finally had a chance to poke at this a bit more ...

On Sat, Oct 17, 2020 at 9:25 AM Ahmad Ismail <ismail783@gmail.com> wrote:
>
> I have asked this question on reddit afterwards.

In your post there, you said:

> I also tried zstyle :completion::complete:git-difftool:argument-rest:&= #39; command 'git ls-files -m'. Apparently it is doing nothing.

So very close.

zstyle ':completion::complete:git-diff*:argument-rest:tree-files' command 'git ls-files -m'

One question is why ^Xh (list-tags) shows the "files" tag for tha= t
context but not the "tree-files" tag.=C2=A0 If you invoke complet= ion
immediately after "git diff " (instead of after "git diff HE= AD ") then
the context is "changed-in-working-tree-files" and THAT gets show= n
correctly by ^Xh.
--000000000000d7591305b1f617ee--