From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8898 invoked by alias); 25 Jan 2017 09:49:53 -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: 40414 Received: (qmail 10186 invoked from network); 25 Jan 2017 09:49:53 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f172.google.com 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(209.85.217.172):SA:0(-1.1/5.0):. Processed in 0.681572 secs); 25 Jan 2017 09:49:53 -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=-1.1 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: dov.grobgeld@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HmpQT7XLsSLY/I9fweoV+JQixyCOtALpOAP7iCTB5MI=; b=cS/myIfZBDIGeBQ/4pGSZehRALoYPj8j6xXbr1DLLL5P/bMK0xpLbtk/x0goYFoN0X FV7H0SM1LeSDiaGRaYXpOJoEgBwtdPj3NYtsYw+sAEG+oguWEzyUvD3BfaLJImaiSi4D 98wNfufX1AkgtGtzR14qro3L/H7mAhkbZbZ1yeZq3MWCp7w5yGs3Zh90JWOZ0tN4hJVt B7M3TdNaH85vyEV936x7WMiEK6UOS4g3tfq4EJMRsK46itY1Hg0LPYsLgWmxnBqsgjwN SS3+ah+0FbtTS8FrICG0WpWGpz71DFOLyit+KhVXc9+xWb/IuTLociPj3MeB1AucXj4x 0cbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HmpQT7XLsSLY/I9fweoV+JQixyCOtALpOAP7iCTB5MI=; b=pC/i+1QsgbgDbZF7ZWef25QFffRSFVgg40V4gL3w8+1ntZd2FLz5Ij0up8ht2ocE9F zCNDj0mF/jijhAH9NQMb7XXBIuBV7d9x+3PUWgIr2sEIxXeN5/eMwwfTocGV7C1DDCF1 N7kskVDnL942Tx016zHnMJuXkjcqRJLzapoDZeE9VLuLCD1sAVmNIoontlDmdJodfFgw HfJ1SbprvE6xJKl6N+i0pD5ZUtD7yps1hXoTzYnaKdWEx/y5vZ8Em/HDPqNUgm6uhich HydEkDPHYPEJ4QqkMNrMtJTdENm7nUbDaza5DQ67hr98IANxRnM3aW7LGHfixi1bVKzC bWAA== X-Gm-Message-State: AIkVDXICWbQR5oOBqBbptefOT1o0CrWWRr5I0YTLedZH1pBBsUieh5dxF5eJ7QoFHHnLTlPfbOArODE5B4Q/lQ== X-Received: by 10.176.65.99 with SMTP id j90mr16530612uad.74.1485337282720; Wed, 25 Jan 2017 01:41:22 -0800 (PST) MIME-Version: 1.0 From: Dov Grobgeld Date: Wed, 25 Jan 2017 11:41:22 +0200 Message-ID: Subject: adb pull and push remote completion To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=94eb2c12309a1bb8980546e809d0 --94eb2c12309a1bb8980546e809d0 Content-Type: text/plain; charset=UTF-8 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 --94eb2c12309a1bb8980546e809d0--