Skip to content

Commit

Permalink
deb: make separate vng and virtme-ng bash autocompletion files
Browse files Browse the repository at this point in the history
Some versions of register-python-argcomplete do not support multiple
arguments, so create a separate bash autocompltion file for vng and
virtme-ng to prevent potential errors.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
Andrea Righi committed Oct 31, 2023
1 parent 0e5c315 commit 7cc5799
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build
dist
.mypy_cache
virtme-ng-prompt
vng-prompt
virtme_ng.egg-info/
.pybuild/
debian/virtme-ng/
Expand Down
4 changes: 3 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/make -f

virtme-ng-prompt:
(register-python-argcomplete virtme-ng vng || register-python-argcomplete3 virtme-ng vng) > $@
(register-python-argcomplete virtme-ng || register-python-argcomplete3 virtme-ng) > virtme-ng-prompt
(register-python-argcomplete vng || register-python-argcomplete3 vng) > vng-prompt

%:
dh $@ --with python3 --buildsystem=pybuild
Expand All @@ -10,3 +11,4 @@ override_dh_install: virtme-ng-prompt
dh_install
mkdir -p $(CURDIR)/debian/virtme-ng/etc/bash_completion.d
install -m 0644 virtme-ng-prompt $(CURDIR)/debian/virtme-ng/etc/bash_completion.d/virtme-ng-prompt
install -m 0644 vng-prompt $(CURDIR)/debian/virtme-ng/etc/bash_completion.d/vng-prompt

0 comments on commit 7cc5799

Please sign in to comment.