Skip to content

Commit 4387e06

Browse files
author
Mingcong Bai
committed
vcs: use LC_ALL instead of simply LANG
1 parent 6408d03 commit 4387e06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bashrc.d/.vcs_git

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ alias __git_branch="git branch 2>/dev/null | grep '*' | sed 's/*\ //g'"
3232
# Modified.
3333
_git_status() {
3434
git branch &>/dev/null || return 1
35-
if LANG=C git status | grep -q "nothing to commit"; then
35+
if LC_ALL=C git status | grep -q "nothing to commit"; then
3636
printf "\e[1m@\e[0;32m$(__git_branch)\e[0m"
37-
elif LANG=C git status | grep -q "nothing added to commit"; then # Untracked
37+
elif LC_ALL=C git status | grep -q "nothing added to commit"; then # Untracked
3838
printf "\e[1m@\e[0;35m$(__git_branch)\e[0m"
3939
else # Change not added/not merged yet
4040
printf "\e[1m@$IRED$(__git_branch)\e[0m"

bashrc.d/.vcs_hg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ alias ha='hg add .'
1717
# Modified for hg.
1818
_hg_status() {
1919
if hg branch &>/dev/null
20-
then if LANG=C hg status | grep " " &>/dev/null
20+
then if LC_ALL=C hg status | grep " " &>/dev/null
2121
then printf "\e[1m@\e[0;32m$(hg branch)\e[0m"
2222
else printf "\e[1m@$IRED$(hg branch)\e[0m"
2323
fi

0 commit comments

Comments
 (0)