home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / bash / completion-contrib / unace < prev    next >
Encoding:
Text File  |  2006-08-28  |  491 b   |  29 lines

  1. # unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
  2. #
  3. # $Id: unace,v 1.3 2003/12/31 08:22:37 ianmacd Exp $
  4.  
  5. _unace() 
  6. {
  7.     local cur
  8.  
  9.     COMPREPLY=()
  10.     cur=${COMP_WORDS[COMP_CWORD]}
  11.  
  12.     case "$cur" in
  13.         -*)
  14.         COMPREPLY=( $( compgen -W '-c -c- -f -f- -o -o- -p -y -y-' -- $cur ) )
  15.         ;;
  16.         *)
  17.         if [ $COMP_CWORD -eq 1 ]; then
  18.             COMPREPLY=( $( compgen -W 'e l t v x' -- $cur ) )
  19.         else
  20.             _filedir '@(ace|ACE)'
  21.         fi
  22.         ;;
  23.     esac
  24.   
  25.     return 0
  26.  
  27. }
  28. complete -F _unace -o filenames unace
  29.