24 lines
632 B
Plaintext
Raw Normal View History

# unrar(1) completion -*- shell-script -*-
_unrar()
{
local cur prev words cword
_init_completion || return
if [[ "$cur" == -* ]] ; then
2009-10-04 19:42:50 +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" ) )
else
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
_filedir rar
2009-10-04 19:42:50 +02:00
fi
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _unrar unrar
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh