From 78b02d9c036f6b0e0ec7896729a090ec7ccc7a5f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 8 May 2003 10:30:45 +0000 Subject: 18512: fix 18508 properly this time. --- Completion/Unix/Command/_rsync | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Completion/Unix/Command/_rsync') diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync index 8120c10a9..b6fa296a1 100644 --- a/Completion/Unix/Command/_rsync +++ b/Completion/Unix/Command/_rsync @@ -31,13 +31,14 @@ elif [[ -prefix 1 *:: ]]; then _describe "remote modules" remmodules -S/ elif [[ -prefix 1 *: ]]; then - local remfiles remdispf remdispd + local remfiles remdispf remdispd slash compset -P 1 '*:' if zstyle -T ":completion:${curcontext}:" remote-access; then + slash=/ remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1F ${${${words[CURRENT -]#*:}:h}/\\/(#e)/}/\* 2>/dev/null)"}) +]#*:}:h}/${slash}(#e)/}/\* 2>/dev/null)"}) remdispf=(${remfiles:#*/}) remdispd=(${(M)remfiles:#*/}) @@ -46,7 +47,7 @@ elif [[ -prefix 1 *: ]]; then compadd -d remdispf ${${remfiles:#*/}/[*=@|](#e)/} _wanted files expl 'remote files and directories' \ - compadd -S/ -d remdispd ${${(M)remfiles:#*/}/\\/(#e)/} + compadd -S/ -d remdispd ${${(M)remfiles:#*/}/${slash}(#e)/} else _message -e remote-files 'remote files' fi -- cgit v1.2.3