[pve-devel] [PATCH access-control] 1891 Add zsh command completion for pveum
Christian Ebner
c.ebner at proxmox.com
Thu Feb 21 14:25:03 CET 2019
This generates the zsh command completion scripts for pveum.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 35dcf10..ed50f5b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ MANDIR=${PREFIX}/share/man
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
MAN1DIR=${MANDIR}/man1/
BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
+ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/
export PERLDIR=${PREFIX}/share/perl5
@@ -34,8 +35,12 @@ pveum.bash-completion: PVE/CLI/pveum.pm
perl -I. -T -e "use PVE::CLI::pveum; PVE::CLI::pveum->generate_bash_completions();" >$@.tmp
mv $@.tmp $@
+pveum.zsh-completion: PVE/CLI/pveum.pm
+ perl -I. -T -e "use PVE::CLI::pveum; PVE::CLI::pveum->generate_zsh_completions();" >$@.tmp
+ mv $@.tmp $@
+
.PHONY: install
-install: pveum.1 oathkeygen pveum.bash-completion
+install: pveum.1 oathkeygen pveum.bash-completion pveum.zsh-completion
install -d ${DESTDIR}${BINDIR}
install -d ${DESTDIR}${SBINDIR}
install -m 0755 pveum ${DESTDIR}${SBINDIR}
@@ -46,6 +51,7 @@ install: pveum.1 oathkeygen pveum.bash-completion
install -m 0644 pveum.1 ${DESTDIR}/${MAN1DIR}
gzip -9 -n ${DESTDIR}/${MAN1DIR}/pveum.1
install -m 0644 -D pveum.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pveum
+ install -m 0644 -D pveum.zsh-completion ${DESTDIR}${ZSHCOMPLDIR}/_pveum
.PHONY: test
test:
--
2.11.0
More information about the pve-devel
mailing list