about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_adb b/Completion/Unix/Command/_adb
index 5e7fbf8d0..8a071fa8e 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