From 88b4f21dd842a7a26188860aa97a22ac94608a27 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 30 Jun 2012 00:46:18 +0900 Subject: [PATCH] fix bug --- bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 1f92afe..9500a0f 100755 --- a/bashrc +++ b/bashrc @@ -481,7 +481,8 @@ __my_ps1_bttry(){ local bst="/tmp/${USER}-tmp/batterystatus" if test -z "$DISPLAY" && ! iswindows then - test -f $bst && echo "[Battery:$(cat $bst)]" + test -f $bst && local bstr="$(cat $bst)" + test -n "$bstr" && echo "[Battery:$bstr]" __my_battery_status %s >$bst & fi return $last