]> git.proxmox.com Git - pve-docs.git/commitdiff
Fix 1891: Add zsh completion generator
authorChristian Ebner <c.ebner@proxmox.com>
Fri, 8 Feb 2019 15:43:10 +0000 (16:43 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Feb 2019 11:11:25 +0000 (12:11 +0100)
This adds the generator needed for the autogeneration of zsh completion scripts
analogous to the generator creating the bash completion scripts.
In order to generate zsh completion scripts for other packages, a package
including this patch as well as the package in pve-common with the corresponding
patch have to be installed on the build system.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
pve-doc-generator.mk.in

index d67d1c5e53e8481820de4bb90caddd1de49b4159..5f9965de27242721d714b373615c3909e341092e 100644 (file)
@@ -53,6 +53,14 @@ endif
        perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
        mv $@.tmp $@
 
+%.service-zsh-completion:
+       perl ${PERL_DOC_INC} -T -e "use PVE::Service::$*; PVE::Service::$*->generate_zsh_completions();" >$@.tmp
+       mv $@.tmp $@
+
+%.zsh-completion:
+       perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_zsh_completions();" >$@.tmp
+       mv $@.tmp $@
+
 %.service-api-verified:
        perl ${PERL_DOC_INC} -T -e "use PVE::Service::$*; PVE::Service::$*->verify_api();"
        touch $@