ambient_get_ssid: don't truncate SSID at first space

This commit is contained in:
Erika 2022-03-11 18:59:26 +00:00
parent 28b7c9d3bf
commit 3647cef82a

View file

@ -3,7 +3,7 @@ function ambient_get_ssid
if test (uname) = "Darwin" if test (uname) = "Darwin"
set -g ambient_ssid (/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -n 's/^ *SSID: //p') set -g ambient_ssid (/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -n 's/^ *SSID: //p')
else else
set -g ambient_ssid (iw dev | grep ssid | awk '{print $2}') set -g ambient_ssid (iw dev | grep ssid | sed -n 's/^\s*ssid //p')
end end
end end
echo $ambient_ssid echo $ambient_ssid