#40 adb: Complete shell and emu commands

This commit is contained in:
Julien Nicoulaud 2011-08-09 15:00:41 +02:00
parent 9e4aaa8a7c
commit 64c106e1d3
1 changed files with 11 additions and 8 deletions

19
_adb
View File

@ -73,26 +73,23 @@ _adb() {
(push) (push)
_arguments \ _arguments \
'1:local directory:_files -/' \ '1:local directory:_files -/' \
'2:remote directory:_adb_remote_directories' \ '2: :_adb_remote_directories' \
&& ret=0 && ret=0
;; ;;
(pull) (pull)
_arguments \ _arguments \
'1:remote directory:_adb_remote_directories' \ '1: :_adb_remote_directories' \
'2:local directory:_files -/' \ '2:local directory:_files -/' \
&& ret=0 && ret=0
;; ;;
(sync) (sync)
_arguments \ _arguments \
'-l[list but do not copy]' \ '-l[list but do not copy]' \
'1:synchronized directory:_adb_sync_directories' \ '1: :_adb_sync_directories' \
&& ret=0 && ret=0
;; ;;
(shell) (shell|emu)
_message '[ <command> ]' && ret=0 # TODO Not implemented _arguments '1: :_adb_remote_commands' && ret=0
;;
(emu)
_message '<command>' && ret=0 # TODO Not implemented
;; ;;
(logcat) (logcat)
_message '[ <filter-spec> ]' && ret=0 # TODO Not implemented _message '[ <filter-spec> ]' && ret=0 # TODO Not implemented
@ -198,6 +195,12 @@ _adb_remote_directories() {
_message 'remote directory' _message 'remote directory'
} }
(( $+functions[_adb_remote_commands] )) ||
_adb_remote_commands() {
# TODO Not implemented
_message 'remote command'
}
(( $+functions[_adb_sync_directories] )) || (( $+functions[_adb_sync_directories] )) ||
_adb_sync_directories() { _adb_sync_directories() {
_alternative \ _alternative \