]> git.proxmox.com Git - pve-container.git/commitdiff
auto-generate bash completion config
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 4 Sep 2015 04:20:15 +0000 (06:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 4 Sep 2015 04:20:15 +0000 (06:20 +0200)
src/Makefile
src/pct.bash-completion [deleted file]

index 6bc06fa277b865d1a9fa4ed1dac2968e6011eaa7..d35619480b53fdd7b2c3138cde09b26728bda3e0 100644 (file)
@@ -28,6 +28,9 @@ all:
 pct.1.pod: pct
        perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_pod_manpage();" >$@
 
+pct.bash-completion:
+       perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_bash_completions();" >$@
+
 pct.conf.5.pod: gen-pct-conf-pod.pl PVE/LXC.pm
        perl -I. ./gen-pct-conf-pod.pl >$@
 
@@ -62,7 +65,7 @@ test:
 .PHONY: clean
 clean:         
        make -C test clean
-       rm -rf *.1.pod *.1.gz
+       rm -rf *.1.pod *.1.gz *.bash-completion
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
diff --git a/src/pct.bash-completion b/src/pct.bash-completion
deleted file mode 100644 (file)
index 7d0a9f3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# pct(1) bash completion
-
-# see http://tiswww.case.edu/php/chet/bash/FAQ
-# and __ltrim_colon_completions() in /usr/share/bash-completion/bash_completion
-# this modifies global var, but I found no better way
-COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
-complete -C 'pct bashcomplete' pct