diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2019-02-22 20:16:33 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2019-02-22 20:16:33 +0300 |
commit | 1049bca47373e1d8700dc81d2c61a30d83cbb899 (patch) | |
tree | 7bb52469d302542eaabd391b52f733720fd74733 /functions | |
parent | fef639eb488fb99007526cfa2d1d09c901fca3cc (diff) |
Strip all newlines from ifconfig output
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/utilities.zsh | 2 |
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 |