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

Re: How to set up completion for git aliases?



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?

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ß Frank



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