From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2893 invoked by alias); 22 Jul 2011 11:55:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29583 Received: (qmail 7994 invoked from network); 22 Jul 2011 11:55:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=VyooFXsj6s9TccG/k10XMWrbPqy+VWtOVdgYb1uQA8g=; b=cv31CnlYjik8Q7k/9GhBVb4h0yyRdIxwo1/IbXvjPEUEfWs4EKl4UZHYJDmeGr3mp/ 8Tq4Oo8UByy7Xe4gL/OusvtqyAajRXDLsciKGgJa7QRBh9dhXYHF871pfTF9JtOrvuxe 7HIemwXWiVVFVd4poXc+agSf5U21x5Ih3Zjl0= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com In-Reply-To: <1309379833-31315-4-git-send-email-ft@bewatermyfriend.org> References: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org> <1309379833-31315-1-git-send-email-ft@bewatermyfriend.org> <1309379833-31315-4-git-send-email-ft@bewatermyfriend.org> Date: Fri, 22 Jul 2011 13:55:09 +0200 X-Google-Sender-Auth: 9zrLEjt43av5dzmc1_7Z3TIa4II Message-ID: Subject: Re: PATCH: (3/3) _git: re-add `user-commands' support again From: Nikolai Weibull To: Frank Terbeck Cc: zsh workers , Mikael Magnusson Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Do we really need this style? I don=E2=80=99t like it at all. If the user wants to add completion for a sub-command they should really go the extra distance and add a proper completion definition for the whole sub-command. It=E2=80=99s not hard to add a _git-subcommand file under ~/.zsh/functions (or similar) with a proper description and all. If you don=E2=80=99t disagree I=E2=80=99m going to remove it. On Wed, Jun 29, 2011 at 22:37, Frank Terbeck wrote= : > --- > =C2=A0Completion/Unix/Command/_git | =C2=A0 =C2=A04 ++++ > =C2=A01 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git > index ef97499..4567460 100644 > --- a/Completion/Unix/Command/_git > +++ b/Completion/Unix/Command/_git > @@ -4439,6 +4439,9 @@ __git_ignore_line_inside_arguments () { > > =C2=A0(( $+functions[_git_commands] )) || > =C2=A0_git_commands () { > + =C2=A0local -a user_commands > + =C2=A0zstyle -a ":completion:${curcontext}:" user-commands user_command= s || user_commands=3D() > + > =C2=A0 local -a main_porcelain_commands > =C2=A0 main_porcelain_commands=3D( > =C2=A0 =C2=A0 add:'add file contents to index' > @@ -4604,6 +4607,7 @@ _git_commands () { > =C2=A0 _describe -t plumbing-sync-helper-commands 'plumbing sync helper c= ommand' plumbing_sync_helper_commands && ret=3D0 > =C2=A0 _describe -t plumbing-internal-helper-commands 'plumbing internal = helper command' plumbing_internal_helper_commands && ret=3D0 > =C2=A0 _describe -t third-party-addons 'third party addon' _git_third_par= ty && ret=3D0 > + =C2=A0_describe -t user-specific-commands 'user specific command' user_= commands && ret=3D0 > =C2=A0 return ret > =C2=A0}