--- a/.bash_prompt Mon Aug 25 14:54:43 2014 +0900
+++ b/.bash_prompt Wed Aug 27 03:39:55 2014 +0900
- local PROMPT_TEMPLATE="${P}{branch|quiet}☿{rev}{$R{update}}{$G+{rev|merge}}$R{status|modified}${RESET}"
local TIME="${G}\t${RESET}"
if [[ ${EUID} == 0 ]] ; then
if [[ "$HG_TRACKED" ]] ; then
- local SUM=$(LC_ALL=C hg sum)
+ local SUM=$(LC_ALL=C hg sum 2>/dev/null)
local PARENTS=($(grep -Po '(?<=parent: ).*(?=:)' <<< "$SUM"))
local BRANCH=$(grep -Po '(?<=branch: ).*$' <<< "$SUM")
local COMMIT=$(grep -Po '(?<=commit: ).*$' <<< "$SUM")
local HG_INFO=" ${P}${BRANCH}☿${REV}${R}${UPDATE}${G}${MERGEREV}${R}${COMMIT}${RESET}"
if [[ "$GIT_TRACKED" ]] ; then
- local GIT_STATUS=$(git status 2>/dev/null)
- local GIT_BRANCH=$(grep 'On branch' <<< "$GIT_STATUS" | cut -d' ' -f3-)
+ local GIT_STATUS=$(LC_ALL=C git status 2>/dev/null)
+ local GIT_BRANCH=$(grep -Po '(?<=On branch ).*$' <<< "$GIT_STATUS")
if [[ $(grep "Your branch is behind" <<< "$GIT_STATUS") ]]; then