attempt to make locale workarounds more robust

This commit is contained in:
romkatv 2020-02-20 08:31:53 +01:00
commit 9ce0a0551e
3 changed files with 13 additions and 12 deletions

View file

@ -643,9 +643,9 @@ function _p9k_init_icons() {
# Sadly, this is a part of public API. Its use is emphatically discouraged.
function print_icon() {
eval "$__p9k_intro"
if (( ! $+_p9k__locale )); then
if (( ! $+__p9k_locale )); then
_p9k_init_locale
[[ -z $_p9k__locale ]] || local LC_ALL=$_p9k__locale
[[ -z $__p9k_locale ]] || local LC_ALL=$__p9k_locale
fi
_p9k_init_icons
local var=POWERLEVEL9K_$1
@ -663,9 +663,9 @@ function print_icon() {
# overrides into account.
function get_icon_names() {
eval "$__p9k_intro"
if (( ! $+_p9k__locale )); then
if (( ! $+__p9k_locale )); then
_p9k_init_locale
[[ -z $_p9k__locale ]] || local LC_ALL=$_p9k__locale
[[ -z $__p9k_locale ]] || local LC_ALL=$__p9k_locale
fi
_p9k_init_icons
local key