[pve-devel] [PATCH docs 2/4] pve-doc-generator: add rules for bash-completion

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Oct 17 13:01:58 CEST 2018


while these are not strictly documentation, they use the same mechanisms
and are generated at the same time as the man pages.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 pve-doc-generator.mk.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pve-doc-generator.mk.in b/pve-doc-generator.mk.in
index 893e9f8..0176d85 100644
--- a/pve-doc-generator.mk.in
+++ b/pve-doc-generator.mk.in
@@ -45,6 +45,13 @@ ifneq (${DGDIR},.)
 	mv $@.tmp $@
 endif
 
+%.service-bash-completion:
+	perl ${PERL_DOC_INC} -T -e "use PVE::Service::$*; PVE::Service::$*->generate_bash_completions();" >$@.tmp
+	mv $@.tmp $@
+
+%.bash-completion:
+	perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
+	mv $@.tmp $@
 
 %-plain.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
 	${ASCIIDOC_PVE} compile-wiki -o $@ $*.adoc
-- 
2.19.1





More information about the pve-devel mailing list