2011-11-01 13:14:45 -07:00
|
|
|
# unrar(1) completion -*- shell-script -*-
|
2003-01-20 22:42:46 -08:00
|
|
|
|
2009-07-25 03:38:42 -07:00
|
|
|
_unrar()
|
2003-01-20 22:42:46 -08:00
|
|
|
{
|
2011-04-21 01:04:51 -07:00
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
2003-01-20 22:42:46 -08:00
|
|
|
|
2011-11-09 13:28:11 -08:00
|
|
|
if [[ $cur == -* ]]; then
|
2013-02-17 13:49:30 -08:00
|
|
|
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" ) )
|
2009-12-29 15:31:17 -08:00
|
|
|
else
|
2011-11-09 13:28:11 -08:00
|
|
|
if [[ $cword -eq 1 ]]; then
|
2009-10-04 10:42:50 -07:00
|
|
|
COMPREPLY=( $( compgen -W 'e l lb lt p t v vb vt x' -- "$cur" ) )
|
|
|
|
else
|
2010-09-19 02:29:29 -07:00
|
|
|
_filedir rar
|
2009-10-04 10:42:50 -07:00
|
|
|
fi
|
2009-12-29 15:31:17 -08:00
|
|
|
fi
|
2009-07-25 03:38:42 -07:00
|
|
|
|
2009-06-08 11:22:43 -07:00
|
|
|
} &&
|
2010-11-01 10:26:53 -07:00
|
|
|
complete -F _unrar unrar
|
2009-10-01 10:54:51 -07:00
|
|
|
|
2009-10-04 10:42:50 -07:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|