mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
Try harder when running on a system with incorrectly configured locale.
ZSH will still be broken when locale is misconfigured but at least p10k will work so users will look for help elsewhere. Fixes #173.
This commit is contained in:
+3
-1
@@ -5,7 +5,9 @@ setopt noaliases
|
||||
|
||||
() {
|
||||
setopt extended_glob no_prompt_{bang,subst} prompt_{cr,percent,sp}
|
||||
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
|
||||
|
||||
typeset -g __p9k_root_dir
|
||||
typeset -gi force=0
|
||||
|
||||
Reference in New Issue
Block a user