Merge pull request #136614 from symphorien/zsh-tz-completion

zsh: fix TZ= completion

authored by Timothy DeHerrera and committed by GitHub 5fe504bf e0e88983

+19
+5
pkgs/shells/zsh/default.nix
··· 18 18 sha256 = "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"; 19 19 }; 20 20 21 + patches = [ 22 + # fix location of timezone data for TZ= completion 23 + ./tz_completion.patch 24 + ]; 25 + 21 26 buildInputs = [ ncurses pcre ]; 22 27 23 28 configureFlags = [
+14
pkgs/shells/zsh/tz_completion.patch
··· 1 + On NixOS, timezone data is located at /etc/zoneinfo 2 + diff --git a/Completion/Unix/Type/_time_zone b/Completion/Unix/Type/_time_zone 3 + index cd924bbc7..5d683291b 100644 4 + --- a/Completion/Unix/Type/_time_zone 5 + +++ b/Completion/Unix/Type/_time_zone 6 + @@ -3,7 +3,7 @@ 7 + local expl 8 + 9 + if (( ! $+_zoneinfo_dirs )); then 10 + - _zoneinfo_dirs=( /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) ) 11 + + _zoneinfo_dirs=( /etc/zoneinfo /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) ) 12 + fi 13 + 14 + _wanted time-zones expl 'time zone' _files -W _zoneinfo_dirs "$@" -