summaryrefslogtreecommitdiff
path: root/plugins/battery
diff options
context:
space:
mode:
authorChristian Höltje <choltje@us.ibm.com>2014-04-23 10:13:26 -0400
committerChristian Höltje <docwhat@gerf.org>2014-07-23 09:18:14 -0400
commit63bae2aba9c43a70bbb374fc46e287d7bc46cc54 (patch)
tree6788a4a11930acca085bafb3d1b0610a8de14dd8 /plugins/battery
parent207b6a1e338e03ba06cccf255fbaa7e6147e8f94 (diff)
downloadzsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.tar.gz
zsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.tar.bz2
zsh-63bae2aba9c43a70bbb374fc46e287d7bc46cc54.zip
Use $OSTYPE instead of uname to speed things up
The $OSTYPE variable is set at ZSH compile time and can be safely used to determine the OS of the system. e.g. darwin (os x)
Diffstat (limited to 'plugins/battery')
-rw-r--r--plugins/battery/battery.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh
index 32dd4b624..014bb15dd 100644
--- a/plugins/battery/battery.plugin.zsh
+++ b/plugins/battery/battery.plugin.zsh
@@ -8,7 +8,7 @@
# Modified to add support for Apple Mac #
###########################################
-if [[ $(uname) == "Darwin" ]] ; then
+if [[ "$OSTYPE" = darwin* ]] ; then
function battery_pct() {
local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"