From 01cce2c4eb91bbcfa08394b452f88b872df356f5 Mon Sep 17 00:00:00 2001
From: romkatv <roman.perepelitsa@gmail.com>
Date: Wed, 5 Feb 2020 16:38:09 +0100
Subject: fix netstat parsing on macos

---
 internal/p10k.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'internal')

diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 34663187..7fe3f237 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4607,7 +4607,7 @@ function _p9k_prompt_net_iface_async() {
          _p9k_read_file /sys/class/net/$iface/statistics/tx_bytes; then
         ip_tx_bytes=$_p9k_ret
       fi
-    elif [[ $_p9k_os == (BSD|OSX) && $commands[netstat] == 1 ]]; then
+    elif [[ $_p9k_os == (BSD|OSX) && $+commands[netstat] == 1 ]]; then
       local -a lines
       if lines=(${(f)"$(netstat -inbI $iface)"}); then
         local header=($=lines[1])
-- 
cgit v1.2.3