From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16229 invoked by alias); 21 Feb 2017 13:22:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40603 Received: (qmail 6970 invoked from network); 21 Feb 2017 13:22:07 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(0.6/5.0):. Processed in 0.879353 secs); 21 Feb 2017 13:22:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_SORBS_SPAM, RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=EyLR=2C=gmail.com=julien.nicoulaud@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at bounces.park01.gkg.net does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=shP7avSdjuMsa5Pl7fp3zUBm/PlCM39lu7FTvuWcnQM=; b=bOfddH3qqhCSJmlccYjURW0eBiiHkbhu1Guke87JuW1/4FcmvLVtOmPL5eT1ALMHLX btdsicq1djDAlulwa/qz1elruddoQPBEomGm+pF1JN3lJ4YAK06oEvNgg9bfSp7eCh53 kmW2d1qrGjoSYF/mUWupO9/RfQ4+yoLpg90FD6K4ZMNKfmVhO3ejn7QmZH5tZldCO9m4 muG/31Bowe+i3/j1YGje73Rr+Zw5GRyerY/E4tFQvFMSsi/qythz7ytpbHQr5EuZmVPh KjrTUc6Tjr0Rqn/WDRFnYeXYsrUAQnVAfbnK81KL9FAb1RD9q0aCtQRKzpyF30zy98UH dBug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=shP7avSdjuMsa5Pl7fp3zUBm/PlCM39lu7FTvuWcnQM=; b=LG1V+kNxY2PtXoMBpljhbEiCND+tcbnzqFo7VwV6LJ+UqmB2aLAtmdzNnuJnmH+1BF fnzt6yT2UPffh+l9bn9QOuSTQhOhT5Qt0LUXuiQbxzxxi/O50Mr9XiCXcuiYfaJ6ecgj mhWzoIkVtk9gdMa5X8IMY/R/S0tLfsaCE1ETkbJdUCeqBCXYCCf8lvzmQUvCwXMPhUU0 mjhRAJyYlcirFQ8HeNICsfaYTLV440zTL9rIKcm6aiVN8LPd+Z06yXeg9ljp3gCaaBHM oTlBZdDNGsdsNG31WlZ2Veyw8OtFl83nGfgQI8zLu6Lv/L0YxFXyp7Z0QNU3kf7DE0Bl 0pIw== X-Gm-Message-State: AMke39l1KnsS7Ilo2xHLn+PkFgQW5HfTpmZ49SNUbXQFHaG/N/hTBOlH03HfeQwCrRBung+uwbw/z0qfwbASGg== X-Received: by 10.55.143.71 with SMTP id r68mr22983364qkd.84.1487683295534; Tue, 21 Feb 2017 05:21:35 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Julien Nicoulaud Date: Tue, 21 Feb 2017 14:20:55 +0100 Message-ID: Subject: Fwd: adb pull and push remote completion To: Mailing-list zsh-workers Cc: zsh-workers@closedmail.org Content-Type: multipart/alternative; boundary=94eb2c0850bc5e72a605490a4279 --94eb2c0850bc5e72a605490a4279 Content-Type: text/plain; charset=UTF-8 Hi Dov, A while ago there was a compdef for adb in https://github.com/zsh- users/zsh-completions, but we deleted it as there was one in zsh: https://github.com/zsh-users/zsh-completions/blob/ e70e7f8941d7437a161e3e4bb93f06e9c712c4a4/src/_adb I'm not sure which one is the better one, they probably need merging, but anyway the one in zsh-completions could complete adb push/pull. I hope this can be useful. Cheers, Julien 2017-01-25 10:41 GMT+01:00 Dov Grobgeld : > 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 > --94eb2c0850bc5e72a605490a4279--