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