From 08bead065a7a106ff7ef34217cbe4877da8ac59e Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 27 Feb 2015 13:15:29 +0100 Subject: [PATCH 1/3] adb: add sideload as a valid device command --- src/_adb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/_adb b/src/_adb index 6e252e7..2ee164b 100644 --- a/src/_adb +++ b/src/_adb @@ -199,6 +199,7 @@ _adb_device_cmds() { local commands; commands=( 'push:copy file/dir to device' 'pull:copy file/dir from device' + 'sideload:push an update using sideload' 'sync:copy host->device only if changed' 'shell:run remote shell interactively or command' 'emu:run emulator console command' From 0280621bc9c1100a4c45781822b60165d2876ec9 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 27 Feb 2015 13:16:48 +0100 Subject: [PATCH 2/3] adb: make sideload only propose zip archives This seems the only usage of sideload. The completion will take ZIP archives. However, when there is no match, any file will be completed. --- src/_adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_adb b/src/_adb index 2ee164b..f3ca68f 100644 --- a/src/_adb +++ b/src/_adb @@ -83,7 +83,7 @@ _adb() { ;; (sideload) _arguments \ - '1:local directory:_files -/' \ + '1:archive:_files -g "*.zip(-.)"' \ && ret=0 ;; (sync) From d2682f69e8dc3fcd9a7a21a0650ad1ee62c6bf90 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 27 Feb 2015 13:18:32 +0100 Subject: [PATCH 3/3] adb: first argument of push can be any file Regular files can be pushed, not only directories. --- src/_adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_adb b/src/_adb index f3ca68f..24fff44 100644 --- a/src/_adb +++ b/src/_adb @@ -71,7 +71,7 @@ _adb() { ;; (push) _arguments \ - '1:local directory:_files -/' \ + '1:files:_files' \ '2: :_adb_remote_files -/' \ && ret=0 ;;