mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 09:41:44 +02:00
43819: expand adb completion to also cover options to adb backup
This commit is contained in:
parent
082f703ccd
commit
0b3b52778b
2 changed files with 19 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2018-11-12 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* 43819: Completion/Unix/Command/_adb: expand adb completion to
|
||||
also cover options to adb backup
|
||||
|
||||
* 43818: Completion/Zsh/Type/_module_math_func: complete math
|
||||
functions for other modules besides zsh/mathfunc
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@ _adb_dispatch_command () {
|
|||
(*:adb-shell:)
|
||||
(( $+functions[_adb_dispatch_shell] )) && _adb_dispatch_shell
|
||||
;;
|
||||
(*:adb-backup:)
|
||||
(( $+functions[_adb_dispatch_backup] )) && _adb_dispatch_backup
|
||||
;;
|
||||
(*:adb-connect:|*:adb-disconnect:)
|
||||
(( $+functions[_adb_dispatch_connection_handling] )) && _adb_dispatch_connection_handling
|
||||
;;
|
||||
|
@ -191,6 +194,18 @@ _adb_dispatch_shell () {
|
|||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_adb_dispatch_backup] )) ||
|
||||
_adb_dispatch_backup() {
|
||||
_arguments \
|
||||
'-f[specify backup file]:backup file:_files' \
|
||||
'-apk[backup .apk files]' '!(-apk)-noapk' \
|
||||
'-obb[backup .obb files]' '!(-obb)-noobb' \
|
||||
'-shared[backup shared storage]' '!(-shared)-noshared' \
|
||||
'-all[backup all installed apps]' \
|
||||
'-nosystem[include system apps when backing up all apps]' '!(-nosystem)-system' \
|
||||
'*:package name:_adb_installed_packages'
|
||||
}
|
||||
|
||||
(( $+functions[_adb_pm_list] )) ||
|
||||
_adb_pm_list () {
|
||||
case ${words[4]} in
|
||||
|
@ -298,7 +313,7 @@ _adb_package_manager_handler () {
|
|||
(getInstallLocation)
|
||||
;;
|
||||
(*)
|
||||
_wanted pm_argument expl 'pm argument' compadd list path install unistall enable disable setInstallLocation getInstallLocation
|
||||
_wanted pm_argument expl 'pm argument' compadd list path install uninstall enable disable setInstallLocation getInstallLocation
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue