Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#468654: zsh: rsync completion fails to complete remote paths with spaces
- X-seq: zsh-workers 24643
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx, Adrian Irving-Beer <wisq-deb@xxxxxxxx>, 468654@xxxxxxxxxxxxxxx
- Subject: Re: Bug#468654: zsh: rsync completion fails to complete remote paths with spaces
- Date: Fri, 29 Feb 2008 19:57:55 -0500
- In-reply-to: <20080229202150.GA18766@xxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Adrian Irving-Beer <wisq-deb@xxxxxxxx>, 468654@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080229200414.GA3027@xxxxxxxx> <20080229202150.GA18766@xxxxxxxxxxx>
On Fri, Feb 29, 2008 at 03:21:50PM -0500, Clint Adams wrote:
> Maybe _rsync should get the same QIPREFIX check as _ssh and _git, or
> maybe all three of these should be factored out into a helper function.
Adrian, does this do the trick?
Index: Completion/Unix/Command/_rsync
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rsync,v
retrieving revision 1.39
diff -u -r1.39 _rsync
--- Completion/Unix/Command/_rsync 15 Dec 2007 16:45:38 -0000 1.39
+++ Completion/Unix/Command/_rsync 1 Mar 2008 00:54:56 -0000
@@ -58,7 +58,11 @@
elif compset -P 1 '*:'; then
if zstyle -T ":completion:${curcontext}:files" remote-access; then
- remfiles=(${(M)${(f)"$(_call_program files ssh -a -x ${IPREFIX%:} ls -d1FL "${(Q)PREFIX%%[^./][^/]#}\*" 2>/dev/null)"}%%[^/]#(|/)})
+ if [[ -z $QIPREFIX ]]
+ then rempat="${PREFIX%%[^./][^/]#}\*"
+ else rempat="${(q)PREFIX%%[^./][^/]#}\*"
+ fi
+ remfiles=(${(M)${(f)"$(_call_program files ssh -a -x ${IPREFIX%:} ls -d1FL "$rempat" 2>/dev/null)"}%%[^/]#(|/)})
compset -P '*/'
compset -S '/*' || suf='remote file'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author