Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH 8/8: _adb: also replace model names, since device names aren't sent on wifi listing



---
 Completion/Unix/Command/_adb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Completion/Unix/Command/_adb b/Completion/Unix/Command/_adb
index 5e7fbf8d0f..8a071fa8ee 100644
--- a/Completion/Unix/Command/_adb
+++ b/Completion/Unix/Command/_adb
@@ -498,6 +498,8 @@ _adb_device_serial() {
   for device in $device_desc; do
     if [[ -n $devices[(r)${device%:*}:*] ]]; then
       devices[(i)${device%:*}:*]=$device
+    elif [[ -n $devices[(r)*:${device%:*}] ]]; then
+      devices[(i)*:${device%:*}]=${${devices[(r)*:${device%:*}]}%:*}:${device#*:}
     fi
   done
   _describe -t dev_serial 'available device' devices
-- 
2.15.1





Messages sorted by: Reverse Date, Date, Thread, Author