home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / unrar < prev    next >
Encoding:
Text File  |  2010-11-16  |  731 b   |  33 lines

  1. # unrar(1) completion
  2.  
  3. have unrar &&
  4. _unrar()
  5. {
  6.     local cur
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur
  10.  
  11.     if [[ "$cur" == -* ]] ; then
  12.         COMPREPLY=( $( compgen -W '-ad -ap -av- -c- -cfg- -cl -cu \
  13.             -dh -ep -f -idp -ierr -inul -kb -o+ -o- -ow -p -p- -r -ta \
  14.             -tb -tn -to -u -v -ver -vp -x -x@ -y' -- "$cur" ) )
  15.     else
  16.         if [ $COMP_CWORD -eq 1 ]; then
  17.             COMPREPLY=( $( compgen -W 'e l lb lt p t v vb vt x' -- "$cur" ) )
  18.         else
  19.             _filedir '@(rar|RAR)'
  20.         fi
  21.     fi
  22.  
  23. } &&
  24. complete -F _unrar -o filenames unrar
  25.  
  26. # Local variables:
  27. # mode: shell-script
  28. # sh-basic-offset: 4
  29. # sh-indent-comment: t
  30. # indent-tabs-mode: nil
  31. # End:
  32. # ex: ts=4 sw=4 et filetype=sh
  33.