2009-01-14 22:17:14 +02:00
|
|
|
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
|
2009-01-17 11:38:33 +02:00
|
|
|
# ex: ts=8 sw=8 noet filetype=sh
|
2009-01-14 22:17:14 +02:00
|
|
|
#
|
2003-01-21 06:42:46 +00:00
|
|
|
# unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
|
|
|
|
|
|
|
_unrar()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2003-01-21 06:42:46 +00:00
|
|
|
|
|
|
|
case "$cur" in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '-ad -ap -av- -c- -cfg- -cl -cu \
|
|
|
|
-dh -ep -f -idp -ierr -inul -kb -o+ -o- -ow -p -p- -r -ta \
|
|
|
|
-tb -tn -to -u -v -ver -vp -x -x@ -y' -- $cur ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ $COMP_CWORD -eq 1 ]; then
|
2004-07-05 21:37:47 +00:00
|
|
|
COMPREPLY=( $( compgen -W 'e l lb lt p t v vb vt x' -- $cur ) )
|
2003-01-21 06:42:46 +00:00
|
|
|
else
|
|
|
|
_filedir '@(rar|RAR)'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
2009-02-05 10:11:24 +01:00
|
|
|
complete -F _unrar $filenames unrar
|