]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/12_locale/12_locale.zprofile
12_locale: Detect and revert auto-correction of LC_* variables
[ax-zsh.git] / core / 12_locale / 12_locale.zprofile
index e6256eeba610a72c05205a4092431900a54cc71f..6d7e40f4f9995e20371f9b9d4805b4662fbdf673 100644 (file)
@@ -9,6 +9,7 @@
 # tset(1) behaviour.
 while true; do
        lc_messages=$(locale 2>/dev/null | fgrep LC_MESSAGES | cut -d'=' -f2)
+       [[ "$lc_messages" = '"C"' && "$LANG" != 'C' && "$LC_ALL" != 'C' ]] && lc_messages=$LANG
        lc_messages=$lc_messages:gs/\"//
        locale=$lc_messages:r
        [[ "$OSTYPE" = 'linux-gnu' && $locale != 'C' ]] \