mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 21:51:40 +02:00
38179: _adb: Fix completion by mostly reverting 35531
This commit is contained in:
parent
5deb57714f
commit
bc0c3caf60
2 changed files with 47 additions and 30 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2016-03-18 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
|
* 38179: Completion/Unix/Command/_adb: Fix completion by mostly
|
||||||
|
reverting 35531
|
||||||
|
|
||||||
2016-03-16 Frank Terbeck <ft@bewatermyfriend.org>
|
2016-03-16 Frank Terbeck <ft@bewatermyfriend.org>
|
||||||
|
|
||||||
* 38161: Completion/Unix/Command/_tmux: _tmux: Use a colon to
|
* 38161: Completion/Unix/Command/_tmux: _tmux: Use a colon to
|
||||||
|
|
|
@ -37,34 +37,45 @@ _adb() {
|
||||||
|
|
||||||
local -a ALL_ADB_COMMANDS
|
local -a ALL_ADB_COMMANDS
|
||||||
ALL_ADB_COMMANDS=(
|
ALL_ADB_COMMANDS=(
|
||||||
"connect"
|
"backup"
|
||||||
"disconnect"
|
|
||||||
"shell"
|
|
||||||
"wait-for-device"
|
|
||||||
"push"
|
|
||||||
"pull"
|
|
||||||
"logcat"
|
|
||||||
"jdwp"
|
|
||||||
"bugreport"
|
"bugreport"
|
||||||
"version"
|
"connect"
|
||||||
"forward"
|
|
||||||
"install"
|
|
||||||
"uninstall"
|
|
||||||
"help"
|
|
||||||
"start-server"
|
|
||||||
"kill-server"
|
|
||||||
"devices"
|
"devices"
|
||||||
"get-state"
|
"disable-verity"
|
||||||
|
"disconnect"
|
||||||
|
"emu"
|
||||||
|
"enable-verity"
|
||||||
|
"forward"
|
||||||
|
"get-devpath"
|
||||||
"get-serialno"
|
"get-serialno"
|
||||||
"status-window"
|
"get-state"
|
||||||
"remount"
|
"help"
|
||||||
|
"install"
|
||||||
|
"install-multiple"
|
||||||
|
"jdwp"
|
||||||
|
"keygen"
|
||||||
|
"kill-server"
|
||||||
|
"logcat"
|
||||||
|
"ppp"
|
||||||
|
"pull"
|
||||||
|
"push"
|
||||||
"reboot"
|
"reboot"
|
||||||
"reboot-bootloader"
|
"reboot-bootloader"
|
||||||
|
"remount"
|
||||||
|
"restore"
|
||||||
|
"reverse"
|
||||||
"root"
|
"root"
|
||||||
"usb"
|
"shell"
|
||||||
"tcpip"
|
|
||||||
"sideload"
|
"sideload"
|
||||||
"ppp"
|
"start-server"
|
||||||
|
"status-window"
|
||||||
|
"sync"
|
||||||
|
"tcpip"
|
||||||
|
"uninstall"
|
||||||
|
"unroot"
|
||||||
|
"usb"
|
||||||
|
"version"
|
||||||
|
"wait-for-device"
|
||||||
)
|
)
|
||||||
|
|
||||||
(( $+functions[_adb_device_specification] )) && _adb_device_specification
|
(( $+functions[_adb_device_specification] )) && _adb_device_specification
|
||||||
|
@ -100,28 +111,29 @@ _adb_dispatch_command () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${curcontext} in
|
case ${curcontext} in
|
||||||
(*:adb-shell)
|
(*:adb:shell)
|
||||||
(( $+functions[_adb_dispatch_shell] )) && _adb_dispatch_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
|
(( $+functions[_adb_dispatch_connection_handling] )) && _adb_dispatch_connection_handling
|
||||||
;;
|
;;
|
||||||
(*:adb-logcat)
|
(*:adb:logcat)
|
||||||
(( $+functions[_adb_dispatch_logcat] )) && _adb_dispatch_logcat
|
(( $+functions[_adb_dispatch_logcat] )) && _adb_dispatch_logcat
|
||||||
;;
|
;;
|
||||||
(*:adb-push)
|
(*:adb:push)
|
||||||
(( $+functions[_adb_dispatch_push] )) && _adb_dispatch_push
|
(( $+functions[_adb_dispatch_push] )) && _adb_dispatch_push
|
||||||
;;
|
;;
|
||||||
(*:adb-pull)
|
(*:adb:pull)
|
||||||
(( $+functions[_adb_dispatch_pull] )) && _adb_dispatch_pull
|
(( $+functions[_adb_dispatch_pull] )) && _adb_dispatch_pull
|
||||||
;;
|
;;
|
||||||
(*:adb-install)
|
(*:adb:install)
|
||||||
(( $+functions[_adb_dispatch_install] )) && _adb_dispatch_install
|
(( $+functions[_adb_dispatch_install] )) && _adb_dispatch_install
|
||||||
;;
|
;;
|
||||||
(*:adb-uninstall)
|
(*:adb:uninstall)
|
||||||
(( $+functions[_adb_dispatch_uninstall] )) && _adb_dispatch_uninstall
|
(( $+functions[_adb_dispatch_uninstall] )) && _adb_dispatch_uninstall
|
||||||
;;
|
;;
|
||||||
(*:adb-*)
|
(*:adb:(${(~j:|:)ALL_ADB_COMMANDS}))
|
||||||
|
# subcommand not handled
|
||||||
_default
|
_default
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
|
@ -147,7 +159,7 @@ _adb_sanitize_context () {
|
||||||
done
|
done
|
||||||
##expand unquoted to remove sparse elements
|
##expand unquoted to remove sparse elements
|
||||||
mywords=( ${mywords[@]} )
|
mywords=( ${mywords[@]} )
|
||||||
(( $#mywords )) && curcontext="${curcontext%:*}-${mywords[-1]}:"
|
curcontext="${curcontext}${mywords[-1]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
(( $+functions[_adb_device_specification] )) ||
|
(( $+functions[_adb_device_specification] )) ||
|
||||||
|
|
Loading…
Reference in a new issue