From f6c3a2f86a0336ef40d69e6888b70b5b8b2ecfdf Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 10 Jun 2012 05:58:28 +0200 Subject: 36117: _wget: complete headers for --header and add --no-use-server-timestamps --- Completion/Unix/Command/_wget | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_wget') 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 -- cgit 1.4.1