From 0aea68e15d4b7cda80555c3009bb95687e4fbec3 Mon Sep 17 00:00:00 2001 From: Moviuro Date: Tue, 23 Sep 2014 08:04:16 +0200 Subject: [PATCH] zshrc: little fixes Missing local variable Changed a '! -z' to '-n' test --- etc/zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)"%% *} -- 2.1.4