From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: PATCH: complete value of $TZ
Date: Fri, 26 Oct 2001 13:57:48 +0100 [thread overview]
Message-ID: <3BD95DCC.BE496C68@yahoo.co.uk> (raw)
I've had to set $TZ a few times recently and it would make sense to use
the completion from _zdump for this, so here's the small patch for
that.
Oliver
Index: Completion/Unix/Command/_zdump
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_zdump,v
retrieving revision 1.1
diff -u -r1.1 _zdump
--- Completion/Unix/Command/_zdump 2001/04/02 12:07:26 1.1
+++ Completion/Unix/Command/_zdump 2001/10/26 12:54:43
@@ -1,9 +1,5 @@
#compdef zdump
-if (( ! $+_zoneinfo_dirs )); then
- _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(/) )
-fi
-
_arguments '-v[lowest possible]' \
'-c[cutoff]:cutoff year:' \
- '*:timezone:_files -W _zoneinfo_dirs'
+ '*:timezone:_time_zone'
Index: Completion/Unix/Type/_time_zone
===================================================================
RCS file: _time_zone
diff -N _time_zone
--- /dev/null Thu May 24 22:33:05 2001
+++ _time_zone Fri Oct 26 05:54:43 2001
@@ -0,0 +1,9 @@
+#compdef
+
+local expl
+
+if (( ! $+_zoneinfo_dirs )); then
+ _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(/) )
+fi
+
+_wanted timezone expl 'time zone' _files -W _zoneinfo_dirs
Index: Completion/Zsh/Context/_value
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Context/_value,v
retrieving revision 1.2
diff -u -r1.2 _value
--- Completion/Zsh/Context/_value 2001/08/07 19:29:14 1.2
+++ Completion/Zsh/Context/_value 2001/10/26 12:54:43
@@ -60,4 +60,6 @@
_value:DISPLAY() { _x_display "$@" }
+_value:TZ() { _time_zone "$@" }
+
_value "$@"
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp
next reply other threads:[~2001-10-26 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-26 12:57 Oliver Kiddle [this message]
2001-10-26 13:11 ` Borsenkow Andrej
2001-10-26 13:31 ` Oliver Kiddle
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=3BD95DCC.BE496C68@yahoo.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.dk \
/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).