From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13052 invoked from network); 7 May 2003 12:39:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 May 2003 12:39:16 -0000 Received: (qmail 33 invoked by alias); 7 May 2003 12:38:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6083 Received: (qmail 25 invoked from network); 7 May 2003 12:38:58 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 7 May 2003 12:38:58 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 7 May 2003 12:38:57 -0000 Received: (qmail 8592 invoked from network); 7 May 2003 12:37:45 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-18.tower-4.messagelabs.com with SMTP; 7 May 2003 12:37:45 -0000 Received: from gmcs3.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA26116; Wed, 7 May 2003 13:37:44 +0100 X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.61] claimed to be gmcs3.logica.co.uk Received: from gmcs3.logica.co.uk (localhost [127.0.0.1]) by gmcs3.logica.co.uk (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h47Cbub04588; Wed, 7 May 2003 14:37:56 +0200 cc: zsh-users@sunsite.dk X-VirusChecked: Checked In-reply-to: <20030507114000.GA5205@Amber.lab.icm.edu.pl> From: Oliver Kiddle References: <20030506213416.GA30800@Amber.lab.icm.edu.pl> <3485.1052302523@gmcs3.logica.co.uk> <20030507114000.GA5205@Amber.lab.icm.edu.pl> To: =?iso-8859-2?Q?Micha=B3?= Politowski Subject: Re: remote files completion for scp Date: Wed, 07 May 2003 14:37:56 +0200 Message-ID: <4586.1052311076@gmcs3.logica.co.uk> =?iso-8859-2?Q?Micha=B3?= Politowski wrote: > > This is not the same problem. > If I understand things correctly the second-level-of-quoting fix > was meant to produce correct command lines for scp, > and I have this version installed. Yes, sorry you're right. Your fix is the correct one and I'll apply it. The added quoting gets in the way when doing the remote ls. > And another deficiency I've just noticed: > scp 'hostname: > (note the opening quote) fails to produce any matches. > But for solving this I definitely don't feel qualified. This problem probably applies in other cases - the words array includes any quoting and that needs removing (which isn't as easy as you might think). For this I'll just make it use IPREFIX which works for single and double quotes but not for backslashes. Patch below does this. Oliver Index: Completion/Unix/Command/_rlogin =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rlogin,v retrieving revision 1.2 diff -u -r1.2 _rlogin --- Completion/Unix/Command/_rlogin 7 Jan 2003 08:51:10 -0000 1.2 +++ Completion/Unix/Command/_rlogin 7 May 2003 12:28:46 -0000 @@ -5,7 +5,7 @@ local expl remfiles remdispf remdispd suf ret=1 if zstyle -T ":completion:${curcontext}:" remote-access; then - remfiles=(${(M)${(f)"$(rsh ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf='remote file' Index: Completion/Unix/Command/_ssh =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ssh,v retrieving revision 1.19 diff -u -r1.19 _ssh --- Completion/Unix/Command/_ssh 13 Feb 2003 16:15:29 -0000 1.19 +++ Completion/Unix/Command/_ssh 7 May 2003 12:28:46 -0000 @@ -6,7 +6,7 @@ if zstyle -T ":completion:${curcontext}:" remote-access; then zparseopts -D -E -a args p: 1 2 4 6 F: - remfiles=(${(M)${(f)"$(ssh $args -a -x ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=(${(M)${(f)"$(ssh $args -a -x ${IPREFIX%:} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf='remote file'