X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=etc%2Fzsh%2Fzshrc;h=3deb1e0c11cd71eeb31e4908c0214f3b315a50fe;hb=0aea68e15d4b7cda80555c3009bb95687e4fbec3;hp=a164fb869fbabd3c0d5c8152e21eea5dafe52823;hpb=db42ab724a15fdcf7d6703ac061a1996dc6fc181;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index a164fb8..3deb1e0 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1697,10 +1697,10 @@ fi batteryopenbsd(){ GRML_BATTERY_LEVEL='' -local batfull batwarn batnow num +local bat batfull batwarn batnow num for num in 0 1 ; do bat=$(sysctl -n hw.sensors.acpibat${num}) - if [[ ! -z $bat ]]; then + if [[ -n $bat ]]; then batfull=${"$(sysctl -n hw.sensors.acpibat${num}.amphour0)"%% *} batwarn=${"$(sysctl -n hw.sensors.acpibat${num}.amphour1)"%% *} batnow=${"$(sysctl -n hw.sensors.acpibat${num}.amphour3)"%% *}