Merge pull request #23 from ldidry/master

Bugfix battery zsh
This commit is contained in:
nojhan 2012-08-13 00:32:57 -07:00
commit a96b5934e2

View File

@ -626,7 +626,7 @@ __svn_branch_color()
__battery()
{
command -v acpi >/dev/null 2>&1 || return 4; # or no battery support
local acpi=$(acpi --battery 2>/dev/null)
local acpi="$(acpi --battery 2>/dev/null)"
local bat=$( echo $acpi | sed "s/^Battery .*, \([0-9]*\)%.*$/\1/")
if [[ -z "${bat}" ]] ; then