From 6273d430f2e40bfd90cede809ac46008cada234d Mon Sep 17 00:00:00 2001 From: Volodymyr Date: Fri, 13 Jan 2017 12:47:11 +0200 Subject: [PATCH] add '-s' attribute Very ofter a want use '-s' for run command for the specific device. But in the previous version when I input '-s' I can not show hint about command. (I fixed this) --- plugins/adb/_adb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/adb/_adb b/plugins/adb/_adb index f30f3247f..a16c134db 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -34,13 +34,29 @@ _1st_arguments=( 'wait-for-device:block until device is online' ) +local -a serial +serial=( +'-s:run command only for the selected device by device code or ip:port from adb devices' +) + local expl local -a pkgs installed_pkgs _arguments \ '*:: :->subcmds' && return 0 -if (( CURRENT == 1 )); then +if ((CURRENT == 1)) then + _describe -t commands "adb subcommand" _1st_arguments + _describe -t commands "adb subcommand" serial + return +fi + +if ((CURRENT == 2)) then + return +fi + + +if ((CURRENT == 3)) then _describe -t commands "adb subcommand" _1st_arguments return fi