From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9270 invoked from network); 25 Mar 2004 10:33:42 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Mar 2004 10:33:42 -0000 Received: (qmail 8094 invoked by alias); 25 Mar 2004 10:33:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19687 Received: (qmail 8082 invoked from network); 25 Mar 2004 10:33:34 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Mar 2004 10:33:34 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Mar 2004 10:33:34 -0000 Received: (qmail 23093 invoked from network); 25 Mar 2004 10:33:33 -0000 Received: from umail.mtu.ru (HELO umail.ru) (195.34.32.101) by a.mx.sunsite.dk with SMTP; 25 Mar 2004 10:33:25 -0000 Received: from [62.118.250.235] (HELO master.altlinux.ru) by umail.ru (CommuniGate Pro SMTP 4.2b1) with ESMTP id 220872799 for zsh-workers@sunsite.dk; Thu, 25 Mar 2004 13:33:24 +0300 Received: from solemn.turbinal.org (localhost.localdomain [127.0.0.1]) by master.altlinux.ru (Postfix) with ESMTP id E2188E4FF9 for ; Thu, 25 Mar 2004 13:33:22 +0300 (MSK) Received: by solemn.turbinal.org (Postfix, from userid 500) id 3A9425C30B; Thu, 25 Mar 2004 13:28:54 +0300 (MSK) Date: Thu, 25 Mar 2004 13:28:54 +0300 From: Alexey Tourbin To: zsh-workers@sunsite.dk Subject: Re: zsh-4.2.0-pre-4: problems with _remote_files Message-ID: <20040325102854.GA4785@solemn.turbinal.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <20040319150721.GG27221@solemn.turbinal.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20040319150721.GG27221@solemn.turbinal.org> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.6 required=6.0 tests=RCVD_IN_RFCI,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.6 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 19, 2004 at 06:07:22PM +0300, Alexey Tourbin wrote: > I've been testing zsh-4.2.0-pre-4 for a while, along with Alexey Voinov. > We've noticed a few problems with _remote_files completion (ssh). I've tracked down the problem: using _call_program requires extra quoting because of additional level of indirection inside eval "$argv". Here is what happens when _remote_files is invoked. $ touch \' $ ssh -a -x localhost ls -d1F \* -- works fine $ _call_program files ssh -a -x localhost ls -d1F \* zsh: unmatched ' You see, the same command wrapped into _call_program doesn't work. And what it should be: $ _call_program files ssh -a -x localhost ls -d1F \\\* -- now works The following patch solves the problem. --- zsh-4.2.0/Completion/Unix/Command/_ssh- 2004-02-24 13:00:50 +0000 +++ zsh-4.2.0/Completion/Unix/Command/_ssh 2004-03-24 19:55:58 +0000 @@ -6,7 +6,7 @@ _remote_files () { =20 if zstyle -T ":completion:${curcontext}:files" remote-access; then zparseopts -D -E -a args p: 1 2 4 6 F: - remfiles=3D(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX= %:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=3D(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX= %:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\\\* 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf=3D'remote file' =20 --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAYrRmfBKgtDjnu0YRAoZnAJ48BxZQklgzuU58pJr1HzCbFujWsgCeI/Ba 1UnQ3QrlZI//6MlClow9+H0= =6cU9 -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--