zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: complete value of $TZ
@ 2001-10-26 12:57 Oliver Kiddle
  2001-10-26 13:11 ` Borsenkow Andrej
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kiddle @ 2001-10-26 12:57 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-26 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 12:57 PATCH: complete value of $TZ Oliver Kiddle
2001-10-26 13:11 ` Borsenkow Andrej
2001-10-26 13:31   ` Oliver Kiddle

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).