Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fwd: adb pull and push remote completion
- X-seq: zsh-workers 40607
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- Subject: Re: Fwd: adb pull and push remote completion
- Date: Tue, 21 Feb 2017 18:23:10 +0100
- Cc: Mailing-list zsh-workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1487697791; bh=ViXiFmTYSTG3AGY6Poyb0dgyDbEX36RInV7FFG+8UGM=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=qrAnnkW3cnPDlgM4f3EB6qHUnlUBM29mqTDcYeO1s32lMcxrBAutYGIRtEZQ8I8VRdakQzsIW1BDtHzQUzr3W3EXPx7GkbWDsa9buTaGg5yK5X8QkGf1y6fdJaeidhXO5hfoJLXCBdPfOTCHpocx9DcRvRhNfpgo1YU4O1Gu1W/4jFSc+5PRqUgO+KeN0s9TEgXJ9FUUqKrxfGsAK6oWMofhbMfy7EbHIo+zT8908NXuNqnyeqwtJKNTyGdVzQVoBz5hjswFsHF0AG7OPEn4f/cM1r5pg8L8iSci/5/iSiG7PtFMt0cndaZMEh5rBSM3w62HkcUKMEw7Veef4NcwAQ==
- In-reply-to: <CA+mcLN5QJVy3sSacM-qu22negjTqN4LXA+tW+iX0_gGxBBpq1Q@mail.gmail.com>
- 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
- References: <CA++fsGGqSeshsuHinzJaKc3jRGooeLY1ow1Rcmf3Dw3vNREFpw@mail.gmail.com> <CA+mcLN77BVXV26R+NavQfDX8yCjV1CGjzKQx7LZd-E9ZYSE5rw@mail.gmail.com> <CA+mcLN5QJVy3sSacM-qu22negjTqN4LXA+tW+iX0_gGxBBpq1Q@mail.gmail.com>
Julien Nicoulaud wrote:
>
> 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.
A cursory glance at the adb completion in zsh would indicate that, while
there is plenty of scope for improvement, it is at least attempting to
complete files on the remote device for push/pull. Without the requisite
hardware, I can't test it and last time I touched that function I managed
to accidentally break it so I'm reluctant to change it. Does it not work
for you?
More generally, whether or not the function in zsh is better or worse,
it is the one that was contributed to zsh. Personally I'm wary of ever
picking up functions from github projects and merging their features,
especially where they have an explicit licence other than the zsh
licence. In this case it appears that you are the author of the old
function on github so you'd not have to worry. It might be possible to
use the _remote_files helper when completing the files.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author