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

PATCH: rcp and quoting remote files



The patches for scp completion in users/5915 and users/6080 are also
applicable to rcp. I thought I had checked this at the time.

Oliver

Index: Completion/Unix/Command/_rlogin
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rlogin,v
retrieving revision 1.3
diff -u -r1.3 _rlogin
--- Completion/Unix/Command/_rlogin	7 May 2003 12:44:52 -0000	1.3
+++ Completion/Unix/Command/_rlogin	5 Jun 2003 13:02:47 -0000
@@ -5,7 +5,7 @@
   local expl remfiles remdispf remdispd suf ret=1
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
-    remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
+    remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
     compset -P '*/'
     compset -S '/*' || suf='remote file'
 
@@ -16,9 +16,9 @@
     while _tags; do
       while _next_label files expl ${suf:-remote directory}; do
         [[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
-	    ${remdispf%[*=@|]} && ret=0 
+	    ${(q)remdispf%[*=@|]} && ret=0 
 	compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
-	    ${remdispd%/} && ret=0
+	    ${(q)remdispd%/} && ret=0
       done
       (( ret )) || return 0
     done



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