From b3ccc068a4efe953d6540f70f04fb951ee17294f Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 5 Jun 2003 13:23:49 +0000 Subject: 18607: correctly handle quoting for remote files for rcp completion --- Completion/Unix/Command/_rlogin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_rlogin b/Completion/Unix/Command/_rlogin index 4fb010ec6..0d8355bfb 100644 --- a/Completion/Unix/Command/_rlogin +++ b/Completion/Unix/Command/_rlogin @@ -5,7 +5,7 @@ _rcp_remote_files () { 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 @@ _rcp_remote_files () { 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 -- cgit 1.4.1