zsh: fix TZ= completion
This commit is contained in:
parent
8a2ec31e22
commit
af9f38c205
@ -18,6 +18,11 @@ stdenv.mkDerivation {
|
||||
sha256 = "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix location of timezone data for TZ= completion
|
||||
./tz_completion.patch
|
||||
];
|
||||
|
||||
buildInputs = [ ncurses pcre ];
|
||||
|
||||
configureFlags = [
|
||||
|
14
pkgs/shells/zsh/tz_completion.patch
Normal file
14
pkgs/shells/zsh/tz_completion.patch
Normal file
@ -0,0 +1,14 @@
|
||||
On NixOS, timezone data is located at /etc/zoneinfo
|
||||
diff --git a/Completion/Unix/Type/_time_zone b/Completion/Unix/Type/_time_zone
|
||||
index cd924bbc7..5d683291b 100644
|
||||
--- a/Completion/Unix/Type/_time_zone
|
||||
+++ b/Completion/Unix/Type/_time_zone
|
||||
@@ -3,7 +3,7 @@
|
||||
local expl
|
||||
|
||||
if (( ! $+_zoneinfo_dirs )); then
|
||||
- _zoneinfo_dirs=( /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) )
|
||||
+ _zoneinfo_dirs=( /etc/zoneinfo /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) )
|
||||
fi
|
||||
|
||||
_wanted time-zones expl 'time zone' _files -W _zoneinfo_dirs "$@" -
|
Loading…
Reference in New Issue
Block a user