Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _time_zone gives me candidates other than timezones



> 2022/04/07 5:11、Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>のメール:
> 
> 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 "$@" -








Messages sorted by: Reverse Date, Date, Thread, Author