zsh-workers
 help / color / mirror / code / Atom feed
* adb pull and push remote completion
@ 2017-01-25  9:41 Dov Grobgeld
       [not found] ` <CA+mcLN77BVXV26R+NavQfDX8yCjV1CGjzKQx7LZd-E9ZYSE5rw@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Dov Grobgeld @ 2017-01-25  9:41 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

Hello,

Here's a feature request, that may or may not be supposed by the current
adb function.

In the pull or push command do remote completion of the files on the
device. The following zsh commands provides almost the functionality,
(except for "leaving" the current argument, instead of staying at it for
further completion):

function -K adblist {
  read -l cmdline;
  args=("${(@s/ /)cmdline}")

  if [[ ( $args[2] == "pull" && $#args -eq 3 )
        || ( $args[2] == "push" && $#args -eq 4) ]]; then
    reply=(`adb shell ls -a1d $1\* 2&>/dev/null`)
  else
    reply=(`ls -a1d $1*`)
  fi
}
compctl -K adblist adb

Regards,
Dov

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-21 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25  9:41 adb pull and push remote completion Dov Grobgeld
     [not found] ` <CA+mcLN77BVXV26R+NavQfDX8yCjV1CGjzKQx7LZd-E9ZYSE5rw@mail.gmail.com>
2017-02-21 13:20   ` Fwd: " Julien Nicoulaud
2017-02-21 17:23     ` Oliver Kiddle
2017-02-21 17:32       ` Julien Nicoulaud

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).