From 7a75878b399e50c57a4344024773983e49ab85e1 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 28 Jun 2022 18:22:23 -0400 Subject: Programmatically pick best locale --- dot_zshrc.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dot_zshrc.tmpl') diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 280886c..440d86f 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -32,7 +32,11 @@ # BEGIN LOCAL -export LANG="{{ .locale }}" +if ! export LANG=$(locale -a | egrep -i "en_CA.UTF-?8"); then + if ! export LANG=$(locale -a | egrep -i "C.UTF-?8"); then + export LANG=C + fi +fi export LC_TIME="en_GB.UTF-8" export LC_COLLATE=C # force strict lexicographic sorting export TIME_STYLE=long-iso # make ls -l use YYYY-MM-DD in dired -- cgit v1.2.3