diff --git a/wifi-qr b/wifi-qr index 5c7fa69..7b3820b 100755 --- a/wifi-qr +++ b/wifi-qr @@ -111,13 +111,13 @@ call_wifi_terminal() { IFS=$'\r\n' GLOBIGNORE='*' command eval 'wifilist=($(nmcli -g NAME,TYPE connection | grep 802-11-wireless | cut -f1 -d":"))' OLD_IFS=$IFS IFS=$'\n' - for l in ${wifilist[@]}; do + for l in "${wifilist[@]}"; do array[$i]=$l i=$(($i + 1)) done i=0 - for m in ${array[@]}; do + for m in "${array[@]}"; do echo echo "$((i++))) $(basename "$m")" done