Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 2/5: _wget: complete headers for --header and add --no-use-server-timestamps
- X-seq: zsh-workers 36117
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 2/5: _wget: complete headers for --header and add --no-use-server-timestamps
- Date: Wed, 12 Aug 2015 05:05:00 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=LjkWiO7Dfi8XeVJheYmLadDK9NbVim3LY48YG3HtQY0=; b=MHkve0K39BQm+4NxFI4y/AT9gYjKTKPs8p0SpWYGpKlpdJb9YdKLTedq4DbhQTetHM 97zaaqHs8V2AhsJBbuCawM3MrdnEsq8kRtB15q/ZFlxrBBHcv2xAZyokvpYsZHgDny5J bdOIWX/usSD1VwwdzxQ5l/n4fSy8ElUs8DBdDy4vZIz/4zEvSIz9tNruluZZVbxoBFWr DlqOIozelSi0wH4gsunX5xXJW+xIxozx6xTo79Lk7tRJRkxtIcelnbtGCnb7wMbk1u3I RAzoE8d8FaIGn1dwOGVdDVjaBj5Tk6OZZEhQfDKL15N1TAq/c6fn5r4rsM/QOcUMiLvf /cbQ==
- In-reply-to: <1439348703-8268-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author