zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk, Adrian Irving-Beer <wisq-deb@wisq.net>,
	468654@bugs.debian.org
Subject: Re: Bug#468654: zsh: rsync completion fails to complete remote paths with spaces
Date: Fri, 29 Feb 2008 19:57:55 -0500	[thread overview]
Message-ID: <20080301005755.GA3807@scowler.net> (raw)
In-Reply-To: <20080229202150.GA18766@scowler.net>

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'
 


  reply	other threads:[~2008-03-01  0:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080229200414.GA3027@wisq.net>
2008-02-29 20:21 ` Clint Adams
2008-03-01  0:57   ` Clint Adams [this message]
2008-03-02 21:11     ` Adrian Irving-Beer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080301005755.GA3807@scowler.net \
    --to=clint@zsh.org \
    --cc=468654@bugs.debian.org \
    --cc=wisq-deb@wisq.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).