summaryrefslogtreecommitdiff
path: root/community/apparix
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/apparix
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/apparix')
-rw-r--r--community/apparix/PKGBUILD27
-rw-r--r--community/apparix/apparix.sh52
2 files changed, 79 insertions, 0 deletions
diff --git a/community/apparix/PKGBUILD b/community/apparix/PKGBUILD
new file mode 100644
index 000000000..c5a128a1a
--- /dev/null
+++ b/community/apparix/PKGBUILD
@@ -0,0 +1,27 @@
+# Contributor: Dave Pernu <u.owned@gmail.com>
+# Maintainer: Firmicus <francois.archlinux.org>
+
+pkgname=apparix
+pkgver=08.331
+_ver="08-331"
+pkgrel=2
+pkgdesc="Command line file browser with bookmark support"
+arch=('i686' 'x86_64')
+url="http://micans.org/apparix/"
+license=('GPL2')
+depends=('bash')
+options=('!docs' 'zipman')
+source=(http://micans.org/$pkgname/src/$pkgname-$_ver.tar.gz apparix.sh)
+md5sums=('0d7c9a2efecf5c7b44d2ce7c5844e5de'
+ '70b984f427572f72e3475fd176c91d16')
+
+build()
+{
+ cd ${srcdir}/$pkgname-$_ver
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR=${pkgdir} install
+
+ mkdir -p ${pkgdir}/etc/profile.d/
+ install -m755 ${srcdir}/apparix.sh ${pkgdir}/etc/profile.d/
+}
diff --git a/community/apparix/apparix.sh b/community/apparix/apparix.sh
new file mode 100644
index 000000000..9bad62b82
--- /dev/null
+++ b/community/apparix/apparix.sh
@@ -0,0 +1,52 @@
+
+
+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