diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2022-04-03 18:33:59 +0200 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2022-04-03 18:33:59 +0200 |
commit | 1b62a5a0af0a189ec3acd5781f77145dcfad15ed (patch) | |
tree | d19c1a81e79890249dbdaa7a95488203d983d8c2 | |
parent | 8a60e2e21414e3651745e98e52fa288aa76113e3 (diff) | |
download | zsh-1b62a5a0af0a189ec3acd5781f77145dcfad15ed.tar.gz zsh-1b62a5a0af0a189ec3acd5781f77145dcfad15ed.tar.xz zsh-1b62a5a0af0a189ec3acd5781f77145dcfad15ed.zip |
49963: _adb: Fix device serial completion for hostname:port syntax
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_adb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 2a25a7687..20848d875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ * 49962: Completion/Unix/Command/_adb: _adb: Add dumpsys and cmd completion + * 49963: Completion/Unix/Command/_adb: _adb: Fix device serial + completion for hostname:port syntax + 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 c86f9cbd0..a429954a8 100644 --- a/Completion/Unix/Command/_adb +++ b/Completion/Unix/Command/_adb @@ -432,7 +432,7 @@ _adb_device_serial() { local expl local -a devices device_desc local device - devices=( $(adb devices -l | sed -n 's/^\([^[:space:]]*\)[[:space:]]*.*product:\([^[:space:]]*\).*$/\1:\2/p') ) + devices=( $(adb devices -l | sed -n -e 's/:/\\:/' -e 's/^\([^[:space:]]*\)[[:space:]]*.*product:\([^[:space:]]*\).*$/\1:\2/p') ) zstyle -a :completion:${curcontext} device-names device_desc for device in $device_desc; do if [[ -n $devices[(r)${device%:*}:*] ]]; then |