diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/p10k-classic.zsh | 4 | ||||
-rw-r--r-- | config/p10k-lean.zsh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index affca816..7d73e965 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -16,7 +16,9 @@ fi () { emulate -L zsh setopt no_unset - local LC_ALL=C.UTF-8 + if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then + local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} + fi # Unset all configuration options. This allows you to apply configiguration changes without # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 5b4183ff..2a9f8f2a 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -16,7 +16,9 @@ fi () { emulate -L zsh setopt no_unset - local LC_ALL=C.UTF-8 + if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then + local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} + fi # Unset all configuration options. This allows you to apply configiguration changes without # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. |