浏览代码

Prevent errors in prompts if no info available.
Define empty functions instead of none at all if we can't figure out the
platform.

James Seward 11 年之前
父节点
当前提交
8cfc7d6677
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      plugins/battery/battery.plugin.zsh

+ 10 - 0
plugins/battery/battery.plugin.zsh

@@ -79,4 +79,14 @@ elif [[ $(uname) == "Linux"  ]] ; then
       echo "∞"
     fi
   }
+else
+	# Empty functions so we don't cause errors in prompts
+	function battery_pct_remaining() {
+	}
+
+	function battery_time_remaining() {
+	}
+
+	function battery_pct_prompt() {
+	}
 fi