New comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/38583#issuecomment-1211584398 Comment: this seems to give completions files that work (tested zsh), and it doesn't require vendoring the files in filesdir ```diff diff --git a/srcpkgs/khal/template b/srcpkgs/khal/template index 6b74897878..2f6331ed31 100644 --- a/srcpkgs/khal/template +++ b/srcpkgs/khal/template @@ -3,10 +3,10 @@ pkgname=khal version=0.10.5 revision=1 build_style=python3-module -hostmakedepends="python3-setuptools" -depends="python3-setuptools python3-click python3-click-log python3-configobj +hostmakedepends="python3-setuptools python3-click python3-click-log python3-configobj python3-dateutil python3-icalendar python3-pytz python3-tzlocal python3-urwid python3-xdg python3-atomicwrites" +depends="$hostmakedepends" checkdepends="python3-pytest python3-freezegun vdirsyncer $depends" short_desc="Command-line calendar build around CalDAV" maintainer="Anachron " @@ -25,8 +25,9 @@ pre_build() { post_install() { vlicense COPYING - vcompletion "${FILESDIR}/khal.bash" bash - vcompletion "${FILESDIR}/khal.fish" fish - vcompletion "${FILESDIR}/khal.zsh" zsh + for sh in bash fish zsh; do + env PYTHONPATH=$DESTDIR/$py3_sitelib _KHAL_COMPLETE="${sh}_source" $DESTDIR/usr/bin/khal > "khal.${sh}" + vcompletion "khal.${sh}" $sh + done vsconf khal.conf.sample } ```