Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Git completion slowness
- X-seq: zsh-workers 28521
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Git completion slowness
- Date: Fri, 10 Dec 2010 15:00:32 +0100
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=VI1+WvvIov/v+2uM5+uloKSpk6tnIJNPKtsrS2FYpis=; b=rigpmJU2r588FdZOkKf2Aswjj/NvusQ3gAdQNNH9sBC7/lwrA60yN869wbopqj3mmG QLrjJXQ8gjqaIhH5zbae5Zjm2d2I2e96ytfF5KHk6NQqP0WKVUsHW6444ILn0vQ0PXCz keSQI7tTzvEQ4/HZalbpEWBn3mJtEtuAlImxs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=QW/JFTuWRlN89/fcFws17xDU3Hj2rD2D/d6gYv4PekAPgcC3GIyyGjPIZ3GBKXjOkt S1tvHeCQZqKCOYGV3VpcpUGS4vbsSj81/1NV1YFioIYGCNwIBCsGJcU/3LI9bTf7LHOd Zkqy8M1AM8S1KH5BjdrOBvJHXuHTqq/eQ3E14=
- In-reply-to: <631.1291985288@thecus>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTi=4OkTExqGZOCY8B64HGatuKh9S=8hkfKkMrF3K@xxxxxxxxxxxxxx> <alpine.LNX.2.01.1012091710280.2792@hp> <631.1291985288@thecus>
- Sender: nikolai.weibull@xxxxxxxxx
On Fri, Dec 10, 2010 at 13:48, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> "Benjamin R. Haskell" wrote:
> So for _git-add, we'd need something like:
> __git_filestatus() {
> Â[[ $(git status --porcelain $REPLY) = ?M* ]]
> }
>
> __git_modified_files () {
> Â_files -g "*(.e:__git_filestatus:)"
> }
>
> That may need to run git status for every file but that's way better
> than recursing through every subdirectory. Note that it is possible to
> add non-existant files - look at _subversion for an example.
Hm, I thought we had some functions like that already. Perhaps that
was in an earlier version. I will look into using this. Letâs hope
libgit2 finally arrives and someone (OK, I) implement zgit so that we
donât have to do so much forking (think Cygwin).
> This also loses you the division of files into ignored-modified-files,
> ignored-other-files etc but you can actually put that back in with a
> suitable file-patterns style provided __git_filestatus doesn't hard code
> the regex/pattern (and options needed for e.g. ignored files).
OK, good. We can have a look at that subdivision later (because I
think itâs desirable, especially for _git-add).
> I would work on this but if Nikolai has a rewritten _git, I'll hold off.
Thanks. Iâm sorry that itâs taking so long, but I want to clean it
all up so that future revisions will be easier to make.
> By the way, what's with all the double underscores in _git. Is there
> some meaning to those or has someone just been doing too much Python.
Yes, although itâs slightly redundant. _git-* is completion for git
*. __git_* is an internal helper function.
> Oliver
__self__
Messages sorted by:
Reverse Date,
Date,
Thread,
Author