zshrc: fix locale when C.UTF-8 not exists

This commit is contained in:
xiongdian.me 2022-11-30 13:02:20 +08:00
parent afd7491ae8
commit 8a660cb324

View File

@ -1,7 +1,12 @@
# env for shell
export TERM="xterm-256color"
if ( locale -a | grep -qxE "C.UTF-8|C.utf8" ); then
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
else
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
fi
export DOTFILES=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
export PATH="$PATH:$DOTFILES/scripts"
export EDITOR='vim'