aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2022-06-28 18:22:23 -0400
committerRyan Kavanagh <rak@rak.ac>2022-06-28 18:22:23 -0400
commit7a75878b399e50c57a4344024773983e49ab85e1 (patch)
tree793fc010f33c83fe2ecf4d109ad6347941c4d2a8
parentOnly expand passwords if defined (diff)
Programmatically pick best locale
-rw-r--r--dot_zshrc.tmpl6
1 files changed, 5 insertions, 1 deletions
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