1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00

wifi: recognize SSID with spaces (#1152)

This commit is contained in:
Roman Perepelitsa 2020-12-12 09:42:41 +01:00
parent b90b36251d
commit 1d99a0bac3

View file

@ -5061,7 +5061,7 @@ _p9k_prompt_wifi_async() {
lines=(${(f)"$(command iw dev $iface link)"}) || return 0
local -a match mbegin mend
for line in $lines; do
if [[ $line == (#b)[[:space:]]#SSID:[[:space:]]##([^[:space:]]##) ]]; then
if [[ $line == (#b)[[:space:]]#SSID:[[:space:]]##(*) ]]; then
ssid=$match[1]
elif [[ $line == (#b)[[:space:]]#'tx bitrate:'[[:space:]]##([^[:space:]]##)' MBit/s'* ]]; then
last_tx_rate=$match[1]