summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVáclav Kubernát2024-02-12 21:10:44 +0100
committerVáclav Kubernát2024-02-12 21:24:05 +0100
commitbb2ea8b4ba6931780f939303ecc7ef2b394af517 (patch)
treeeb82546739f0827656c638ba99ae8e5d09871180
parent17fbcb591843cec1aa1d2f597b050351c20af622 (diff)
downloadaur-bb2ea8b4ba6931780f939303ecc7ef2b394af517.tar.gz
Install bash-completion script
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD9
-rw-r--r--bash-completion-shvspy5
3 files changed, 14 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d1da8d157403..67c3ba6c369c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -20,6 +20,8 @@ pkgbase = shvspy-git
conflicts = shvspy
conflicts = shvspy-git
source = git+https://github.com/silicon-heaven/shvspy.git
+ source = bash-completion-shvspy
md5sums = SKIP
+ md5sums = f681f0f02001b80f964ce640a41b5c27
pkgname = shvspy-git
diff --git a/PKGBUILD b/PKGBUILD
index c596d73bda18..a58e84bd5591 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,8 +12,12 @@ depends=('necrolog' 'libshv' 'glibc' 'gcc-libs' 'qt6-base' 'qt6-networkauth' 'qt
makedepends=('git' 'cmake')
conflicts=('shvspy' 'shvspy-git')
provides=('shvspy')
-source=('git+https://github.com/silicon-heaven/shvspy.git')
-md5sums=('SKIP')
+source=('git+https://github.com/silicon-heaven/shvspy.git'
+ 'bash-completion-shvspy'
+)
+md5sums=('SKIP'
+ 'f681f0f02001b80f964ce640a41b5c27'
+)
pkgver() {
cd "$srcdir/$_gitname"
@@ -33,4 +37,5 @@ build() {
package() {
DESTDIR="$pkgdir" cmake --install "$srcdir/build"
+ install -Dm644 bash-completion-shvspy "${pkgdir}/usr/share/bash-completion/completions/shvspy"
}
diff --git a/bash-completion-shvspy b/bash-completion-shvspy
new file mode 100644
index 000000000000..e851bf4494ad
--- /dev/null
+++ b/bash-completion-shvspy
@@ -0,0 +1,5 @@
+if ! declare -F __shv_compl > /dev/null; then
+ _completion_loader shv
+fi
+
+complete -F __shv_compl shvspy