From 11cd9b2de3b8ce3a73260673c5571fecbc95318f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 12 May 2003 10:55:21 +0000 Subject: 18512, modified: fix up for ${foo/\//stuf} fix --- 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 5f2e87fb8..143a7bd4b 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 'remote files' fi -- cgit 1.4.1