From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1951 invoked from network); 12 Apr 2009 11:34:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Apr 2009 11:34:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 28570 invoked from network); 12 Apr 2009 11:34:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Apr 2009 11:34:38 -0000 Received: (qmail 1588 invoked by alias); 12 Apr 2009 11:34:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26829 Received: (qmail 1573 invoked from network); 12 Apr 2009 11:34:31 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 Apr 2009 11:34:31 -0000 Received: from vint.altlinux.org (vint.altlinux.org [194.107.17.35]) by bifrost.dotsrc.org (Postfix) with ESMTP id 6B5158058ACF for ; Sun, 12 Apr 2009 13:34:17 +0200 (CEST) Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vint.altlinux.org (Postfix) with ESMTP id 69D1A3F80ED9 for ; Sun, 12 Apr 2009 11:34:17 +0000 (UTC) Received: from [213.85.39.63] (unknown [213.85.39.63]) by imap.altlinux.org (Postfix) with ESMTPSA id 467613E48CFF for ; Sun, 12 Apr 2009 15:34:17 +0400 (MSD) Received: by hell.fortress (Postfix, from userid 500) id E050C3600059; Sun, 12 Apr 2009 15:34:16 +0400 (MSD) Resent-From: raorn@altlinux.org Resent-Date: Sun, 12 Apr 2009 15:34:16 +0400 Resent-Message-ID: <20090412113416.GE9102@altlinux.org> Resent-To: zsh-workers@sunsite.dk Received: from imap.altlinux.org [194.107.17.38] by hell.fortress with IMAP (fetchmail-6.3.9) for (single-drop); Sun, 12 Apr 2009 15:17:32 +0400 (MSD) Received: from [213.85.39.63] (unknown [213.85.39.63]) by imap.altlinux.org (Postfix) with ESMTPSA id BE6113E48CFF; Sun, 12 Apr 2009 15:15:57 +0400 (MSD) Received: by hell.fortress (Postfix, from userid 500) id 54CFE360005A; Sun, 12 Apr 2009 15:15:57 +0400 (MSD) From: "Alexey I. Froloff" To: zsh workers Cc: "Alexey I. Froloff" Subject: [PATCH 2/4] _rsync: fix rsync remote file completion (ALT#12958). Date: Sun, 12 Apr 2009 15:15:55 +0400 Message-Id: <1239534957-9358-1-git-send-email-raorn@altlinux.org> X-Mailer: git-send-email 1.6.1.3.GIT X-Spam: no; 0.00; Alexey:01 Froloff:01 rsync:01 Unix:01 diff:01 --git:01 100644:01 remote:03 altlinux:04 directory:05 ---:08 raorn:09 org:09 ALT:10 Command:11 X-Virus-Scanned: ClamAV 0.92.1/9225/Sun Apr 12 05:35:10 2009 on bifrost X-Virus-Status: Clean rsync shows exactly five fields, separated by one or more spaces: attributes size date time file or directory name In this example "file or directory name" should be completed, so exactly four fileds should be stripped out. Signed-off-by: Alexey I. Froloff --- Completion/Unix/Command/_rsync | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync index 34d4260..c26c05f 100644 --- a/Completion/Unix/Command/_rsync +++ b/Completion/Unix/Command/_rsync @@ -31,11 +31,14 @@ if compset -P '*::*/' || compset -P 'rsync://*/*/'; then remdispf=(${remfiles:#d*}) remdispd=(${(M)remfiles:#d*}) + # $remdisp[fd] format: + # attrs size date time name + _wanted files expl 'remote file or directory' \ - compadd -d remdispf ${remdispf##* } + compadd -d remdispf ${${${${remdispf##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##} _wanted files expl 'remote file or directory' \ - compadd -S/ -d remdispd ${remdispd##* } + compadd -S/ -d remdispd ${${${${remdispd##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##} elif compset -P 1 '*::' || compset -P 1 'rsync://*/'; then -- 1.6.1.3.GIT