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 / bittorrent < prev    next >
Encoding:
Text File  |  2006-08-28  |  1.0 KB  |  38 lines

  1. # btdownloadheadless(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
  2. #
  3. # $Id: bittorrent,v 1.1 2004/10/14 08:53:25 ianmacd Exp $
  4. #
  5. _btdownload()
  6. {
  7.     local cur prev
  8.  
  9.     COMPREPLY=()
  10.     cur=${COMP_WORDS[COMP_CWORD]}
  11.     prev=${COMP_WORDS[COMP_CWORD-1]}
  12.  
  13.     case "$prev" in
  14.         --@(responsefile|saveas))
  15.             _filedir
  16.             return 0
  17.             ;;
  18.     esac
  19.  
  20.      if [[ "$cur" == -* ]]; then
  21.         COMPREPLY=( $( compgen -W '--max_uploads --keepalive_interval \
  22.                 --download_slice_size --request_backlog \
  23.                 --max_message_length --ip --minport --maxport \
  24.                 --responsefile --url --saveas --timeout \
  25.                 --timeout_check_interval --max_slice_length \
  26.                 --max_rate_period --bind --upload_rate_fudge \
  27.                 --display_interval --rerequest_interval \
  28.                 --min_peers --http_timeout --max_initiate \
  29.                 --max_allow_in --check_hashes \
  30.                 --max_upload_rate --snub_time --spew \
  31.                 --rarest_first_cutoff --min_uploads \
  32.                 --report_hash_failures' -- $cur ) )
  33.     else
  34.         _filedir
  35.     fi
  36. }
  37. complete -F _btdownload btdownloadheadless.py btdownloadcurses.py btdownloadgui.py
  38.