From e35ab57b2872ced3ce66c1344d3f5e4aae3ce6c8 Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Sat, 6 Apr 2024 19:15:09 +0200 Subject: [PATCH] toot: add shell completion. --- srcpkgs/toot/template | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/srcpkgs/toot/template b/srcpkgs/toot/template index 251276fea759ae..560db74e849b15 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 " @@ -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 +}