summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_adb2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6213ea597..cde6bfc2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,9 @@
* 49967: Completion/Unix/Command/_adb: _adb: Handle dumpsys
SurfaceFlinger arguments
+ * 49968: Completion/Unix/Command/_adb: _adb: also replace model
+ names, since device names aren't sent on wifi listing
+
2022-04-02 dana <dana@dana.is>
* unposted (see 48073): Completion/Zsh/Command/_fc: Complete
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