aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-20 15:56:43 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-20 15:56:43 +0300
commite537a0ee628341741f20a7d2d96ea1c4fac74c4a (patch)
tree722bb8233e62285114ca22f0b684595061229777 /config
parenta5e9af847d7052d920a340e12b823e600ae10a9e (diff)
better utf-8 handling
Diffstat (limited to 'config')
-rw-r--r--config/p10k-classic.zsh3
-rw-r--r--config/p10k-lean.zsh3
2 files changed, 4 insertions, 2 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 5eb4f7de..6be7c45c 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -16,7 +16,8 @@ fi
() {
emulate -L zsh
setopt no_unset
- if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then
+ zmodload zsh/langinfo
+ if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
fi
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index 8704c59b..696d6a4e 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -16,7 +16,8 @@ fi
() {
emulate -L zsh
setopt no_unset
- if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then
+ zmodload zsh/langinfo
+ if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
fi