Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [ejb@xxxxxx: Bug#243385: zsh: rsync completion expands * too soon]



> Yes.  Well, kind of.  It's an eval issue.  The call to _call_program
> (which I have removed) causes the wildcard to be expanded too early
> because it calls eval.  Here's a trace excerpt.

I haven't tried this at all, but maybe this will fix your problem.

Index: Completion/Unix/Command/_rsync
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rsync,v
retrieving revision 1.8
diff -u -r1.8 _rsync
--- Completion/Unix/Command/_rsync	14 Nov 2003 11:56:55 -0000	1.8
+++ Completion/Unix/Command/_rsync	13 Apr 2004 02:05:03 -0000
@@ -37,8 +37,8 @@
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
     slash=/
-    remfiles=(${(f)"$(_call_program files ssh -a -x ${words[CURRENT]%:*} ls -d1F ${${${words[CURRENT
-]#*:}:h}/${slash}(#e)/}/\* 2>/dev/null)"})
+    remfiles=(${(f)"$(_call_program files ssh -a -x ${words[CURRENT]%:*} ls -d1F "${${${words[CURRENT
+]#*:}:h}/${slash}(#e)/}/\* 2>/dev/null")"})
 
     remdispf=(${remfiles:#*/})
     remdispd=(${(M)remfiles:#*/})



Messages sorted by: Reverse Date, Date, Thread, Author