summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaiki Sugawara2021-03-20 20:18:38 +0900
committerTaiki Sugawara2021-03-25 16:20:23 +0900
commitb024083d1451292dbfb81dcd3e2a6cf2eedaaca8 (patch)
tree4164c0c4a8dd83e08277c1feebacea807734bea7
downloadaur-b024083d1451292dbfb81dcd3e2a6cf2eedaaca8.tar.gz
first commit
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD41
-rw-r--r--fzf-tab-completion-git.install17
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d202358e739
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = fzf-tab-completion-git
+ pkgdesc = Tab completion using fzf in zsh, bash, GNU readline apps (e.g. python, php -a etc.)
+ pkgver = r293.bdef0e2
+ pkgrel = 1
+ url = https://github.com/lincheney/fzf-tab-completion
+ install = fzf-tab-completion-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = rust
+ makedepends = cargo
+ depends = rl_custom_function
+ depends = fzf
+ provides = fzf-tab-completion
+ source = fzf-tab-completion::git+https://github.com/lincheney/fzf-tab-completion.git
+ sha256sums = SKIP
+
+pkgname = fzf-tab-completion-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..87a80600a83
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.*
+fzf-tab-completion/
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d5d26a9c6f9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Taiki Sugawara <buzz.taiki@gmail.com>
+pkgname=fzf-tab-completion-git
+_pkgname=${pkgname%-git}
+pkgver=r293.bdef0e2
+pkgrel=1
+pkgdesc="Tab completion using fzf in zsh, bash, GNU readline apps (e.g. python, php -a etc.)"
+arch=('i686' 'x86_64')
+url="https://github.com/lincheney/fzf-tab-completion"
+license=('GPL3')
+depends=('rl_custom_function' 'fzf')
+makedepends=('rust' 'cargo')
+provides=("$_pkgname")
+install=$pkgname.install
+source=("$_pkgname::git+https://github.com/lincheney/$_pkgname.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+ (cd readline && cargo build --release)
+}
+
+check() {
+ cd "$srcdir/$_pkgname"
+ (cd readline && cargo test --release)
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ install -D -m755 readline/bin/rl_custom_complete $pkgdir/usr/bin/rl_custom_complete
+ install -D -m755 readline/target/release/librl_custom_complete.so $pkgdir/usr/lib/librl_custom_complete.so
+
+ install -D -m755 bash/fzf-bash-completion.sh $pkgdir/usr/share/$_pkgname/bash/fzf-bash-completion.sh
+ install -D -m755 zsh/fzf-zsh-completion.sh $pkgdir/usr/share/$_pkgname/zsh/fzf-zsh-completion.sh
+
+ install -D -m644 README.md $pkgdir/usr/share/doc/$_pkgname/README.md
+}
diff --git a/fzf-tab-completion-git.install b/fzf-tab-completion-git.install
new file mode 100644
index 00000000000..93e2b933a92
--- /dev/null
+++ b/fzf-tab-completion-git.install
@@ -0,0 +1,17 @@
+post_install() {
+ cat <<EOF
+
+If you want to use it with readline, add follows to your .inputrc:
+
+ \$include function rl_custom_complete /usr/lib/librl_custom_complete.so
+ C-i rl_custom_complete
+
+Please read https://github.com/lincheney/fzf-tab-completion for more information.
+EOF
+}
+
+post_upgrade() {
+ post_install
+}
+
+