From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7151 invoked from network); 26 Oct 2001 12:58:39 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?g/lgwEpqhmnKJe+7sXrLUguehXJIvMKh?@203.24.36.3) by ns1.primenet.com.au with SMTP; 26 Oct 2001 12:58:39 -0000 Received: (qmail 5184 invoked from network); 26 Oct 2001 12:58:36 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 26 Oct 2001 12:58:36 -0000 Received: (qmail 26481 invoked by alias); 26 Oct 2001 12:58:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16174 Received: (qmail 26470 invoked from network); 26 Oct 2001 12:58:19 -0000 X-VirusChecked: Checked Sender: kiddleo@cav.logica.co.uk Message-ID: <3BD95DCC.BE496C68@yahoo.co.uk> Date: Fri, 26 Oct 2001 13:57:48 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: PATCH: complete value of $TZ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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