diff options
author | Robby Russell <robby@planetargon.com> | 2013-12-02 22:39:45 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-12-02 22:39:45 -0800 |
commit | e25329fcf62f3c5c34269c78704b49f55aed6408 (patch) | |
tree | d7874b5c9d5860fad8859e89a2805e2f34e12418 /plugins/battery/battery.plugin.zsh | |
parent | fb614a0e80b507e847007d76b9d20ab2828b3af5 (diff) | |
parent | 8cfc7d66774e12c8502b63ed0c48f3a216c33acf (diff) | |
download | zsh-e25329fcf62f3c5c34269c78704b49f55aed6408.tar.gz zsh-e25329fcf62f3c5c34269c78704b49f55aed6408.tar.bz2 zsh-e25329fcf62f3c5c34269c78704b49f55aed6408.zip |
Merge pull request #2222 from jamesoff/fix-battery-plugin
Prevent errors in prompts if no battery info available.
Diffstat (limited to 'plugins/battery/battery.plugin.zsh')
-rw-r--r-- | plugins/battery/battery.plugin.zsh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 66bf46d13..9f053383a 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/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 |