From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27811 invoked from network); 18 Nov 2000 16:50:46 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Nov 2000 16:50:46 -0000 Received: (qmail 8473 invoked by alias); 18 Nov 2000 16:50:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13172 Received: (qmail 8466 invoked from network); 18 Nov 2000 16:50:38 -0000 From: "Bart Schaefer" Message-Id: <1001118165024.ZM8012@candle.brasslantern.com> Date: Sat, 18 Nov 2000 16:50:24 +0000 In-Reply-To: <200011181537.KAA06383@soup.ql.org> Comments: In reply to "E. Jay Berkenbilt" "trivial patch to _rlogin to make rcp complete more like scp" (Nov 18, 10:37am) References: <200011181537.KAA06383@soup.ql.org> X-Mailer: Z-Mail (5.0.0 30July97) To: "E. Jay Berkenbilt" , zsh-workers@sunsite.auc.dk Subject: Re: trivial patch to _rlogin to make rcp complete more like scp MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 18, 10:37am, E. Jay Berkenbilt wrote: } } scp file hostTAB } } where host is something that unambiguously completes to a host, scp } adds a colon to the end of the host. If you then hit space, the colon } stays. } } If you do the same with rcp, the colon disappears after a space. The } same thing goes with user@. } } I think that keeping the colon is the Right Thing (TM) since it } actually means something. } } I'm not convinced that this is the right behavior with the @. I'm pretty sure it's not the right behavior with @. } The only way I could figure this out was to do a careful comparison } between the _rlogin and _ssh code. The -q flag to _alternative seems } to be either missing from the documentation or very well hidden. Look closely: } _alternative \ } 'files:: _files' \ } - 'hosts:: _rlogin_all_hosts -qS:' \ } - 'users:: _rlogin_users -qS@' && ret=0 } + 'hosts:: _rlogin_all_hosts -S:' \ } + 'users:: _rlogin_users -S@' && ret=0 The -q and -S flags are inside quotation marks; they're not flags to _alternative, they're flags to _rlogin_all_hosts and _rlogin_users, which eventually pass them to _combination which passes them to compadd. This is documented in info, but the comment at the top of _combination is wildly out of date, particularly with respect to what it says about how _telnet calls _combination. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net