summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD31
-rw-r--r--apparix.sh48
3 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f79730e71130
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = apparix
+ pkgdesc = A command line file browser with bookmark support
+ pkgver = 11.062
+ pkgrel = 2
+ url = http://micans.org/apparix/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = glibc
+ options = !docs
+ options = zipman
+ source = http://micans.org/apparix/src/apparix-11-062.tar.gz
+ source = apparix.sh
+ sha256sums = 211bb5f67b32ba7c3e044a13e4e79eb998ca017538e9f4b06bc92d5953615235
+ sha256sums = 731210a83707fa264510d108e210f29f8b198444bf0a7152087e71007d0658b2
+
+pkgname = apparix
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..37b2bf0e784e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: TDY <tdy@archlinux.info>
+# Contributor: Dave Pernu <u.owned@gmail.com>
+# Contributor: Firmicus <francois.archlinux.org>
+
+pkgname=apparix
+pkgver=11.062
+pkgrel=2
+pkgdesc="A command line file browser with bookmark support"
+arch=('i686' 'x86_64')
+url="http://micans.org/apparix/"
+license=('GPL2')
+depends=('glibc')
+options=('!docs' 'zipman')
+source=(http://micans.org/$pkgname/src/$pkgname-${pkgver/./-}.tar.gz
+ apparix.sh)
+sha256sums=('211bb5f67b32ba7c3e044a13e4e79eb998ca017538e9f4b06bc92d5953615235'
+ '731210a83707fa264510d108e210f29f8b198444bf0a7152087e71007d0658b2')
+
+build() {
+ cd "$srcdir/$pkgname-${pkgver/./-}"
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-${pkgver/./-}"
+ make DESTDIR="$pkgdir/" install
+ install -Dm755 ../$pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/apparix.sh b/apparix.sh
new file mode 100644
index 000000000000..e79b903cee69
--- /dev/null
+++ b/apparix.sh
@@ -0,0 +1,48 @@
+function to() {
+ if test "$2"; then
+ cd "$(apparix "$1" "$2" || echo .)";
+ else
+ cd "$(apparix "$1" || echo .)";
+ fi
+ pwd
+}
+
+function bm() {
+ if test "$2"; then
+ apparix --add-mark "$1" "$2";
+ elif test "$1"; then
+ apparix --add-mark "$1";
+ else
+ apparix --add-mark;
+ fi
+}
+
+function portal() {
+ if test "$1"; then
+ apparix --add-portal "$1";
+ else
+ apparix --add-portal;
+ fi
+}
+
+function _apparix_aliases () {
+ cur="$2"
+ dir="$3"
+ COMPREPLY=()
+ if [[ $1 == $3 ]]
+ then
+ COMPREPLY=($(cat $HOME/.apparix{rc,expand}|grep "j,.*$cur.*,"|cut -f2 -d,))
+ else
+ dir="$(apparix -favour lro $dir 2>/dev/null)" || return 0
+ eval_compreply="
+ COMPREPLY=( $(cd "$dir" ; ls -d *$cur* |
+ while read r
+ do
+ [[ -d $r ]] && [[ $r == *$cur* ]] && echo \"${r// /\\ }\"
+ done))"
+ eval $eval_compreply
+ fi
+ return 0
+}
+
+complete -F _apparix_aliases to