diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-03 19:36:15 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-03 19:37:21 +0200 |
commit | 3de9a671f8d84445e92988c5cf19fdbfeffb0fb8 (patch) | |
tree | 677281eff80e57f3df7badbe8239f3096cfa6b61 /community/nnn | |
parent | 398c355bd01918ed6c3d0637b0244ba588abe0a1 (diff) | |
download | aports-3de9a671f8d84445e92988c5cf19fdbfeffb0fb8.tar.bz2 aports-3de9a671f8d84445e92988c5cf19fdbfeffb0fb8.tar.xz |
community/nnn: add shell completions
Diffstat (limited to 'community/nnn')
-rw-r--r-- | community/nnn/APKBUILD | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/community/nnn/APKBUILD b/community/nnn/APKBUILD index 421a1b8928..4cd7d53c2a 100644 --- a/community/nnn/APKBUILD +++ b/community/nnn/APKBUILD @@ -2,14 +2,18 @@ # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=nnn pkgver=1.7 -pkgrel=1 +pkgrel=2 pkgdesc="The missing terminal file browser for X" url="https://github.com/jarun/nnn" arch="all !armhf" # armhf: fails to build license="BSD-2-Clause" makedepends="ncurses-dev readline-dev" options="!check" # no tests provided and `nnn -v` requires tty -subpackages="$pkgname-doc" +subpackages="$pkgname-doc + $pkgname-bash-completion:bashcomp:noarch + $pkgname-fish-completion:fishcomp:noarch + $pkgname-zsh-completion:zshcomp:noarch + " source="$pkgname-$pkgver.tar.gz::https://github.com/jarun/$pkgname/archive/v$pkgver.tar.gz nlay" builddir="$srcdir/$pkgname-$pkgver" @@ -28,5 +32,35 @@ package() { install -m 755 "$srcdir"/nlay "$pkgdir"/usr/bin/nlay } +bashcomp() { + pkgdesc="Bash completions for $pkgname" + depends="" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + cd "$builddir" + install -D -m 644 scripts/auto-completion/bash/nnn-completion.bash \ + "$subpkgdir"/usr/share/bash-completion/completions/$pkgname +} + +fishcomp() { + pkgdesc="Fish completions for $pkgname" + depends="" + install_if="$pkgname=$pkgver-r$pkgrel fish" + + cd "$builddir" + install -D -m 644 scripts/auto-completion/fish/nnn.fish \ + "$subpkgdir"/usr/share/fish/completions/$pkgname.fish +} + +zshcomp() { + pkgdesc="ZSH completions for $pkgname" + depends="" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + cd "$builddir" + install -D -m 644 scripts/auto-completion/zsh/_nnn \ + "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname +} + sha512sums="7574971b423a1c49e2217d5e4415a69536b807587b4e32b61568ce0c6a1734ed85924a3ef68027653f1f0e882ef8df1bc375e119a9ded51e133a2adf5cd560cb nnn-1.7.tar.gz 9f70f5fec2799caf1624e1334e687072dde94ee550a4cd7ee5a1a6b9b880f3fe40b6cbd631ce2d024cb811b5115249e7cd81c880c88f2289f627cd866fc06036 nlay" |