summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_bittorrent95
2 files changed, 52 insertions, 46 deletions
diff --git a/ChangeLog b/ChangeLog
index f09f63a40..9645c03d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-09-30  Clint Adams  <clint@zsh.org>
 
+	* 22798: R. Ramkumar: Completion/Unix/Command/_bittorrent:
+	cleanup and fixes.
+
 	* 22797: R. Ramkumar: Completion/Linux/Type/_fuse_arguments,
 	Completion/Linux/Type/_fuse_values: generic FUSE completion
 	support functions.
diff --git a/Completion/Unix/Command/_bittorrent b/Completion/Unix/Command/_bittorrent
index 58f8a46e2..b3a37f7c6 100644
--- a/Completion/Unix/Command/_bittorrent
+++ b/Completion/Unix/Command/_bittorrent
@@ -4,6 +4,9 @@
 # Pakkanen, 2004. Most of the command descriptions are from the Debian
 # project's man pages.
 
+# Modified by R.Ramkumar, 2006 to conform to zsh completion standards and
+# enhance completion for certain options.
+
 case $service in
 
 # Start with the clients.
@@ -18,35 +21,35 @@ case $service in
    ;&
  btlaunchmanycurses)
   _arguments -s -S \
-      '(--responsefile)--responsefile+[response file]:file for server response:_files -g "*"'\
-      "--url+[from URL]:URL of torrent file:"\
-      '(-i --ip)'{-i+,--ip+}'[ip address]:report argument as your ip address'\
-      "--bind+[ip]:bind to ip instead of default:"\
-      "--minport+[port]:minimum port to listen to (default 6881):"\
-      "--maxport+[port]:maximum port to listen to (default 6889):"\
-      "--saveas+[filename]:save to specified filename:_files -/"\
-      "--max_uploads+[num]:maximum amount of uploads (default 4):"\
-      "--max_upload_rate+[kbytes]:maximum rate to upload in kbytes (default no limit):"\
-      "--keepalive_interval+[secs]:pause between keepalives (default 120.0):"\
-      "--download_slice_size+[bytes]:query for bytes bytes per request (default 32768):"\
-      "--request_backlog+[num]:keep num requests in a single pipe at once (default 5):"\
-      "--max_message_length+[bytes]:max length prefix encoding you'll accept over the wire (default 8388608):"\
-      "--timeout+[secs]:wait secs before closing sockets which nothing has been recieved on (default 300.0):"\
-      "--timeout_check_interval+[secs]:check whether connections have timed out  every secs seconds (default 60.0):"\
-      "--max_slice_length+[bytes]:requests from peers larger than bytes bytes are ignored (default 131072):"\
-      "--max_rate_recalculate_interval+[secs]:connections that  pause  longer  than  secs  seconds  are  given reduced rate (default 15.0):"\
-      "--max_rate_period+[secs]:set secs to the maximum amount of time to guess the current rate estimate represents (default 20.0):"\
-      "--upload_rate_fudge+[secs]:set the time equivalent of writing to kernel-level TCP buffer to secs (default 5.0):"\
-      "--display_interval+[secs]:update displayed information every secs seconds (default 0.1):"\
-      "--rerequest_interval+[secs]:request more peers every secs seconds (default 300)"\
-      "--min_peers+[num]:do not rerequest if we have num peers already (default 20):"\
-      "--http_timeout+[secs]:wait secs seconds before assuming a http connection has timed out (default 60):"\
-      "--snub_time+[secs]:wait secs seconds for data to come in over a connection  before assuming it's semi-permanently choked (default 30.0):"\
-      "--spew+[1 | 0]:whether to display diagnostic info to stdout. (default  0):(0 1)"\
-      "--check_hashes+[1 | 0]:whether to check hashes on disk (defaults to 1):(0 1)"\
-      "--max_initiate+[num]:stop initiating new connections when we have num peers (default 40):"\
-      "--report_hash_failures+[1 | 0]:whether to report to the user that hash failuers occur (non-fatal, common error) (default 0):(0 1)"\
-      "--rarest_first_priority_cutoff+[num]:the number of peers which need to have a piece before other partials take priority over rarest first (default 3):"\
+      '(--responsefile)--responsefile+[specify file for server response]:file:_files -g "*"'\
+      "--url+[specify URL of torrent file]:URL:_urls"\
+      '(-i --ip)'{-i+,--ip+}'[specify ip address to report as]:ip address'\
+      "--bind+[specify ip to bind to instead of default]:ip:"\
+      "--minport+[specify minimum port to listen to]:port:"\
+      "--maxport+[specify maximum port to listen to]:port:"\
+      "--saveas+[specify file to save to]:file:_files -/"\
+      "--max_uploads+[specify maximum amount of uploads]:uploads:"\
+      "--max_upload_rate+[specify maximum upload rate]:rate (kb):"\
+      "--keepalive_interval+[specify pause between keepalives]:time (s):"\
+      "--download_slice_size+[specify bytes to query per request]:size (b):"\
+      "--request_backlog+[specify number of requests to keep in a single pipe]:requests:"\
+      "--max_message_length+[specify maximum length of prefix encoding]:size (b):"\
+      "--timeout+[specify timeout before closing sockets on receiving nothing]:timeout (s):"\
+      "--timeout_check_interval+[specify interval to check for connection time]:time interval (s):"\
+      "--max_slice_length+[specify maximum size of requests accepted from peers]:size (b):"\
+      "--max_rate_recalculate_interval+[specify length of pauses leading to reduced rate]:time (s):"\
+      "--max_rate_period+[specify maximum time taken to guess the current rate estimate]:time (s):"\
+      "--upload_rate_fudge+[specify time equivalent of writing to kernel TCP buffer]:time (s):"\
+      "--display_interval+[specify time between updates to displayed information]:time (s):"\
+      "--rerequest_interval+[specify time between requests for more peers]:time (s)"\
+      "--min_peers+[specify peers needed before stopping or delaying requests for peers]:peers:"\
+      "--http_timeout+[specify timeout for http connections]:timeout (s):"\
+      "--snub_time+[specify timeout to decide that connection is semi-permanently choked]:timeout (s):"\
+      "--spew+[display diagnostic info to stdout]:enable:(0 1)"\
+      "--check_hashes+[check hashes on disk]:enable:(0 1)"\
+      "--max_initiate+[specify peers needed before stopping initiating new connections]:peers:"\
+      "--report_hash_failures+[report hash failures to user]:enable:(0 1)"\
+      "--rarest_first_priority_cutoff+[specify peers which need to have a piece before other partials take priority over rarest first]:peers:"\
       ':torrent file:_files -g "*.torrent"' \
       && return 0
   ;;
@@ -63,9 +66,9 @@ case $service in
 
   btmakemetafile)
     _arguments -s -S \
-      '--piece_size_pow2+[arg]:which power of 2 to set the piece size to (default: 18)' \
-      "--comment+[arg]:optional human-readable comment to put in .torrent (defaults to '')"\
-      "--target+[arg]:optional target file for the torrent (defaults to '')"\
+      '--piece_size_pow2+[specify power of 2 to set the piece size to]:power:' \
+      "--comment+[specify human-readable comment to put in .torrent]:comment:"\
+      "--target+[specify target file for the torrent]:file:_files"\
       ':file:_files -g "*"' \
       && return 0;
   ;;
@@ -78,20 +81,20 @@ case $service in
 
   bttrack)
     _arguments -s -S \
-      "--port+[portnum]:listen on port portnum (default 80):" \
-      "--dfile+[filename]:store recent downloader info in filename:_files -/" \
-      "--bind+[ip]:bind to ip instead of the default:" \
-      "--socket_timeout+[secs]:timeout for closing connections (default 15):"\
-      "--save_dfile_interval+[secs]:seconds between saving dfile (default 300):"\
-      "--timeout_downloaders_interval+[secs]:seconds between expiring downloaders (default 2700):" \
-      "--reannounce_interval+[secs]:seconds downloaders should wait between reannouncements (default 1800):" \
-      "--response_size+[num]:number of peers to send in an info message (default 50):" \
-      "--timeout_check_interval+[secs]:time to wait between checking if any connections have timed out (default 5):"\
-      "--nat_check=[ 1 | 0 ]:whether to check back and ban downloaders behind NAT (default 1):(0 1)" \
-      "--min_time_between_log_flushes+[secs]:minimum time it must have been since the last flush to do another one (default 3.0):" \
-      "--allowed_dir+[path]:only  allow  downloads  for .torrents in this directory (default ''):_files -/" \
-      "--parse_allowed_interval+[mins]:minutes between reloading of allowed_dir (default 15):" \
-      "--show_names+[ 1 | 0 ]:whether to display names from allowed dir (default 1):(0 1)"\
+      "--port+[specify port to listen on]:port number:" \
+      "--dfile+[specify file to store recent downloader info]:file:_files" \
+      "--bind+[specify ip to bind to]:bind address:" \
+      "--socket_timeout+[specify timeout for closing connections]:timeout (s):"\
+      "--save_dfile_interval+[specify interval between saving dfile]:time (s):"\
+      "--timeout_downloaders_interval+[timeout for expiring downloaders]:time (s):" \
+      "--reannounce_interval+[specify interval downloaders should wait between reannouncements]:time (s):" \
+      "--response_size+[specify peers to send in an info message]:peers:" \
+      "--timeout_check_interval+[specify connection timeout]:timeout (s):"\
+      "--nat_check=[check back and ban downloaders behind NAT]:enable:(0 1)" \
+      "--min_time_between_log_flushes+[specify minimum time between log flushes]:time (s):" \
+      "--allowed_dir+[specify directory having downloadable torrents]:directory:_files -/" \
+      "--parse_allowed_interval+[specify interval between reloading allowed_dir]:time (min):" \
+      "--show_names+[display names from allowed dir]:enable:(0 1)"\
       && return 0
     ;;
 esac