Fix bt-menu

This commit is contained in:
Przemek Grondek 2022-10-26 00:58:56 +02:00
parent 867f717c5f
commit 74c82adf73

View File

@ -9,12 +9,12 @@ bt_choice=""
function get-bt-devices() {
DEVICES=()
IFS="\n"
for device in $(bluetoothctl devices); do
IFS=' '
read -r ignore address name <<<"$(echo $device)"
while read -r device; do
address=${device:7:17}
name=${device:25}
echo "$name - $address"
DEVICES+=(["$name"]="$address")
done
done <<< "$(bluetoothctl devices)"
}
function bt-device-choice() {