Override LC_TIME

I want a 24 hour clock, so I can't use en_US. However, other locales may
not be installed, so try a few likely candidates ordered by by
readability of the output of date(1).
This commit is contained in:
Peter J. Holzer 2024-02-01 14:45:34 +01:00
parent 71f5d92587
commit 6460b497a9
1 changed files with 13 additions and 0 deletions

13
.zshenv
View File

@ -109,6 +109,19 @@ then
unsetopt NULL_GLOB
fi
for i in ~/bin/match_locale /usr/bin/match_locale
do
if [ -x "$i" ]
then
match_locale="$i"
break
fi
done
if [ -n "$match_locale" ]
then
LC_TIME=$($match_locale LC_TIME en_IE.UTF-8 en_AU.UTF-8 en_GB.UTF-8 en_DK.UTF-8 C.UTF-8)
fi
case "$LANG" in
*.iso88591)
export LESSCHARSET=latin1