diff options
author | James Seward <james@jamesoff.net> | 2013-11-04 21:00:11 -0500 |
---|---|---|
committer | James Seward <james@jamesoff.net> | 2013-11-04 21:00:11 -0500 |
commit | 8cfc7d66774e12c8502b63ed0c48f3a216c33acf (patch) | |
tree | fe3c9dbd51f0d752010101f890e1c562176bdcb2 /plugins | |
parent | e30a1243dc89814e9f31e4b4cc284d948ecbfbd8 (diff) | |
download | zsh-8cfc7d66774e12c8502b63ed0c48f3a216c33acf.tar.gz zsh-8cfc7d66774e12c8502b63ed0c48f3a216c33acf.tar.bz2 zsh-8cfc7d66774e12c8502b63ed0c48f3a216c33acf.zip |
Prevent errors in prompts if no info available.
Define empty functions instead of none at all if we can't figure out the
platform.
Diffstat (limited to 'plugins')
-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 |