From a00cb84da48b1f53a67c0ed43c90e6b4f720262f Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 4 Feb 2019 15:40:31 +0100 Subject: Fix regular expression and test --- functions/utilities.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functions/utilities.zsh') diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 9a72eab8..5532eef6 100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -402,7 +402,7 @@ function p9k::parseIp() { for interfaceName in $relevantInterfaces; do local interface="$(${ROOT_PREFIX}/sbin/ifconfig $interfaceName 2>/dev/null)" # Check if interface is UP. - if [[ "${interface/${newline}/}" =~ "]*>(.*?)inet[ ]*([^ ]*)" ]]; then + if [[ "${interface/${newline}/}" =~ "]*>(.*)inet[ ]*([^ ]*)" ]]; then echo "${match[3]}" return 0 fi -- cgit v1.2.3