Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to set up completion for git aliases?



Hi,

On Fri, Jul 06, 2012 at 07:04:53PM +0200, Vadim Zeitlin wrote:
>  I have a simple git alias "lg = 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?

I'm not sure if there's much necessary with stock zsh, but I use
grml's zshrc (http://grml.org/zsh/) and it works out of the box with
every freshly added alias for me. Never had to do anything.

HTH.

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@xxxxxxxxxxxxxxx  (Mail)
 X   See http://www.asciiribbon.org/              | abe@xxxxxxxxx (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



Messages sorted by: Reverse Date, Date, Thread, Author