From 9adfd973d0359c39f7a032425099aebc6499adca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Mon, 17 Jun 2013 21:47:51 +0200 Subject: [PATCH] cpu_load: merge back Darwin and FreeBSD --- liquidprompt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/liquidprompt b/liquidprompt index 8eb389d..d04ef49 100755 --- a/liquidprompt +++ b/liquidprompt @@ -114,7 +114,7 @@ case "$LP_OS" in echo "$load" } ;; - FreeBSD) + FreeBSD|Darwin|OpenBSD) _lp_cpu_load () { local bol load eol # If you have problems with syntax coloring due to the following @@ -124,21 +124,6 @@ case "$LP_OS" in echo "$load" } ;; - Darwin) - _lp_cpu_load () { - local bol load eol - read bol load eol <<<$( LANG=C sysctl -n vm.loadavg ) - echo "$load" - } - LP_DWIN_KERNEL_REL_VER=$(uname -r | cut -d . -f 1) - ;; - OpenBSD) - _lp_cpu_load() { - local bol load eol - read one two three <<< `sysctl -n vm.loadavg` - echo "$load" - } - ;; SunOS) _lp_cpu_load () { LANG=C uptime | awk '{print substr($10,0,length($10))}'