aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-04-06 17:15:09 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-04-14 07:46:56 +0000
commit358652ee20f8bbc9ae8fa44d11b68ef114e97263 (patch)
treea5a7bf901fb469e90d2a155d35d989d6d21a950d
parent6c36dc0f6d98bfd622c580806c8a6e1783b4455b (diff)
downloadvoid-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar.gz
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar.bz2
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar.lz
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar.xz
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.tar.zst
void-packages-358652ee20f8bbc9ae8fa44d11b68ef114e97263.zip
toot: add shell completion.
-rw-r--r--srcpkgs/toot/template15
1 files changed, 12 insertions, 3 deletions
diff --git a/srcpkgs/toot/template b/srcpkgs/toot/template
index 251276fea75..560db74e849 100644
--- a/srcpkgs/toot/template
+++ b/srcpkgs/toot/template
@@ -1,11 +1,12 @@
# Template file for 'toot'
pkgname=toot
version=0.42.0
-revision=1
+revision=2
build_style=python3-pep517
-hostmakedepends="python3-setuptools python3-wheel"
-depends="python3-click python3-requests python3-BeautifulSoup4 python3-wcwidth
+_depends="python3-click python3-requests python3-BeautifulSoup4 python3-wcwidth
python3-urwid python3-urwidgets python3-tomlkit"
+hostmakedepends="python3-setuptools python3-wheel ${_depends}"
+depends="${_depends}"
checkdepends="${depends} python3-psycopg2 python3-pytest-xdist"
short_desc="Mastodon CLI client"
maintainer="Jon Levin <jon@jefferiestube.net>"
@@ -14,3 +15,11 @@ homepage="https://toot.bezdomni.net"
changelog="https://raw.githubusercontent.com/ihabunek/toot/master/CHANGELOG.md"
distfiles="https://github.com/ihabunek/toot/archive/refs/tags/${version}.tar.gz"
checksum=05502896b3a75aa93c8895bab75669653601af502ac6cf44d1ab33de373ef229
+
+post_install() {
+ for shell in bash zsh fish; do
+ _TOOT_COMPLETE=${shell}_source PYTHONPATH="${DESTDIR}/${py3_sitelib}" \
+ $DESTDIR/usr/bin/toot > completion.$shell
+ vcompletion completion.$shell $shell
+ done
+}