From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH 2/5: _wget: complete headers for --header and add --no-use-server-timestamps
Date: Wed, 12 Aug 2015 05:05:00 +0200 [thread overview]
Message-ID: <1439348703-8268-2-git-send-email-mikachu@gmail.com> (raw)
In-Reply-To: <1439348703-8268-1-git-send-email-mikachu@gmail.com>
---
Completion/Unix/Command/_wget | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index b8ca2fd..b6feab5 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
--
2.4.0
next prev parent reply other threads:[~2015-08-12 3:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 3:04 PATCH 1/5: _git: various fixes Mikael Magnusson
2015-08-12 3:05 ` Mikael Magnusson [this message]
2015-08-12 3:05 ` PATCH 3/5: _imagemagick: complete all files if image files didn't match Mikael Magnusson
2015-08-12 17:20 ` Oliver Kiddle
2015-08-12 18:12 ` Mikael Magnusson
2015-08-12 18:59 ` Bart Schaefer
2015-08-12 19:35 ` Mikael Magnusson
2015-08-12 19:42 ` Bart Schaefer
2015-08-12 20:05 ` Mikael Magnusson
2015-08-12 20:57 ` Bart Schaefer
2015-08-12 21:15 ` Mikael Magnusson
2015-08-12 21:44 ` Bart Schaefer
2015-08-12 22:34 ` Mikael Magnusson
2015-08-12 22:46 ` Bart Schaefer
2015-08-12 23:37 ` Mikael Magnusson
2015-08-13 10:12 ` Oliver Kiddle
2015-08-13 20:27 ` Bart Schaefer
2015-08-14 8:44 ` Oliver Kiddle
2015-08-14 16:18 ` Mikael Magnusson
2015-08-14 16:24 ` Bart Schaefer
2015-08-14 22:31 ` Mikael Magnusson
2015-08-15 0:05 ` Bart Schaefer
2015-08-15 0:52 ` Mikael Magnusson
2015-08-12 3:05 ` PATCH 4/5: _sort: Fix syntax error Mikael Magnusson
2015-08-12 3:05 ` PATCH 5/5: _strftime: Add completion for zsh/datetime's strftime builtin Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439348703-8268-2-git-send-email-mikachu@gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).