summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_wget41
2 files changed, 43 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 77e18c537..4a5127ed0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
 
 	* 36116: Completion/Unix/Command/_git: various fixes
 
+	* 36117: Completion/Unix/Command/_wget: complete headers for
+	--header and add --no-use-server-timestamps
+
 2015-08-11  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 36108: NEWS: list of major changes so far since 5.0.8
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index b8ca2fd93..b6feab581 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -63,7 +63,7 @@ _arguments -C -s \
   '--default-page=[specify default page name, normally index.html]' \
   '(--adjust-extension -E)'{--adjust-extension,-E}'[save all HTML/CSS documents with proper extensions]' \
   "--ignore-length[ignore \`Content-Length' header field]" \
-  '*--header=:string' \
+  '*--header=[send a custom HTTP header]:header:->header' \
   '--max-redirect=:number' \
   '--proxy-user=:user' \
   '--proxy-password=:password' \
@@ -132,6 +132,7 @@ _arguments -C -s \
   '--no-clobber' \
   '--no-directories' \
   '--no-host-directories' \
+  '--no-use-server-timestamps[do not set timestamp to server provided value]' \
   '--htmlify=:htmlify:' \
   '--no:no:->noflags' \
   '*:URL:_urls' && return 0
@@ -156,4 +157,42 @@ case "$state" in
       '(unix)windows' \
       '(unix windows)nocontrol'
   ;;
+  header)
+    local -a headers
+    headers=(
+             Accept{,-{Charset,Encoding,Language,Datetime}}
+             Authorization
+             Cache-Control
+             Connection
+             Cookie
+             Content-{Length,MD5,Type}
+             Date
+             Expect
+             From
+             Host
+             If-Match
+             If-Modified-Since
+             If-None-Match
+             If-Range
+             If-Unmodified-Since
+             Max-Forwards
+             Pragma
+             Proxy-Authorization
+             Range
+             Referer
+             TE
+             Upgrade
+             User-Agent
+             Via
+             Warning
+             X-Requested-With
+             X-Do-Not-Track
+             DNT
+             X-Forwarded-For
+             X-ATT-DeviceId
+             X-Wap-Profile
+             )
+    headers=($^headers\\:\ )
+    _describe -t header 'HTTP header' headers
+  ;;
 esac