From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17577 invoked by alias); 6 Jul 2012 23:16:29 -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: 17172 Received: (qmail 26305 invoked from network); 6 Jul 2012 23:16:27 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Zsh Users Subject: Re: How to set up completion for git aliases? In-Reply-To: (Vadim Zeitlin's message of "Fri, 6 Jul 2012 19:04:53 +0200") References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) Date: Sat, 07 Jul 2012 01:02:43 +0200 Message-ID: <87liiwtrvw.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: [pbs]MDExNTM1 Vadim Zeitlin wrote: > I have a simple git alias "lg =3D log --oneline" and I'd like zsh to > complete it in the same way as it already completes "git log". > Unfortunately after spending a long time looking at > /usr/share/zsh/functions/Completion/Unix/_git I still have no idea how am= I > supposed to do it "properly", i.e. without copying this huge file and > hacking on it. I'm sure there must be a better way to do it but which one? You don't need to do anything, unless you're on a quite old version of zsh. The _git completion has support for that out of the box. I don't remember when the feature was added exactly, but any release within the last year should be new enough. Gru=C3=9F Frank