diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2012-06-10 05:58:28 +0200 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-08-12 17:54:24 +0200 |
commit | f6c3a2f86a0336ef40d69e6888b70b5b8b2ecfdf (patch) | |
tree | 065e20254507ec6cfbaad1abf7c47bc115a84d3c /Completion/Unix | |
parent | 8815500f95aeb7599704877a80a392321f753f43 (diff) | |
download | zsh-f6c3a2f86a0336ef40d69e6888b70b5b8b2ecfdf.tar.gz zsh-f6c3a2f86a0336ef40d69e6888b70b5b8b2ecfdf.tar.xz zsh-f6c3a2f86a0336ef40d69e6888b70b5b8b2ecfdf.zip |
36117: _wget: complete headers for --header and add --no-use-server-timestamps
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_wget | 41 |
1 files changed, 40 insertions, 1 deletions
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 |