zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: _time_zone gives me candidates other than timezones
Date: Fri, 8 Apr 2022 16:30:26 +0900	[thread overview]
Message-ID: <907AF556-5A91-4AE1-B380-2D0884E8CB5F@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CAH+w=7YLPLqgOcm6eiGKA67SHnWTR+ESm9c3r7G+L_=hTZ2yiw@mail.gmail.com>


> 2022/04/07 5:11、Bart Schaefer <schaefer@brasslantern.com>のメール:
> 
> However, I did notice that if one explicitly attempts to start a
> timezone name with "z" or "l", the lower case file names are in fact
> offered (instead of, for example, correcting to Zulu).

Do you mean this?
If there is no time zone file/directoey staring with 'X', but there is
a non-timezone file 'xyz', say, then
TZ=x<TAB>
will still offer xyz.

diff --git a/Completion/Unix/Type/_time_zone b/Completion/Unix/Type/_time_zone
index c437252a8..a7b63adcd 100644
--- a/Completion/Unix/Type/_time_zone
+++ b/Completion/Unix/Type/_time_zone
@@ -6,4 +6,5 @@ if (( ! $+_zoneinfo_dirs )); then
   _zoneinfo_dirs=( /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) )
 fi
 
-_wanted time-zones expl 'time zone' _files -g '[A-Z]*' -W _zoneinfo_dirs "$@" -
+_wanted time-zones expl 'time zone' \
+  _files -g '[A-Z]*' -M 'm:{a-z}={A-Z}' -W _zoneinfo_dirs "$@" -






      reply	other threads:[~2022-04-08  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 18:36 Jordan Russell
2022-03-29 23:22 ` Bart Schaefer
2022-03-30  0:12   ` Aaron Schrab
2022-03-31 15:25     ` Jun. T
2022-04-05 23:18       ` Jordan Russell
2022-04-06 20:11         ` Bart Schaefer
2022-04-08  7:30           ` Jun T [this message]

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=907AF556-5A91-4AE1-B380-2D0884E8CB5F@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).