Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
adb pull and push remote completion
- X-seq: zsh-workers 40414
- From: Dov Grobgeld <dov.grobgeld@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: adb pull and push remote completion
- Date: Wed, 25 Jan 2017 11:41:22 +0200
- 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==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author