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)
This commit is contained in:
Christian Höltje 2014-04-23 10:13:26 -04:00 committed by Christian Höltje
commit 63bae2aba9
7 changed files with 7 additions and 7 deletions

View file

@ -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")"