1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-09-24 12:30:08 +00:00

fix netstat parsing on macos

This commit is contained in:
romkatv 2020-02-05 16:38:09 +01:00
parent 80015c7c71
commit 01cce2c4eb

View file

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