From 0d3d63e3aa0adbd6a536ba187ec234f8b07364eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20B=C3=A9langer?= <snowmaniscool@gmail.com>
Date: Sun, 24 Jun 2012 17:50:22 -0400
Subject: [PATCH] Fix bash completions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With bash-completion 2.0, the completion must have the same name as the binary.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index c6fd1c9..4014a6f 100644
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,10 @@ CROSSREPOMOVE_LINKS = \
 	extra2community \
 	community2extra
 
+BASHCOMPLETION_LINKS = \
+	archco \
+	communityco
+
 all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion
 
 edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
@@ -90,6 +94,7 @@ install:
 	for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done
 	ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
 	install -Dm0644 bash_completion $(DESTDIR)/usr/share/bash-completion/completions/devtools
+	for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)/usr/share/bash-completion/completions/$$l; done
 	install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
 	ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco
 
-- 
GitLab