aboutsummaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-02-22 20:16:33 +0300
committerDominik Ritter <dritter03@googlemail.com>2019-02-22 20:16:33 +0300
commit1049bca47373e1d8700dc81d2c61a30d83cbb899 (patch)
tree7bb52469d302542eaabd391b52f733720fd74733 /functions/utilities.zsh
parentfef639eb488fb99007526cfa2d1d09c901fca3cc (diff)
Strip all newlines from ifconfig output
Diffstat (limited to 'functions/utilities.zsh')
-rwxr-xr-xfunctions/utilities.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index 2e6d98dd..8c18bb44 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -405,7 +405,7 @@ function p9k::parseIp() {
continue
fi
# Check if interface is UP.
- if [[ "${interface/${newline}/}" =~ "<([^>]*)>(.*)inet[ ]+([^ ]*)" ]]; then
+ if [[ "${interface//${newline}/}" =~ "<([^>]*)>(.*)inet[ ]+([^ ]*)" ]]; then
local ipFound="${match[3]}"
local -a interfaceStates=(${(s:,:)match[1]})
if [[ "${interfaceStates[(r)UP]}" == "UP" ]]; then