25836e227c58f98af3136d0721ae8ee78271e1c5

Author
Marc Cornellà <marc@mcornella.com>
Committer
Marc Cornellà <marc@mcornella.com>
Date

Message

refactor(adb): remove outdated completion plugin `adb` (#12576)

BREAKING CHANGE: the `adb` plugin has been removed in favor of the completion
provided out-of-the-box by zsh since 4.3.14.

This commit removes plugin `adb`, which bundles custom completion for the
`adb` tool for Android. `adb` completion is already supported out of the
box in zsh 4.3.14 and older.

Reference: https://github.com/zsh-users/zsh/commit/d1a557d008b7fa7881327acbd6decdb50631cc9c

Diff

 1diff --git a/plugins/adb/README.md b/plugins/adb/README.md
 2deleted file mode 100644
 3index 83dcc728808eb0b7a38190b6c18aecdbb69e178f..0000000000000000000000000000000000000000
 4--- a/plugins/adb/README.md
 5+++ /dev/null
 6@@ -1,8 +0,0 @@
 7-# adb autocomplete plugin
 8-
 9-* Adds autocomplete options for all adb commands.
10-* Add autocomplete for `adb -s`
11-
12-## Requirements
13-
14-In order to make this work, you will need to have the Android adb tools set up in your path.
15diff --git a/plugins/adb/_adb b/plugins/adb/_adb
16deleted file mode 100644
17index 78c4577462cfea022527095f380ca39f0363b934..0000000000000000000000000000000000000000
18--- a/plugins/adb/_adb
19+++ /dev/null
20@@ -1,67 +0,0 @@
21-#compdef adb
22-#autoload
23-
24-# in order to make this work, you will need to have the android adb tools
25-
26-# adb zsh completion, based on homebrew completion
27-
28-local -a _1st_arguments
29-_1st_arguments=(
30-'bugreport:return all information from the device that should be included in a bug report.'
31-'connect:connect to a device via TCP/IP Port 5555 is default.'
32-'devices:list all connected devices'
33-'disconnect:disconnect from a TCP/IP device. Port 5555 is default.'
34-'emu:run emulator console command'
35-'forward:forward socket connections'
36-'get-devpath:print the device path'
37-'get-serialno:print the serial number of the device'
38-'get-state:print the current state of the device: offline | bootloader | device'
39-'help:show the help message'
40-'install:push this package file to the device and install it'
41-'jdwp:list PIDs of processes hosting a JDWP transport'
42-'keygen:generate adb public/private key'
43-'kill-server:kill the server if it is running'
44-'logcat:view device log'
45-'pull:copy file/dir from device'
46-'push:copy file/dir to device'
47-'reboot:reboots the device, optionally into the bootloader or recovery program'
48-'reboot-bootloader:reboots the device into the bootloader'
49-'remount:remounts the partitions on the device read-write'
50-'root:restarts the adbd daemon with root permissions'
51-'sideload:push a ZIP to device and install it'
52-'shell:run remote shell interactively'
53-'sync:copy host->device only if changed (-l means list but dont copy)'
54-'start-server:ensure that there is a server running'
55-'tcpip:restart host adb in tcpip mode'
56-'uninstall:remove this app package from the device'
57-'usb:restart the adbd daemon listing on USB'
58-'version:show version num'
59-'wait-for-device:block until device is online'
60-)
61-
62-local expl
63-local -a pkgs installed_pkgs
64-
65-_arguments \
66-	'-s[devices]:specify device:->specify_device' \
67-	'*:: :->subcmds' && return 0
68-
69-case "$state" in
70-	specify_device)
71-	_values -C 'devices' ${$(adb devices -l|awk 'NR>1&& $1 \
72-		{sub(/ +/," ",$0); \
73-		gsub(":","\\:",$1); \
74-		for(i=1;i<=NF;i++) {
75-			if($i ~ /model:/) { split($i,m,":") } \
76-			else if($i ~ /product:/) { split($i,p,":") } } \
77-		printf "%s[%s(%s)] ",$1, p[2], m[2]}'):-""}
78-	return
79-	;;
80-esac
81-
82-if (( CURRENT == 1 )); then
83-	_describe -t commands "adb subcommand" _1st_arguments
84-	return
85-fi
86-
87-_files