diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | fzf-tab-completion-git.install | 17 |
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d202358e7396 --- /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 000000000000..87a80600a836 --- /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 000000000000..d5d26a9c6f99 --- /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 000000000000..93e2b933a921 --- /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 +} + + |