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

* RE: PATCH: complete value of $TZ
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Borsenkow Andrej @ 2001-10-26 13:11 UTC (permalink / raw)
  To: 'Oliver Kiddle', zsh-workers

> -if (( ! $+_zoneinfo_dirs )); then
> -  _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(/) )
> -fi


add /usr/lib/locale/TZ plese

-andrej


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

* Re: PATCH: complete value of $TZ
  2001-10-26 13:11 ` Borsenkow Andrej
@ 2001-10-26 13:31   ` Oliver Kiddle
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Kiddle @ 2001-10-26 13:31 UTC (permalink / raw)
  To: Borsenkow Andrej; +Cc: zsh-workers

Borsenkow Andrej wrote:
> 
> > -if (( ! $+_zoneinfo_dirs )); then
> > -  _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(/) )
> > -fi
> 
> add /usr/lib/locale/TZ plese

Okay. That was an existing part of _zdump so I didn't question it.

Is the patch below right or is it something slightly different? If not,
please just commit whatever you think is right.

Cheers

Oliver

Index: Completion/Unix/Type/_time_zone
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_time_zone,v
retrieving revision 1.1
diff -u -r1.1 _time_zone
--- Completion/Unix/Type/_time_zone     2001/10/26 13:05:46     1.1
+++ Completion/Unix/Type/_time_zone     2001/10/26 13:26:09
@@ -3,7 +3,7 @@
 local expl
 
 if (( ! $+_zoneinfo_dirs )); then
-  _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(/) )
+  _zoneinfo_dirs=( /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/)
)
 fi
 
 _wanted timezone expl 'time zone' _files -W _zoneinfo_dirs

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