diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2016-03-18 17:16:54 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2016-03-18 17:23:37 +0100 |
commit | bc0c3caf607d93f75de4c32e5dc485b5475ca8ae (patch) | |
tree | 07d90e6b0279e7357bd34feb49299d2f2c62e0d9 /Completion | |
parent | 5deb57714fc799918552b22f077cc4b1daf1f68f (diff) | |
download | zsh-bc0c3caf607d93f75de4c32e5dc485b5475ca8ae.tar.gz zsh-bc0c3caf607d93f75de4c32e5dc485b5475ca8ae.tar.xz zsh-bc0c3caf607d93f75de4c32e5dc485b5475ca8ae.zip |
38179: _adb: Fix completion by mostly reverting 35531
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Command/_adb | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/Completion/Unix/Command/_adb b/Completion/Unix/Command/_adb index 88aca2464..fa05226ce 100644 --- a/Completion/Unix/Command/_adb +++ b/Completion/Unix/Command/_adb @@ -37,34 +37,45 @@ _adb() { local -a ALL_ADB_COMMANDS ALL_ADB_COMMANDS=( + "backup" + "bugreport" "connect" + "devices" + "disable-verity" "disconnect" - "shell" - "wait-for-device" - "push" - "pull" - "logcat" - "jdwp" - "bugreport" - "version" + "emu" + "enable-verity" "forward" - "install" - "uninstall" + "get-devpath" + "get-serialno" + "get-state" "help" - "start-server" + "install" + "install-multiple" + "jdwp" + "keygen" "kill-server" - "devices" - "get-state" - "get-serialno" - "status-window" - "remount" + "logcat" + "ppp" + "pull" + "push" "reboot" "reboot-bootloader" + "remount" + "restore" + "reverse" "root" - "usb" - "tcpip" + "shell" "sideload" - "ppp" + "start-server" + "status-window" + "sync" + "tcpip" + "uninstall" + "unroot" + "usb" + "version" + "wait-for-device" ) (( $+functions[_adb_device_specification] )) && _adb_device_specification @@ -100,28 +111,29 @@ _adb_dispatch_command () { fi case ${curcontext} in - (*:adb-shell) + (*:adb:shell) (( $+functions[_adb_dispatch_shell] )) && _adb_dispatch_shell ;; - (*:adb-connect|*:adb-disconnect) + (*:adb:connect|*:adb:disconnect) (( $+functions[_adb_dispatch_connection_handling] )) && _adb_dispatch_connection_handling ;; - (*:adb-logcat) + (*:adb:logcat) (( $+functions[_adb_dispatch_logcat] )) && _adb_dispatch_logcat ;; - (*:adb-push) + (*:adb:push) (( $+functions[_adb_dispatch_push] )) && _adb_dispatch_push ;; - (*:adb-pull) + (*:adb:pull) (( $+functions[_adb_dispatch_pull] )) && _adb_dispatch_pull ;; - (*:adb-install) + (*:adb:install) (( $+functions[_adb_dispatch_install] )) && _adb_dispatch_install ;; - (*:adb-uninstall) + (*:adb:uninstall) (( $+functions[_adb_dispatch_uninstall] )) && _adb_dispatch_uninstall ;; - (*:adb-*) + (*:adb:(${(~j:|:)ALL_ADB_COMMANDS})) + # subcommand not handled _default ;; (*) @@ -147,7 +159,7 @@ _adb_sanitize_context () { done ##expand unquoted to remove sparse elements mywords=( ${mywords[@]} ) - (( $#mywords )) && curcontext="${curcontext%:*}-${mywords[-1]}:" + curcontext="${curcontext}${mywords[-1]}" } (( $+functions[_adb_device_specification] )) || |