From 6460b497a9bf89a706ed64e4e949b6491d6a27c6 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 1 Feb 2024 14:45:34 +0100 Subject: [PATCH] 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). --- .zshenv | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.zshenv b/.zshenv index 311713c..db7271f 100644 --- a/.zshenv +++ b/.zshenv @@ -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