Skip to content

Commit

Permalink
Add zsh completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Jul 26, 2021
1 parent 36aa1e1 commit 8c2a9b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BINDIR=$(DESTDIR)/usr/bin
SHAREDIR=$(DESTDIR)/usr/share
MANDIR=$(SHAREDIR)/man/man6
BASHCOMPLDIR=$(SHAREDIR)/bash-completion/completions
ZSHCOMPLDIR=$(SHAREDIR)/zsh/site-functions

STRIP=strip
ifeq ($(OS),Windows_NT)
Expand All @@ -34,6 +35,7 @@ install: $(PROG) $(MANPAGE)
$(INSTALL) $(PROG) $(BINDIR)/$(PROG)
$(INSTALL_DATA) $(MANPAGE) $(MANDIR)/$(MANPAGE)
$(INSTALL_DATA) completions/gti.bash $(BASHCOMPLDIR)/$(PROG)
$(INSTALL_DATA) completions/gti.zsh $(ZSHCOMPLDIR)/_$(PROG)

uninstall:
rm -f $(BINDIR)/$(PROG)
Expand Down
5 changes: 5 additions & 0 deletions completions/gti.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#compdef gti=git
# pretty simple one, it's just reuse the git one

type -w _git | grep -q function && \
_git

0 comments on commit 8c2a9b6

Please sign in to comment.