zshrc: fix locale (#34)

* common.sh: export vars in env; zshrc: gdebug

* fix error when locale not exists

* fix ci

Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
2022-12-10 19:11:05 +08:00
committed by GitHub
parent c3e0c28b64
commit 952bfabea4
3 changed files with 10 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
# env for shell
export TERM="xterm-256color"
if ( locale -a | grep -qxE "C.UTF-8|C.utf8" ); then
if (command -v locale >/dev/null) && ( locale -a | grep -qxE "C.UTF-8|C.utf8" ); then
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
else
@@ -100,6 +100,7 @@ alias "se"='sudo -sE'
alias "pbd"='ping baidu.com'
alias "p114"='ping 114.114.114.114'
alias "p666"='ping6 2001:da8::666'
alias "gdebug"='git add -A; git commit -m "bug fix"'
case $(bash "$DOTFILES/tools/common.sh" get_os_type) in
macos ) alias l='ls -lAGh -D "%y-%m-%d %H:%M"' ;;
* ) alias l='ls -lAGh --time-style="+%y-%m-%d %H:%M"' ;;