From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4314 invoked from network); 22 Feb 2000 14:47:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2000 14:47:19 -0000 Received: (qmail 1069 invoked by alias); 22 Feb 2000 14:47:02 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2927 Received: (qmail 1058 invoked from network); 22 Feb 2000 14:47:01 -0000 Date: Tue, 22 Feb 2000 15:47:00 +0100 (MET) Message-Id: <200002221447.PAA14598@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Andy Spiegl's message of Tue, 22 Feb 2000 15:24:37 +0100 Subject: Re: Completion Andy Spiegl wrote: > Hi Sven, > > > > tcsh has a completion rule like this: > > > complete rcp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");rsh $q[2] -l $q[1] ls -dp $q[3]\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:' > > > > Urgh. Anyone want to argue about the syntax of compctl or the > > completion functions again? ;-) > :-) > > > Eh? The completion system contains functions[1] for rcp and scp, so it > > should work out-of-the-box. > Hm, no, not really. Maybe I am blind (happens too often anyway), but here > only user@host and option completions are done. But maybe - from looking > at the tcsh-code - it was not clear what I meant. No it wasn't... until I now looked closer and found the calls to `rsh'. > Say I press TAB after this: > $ scp foo me@bar:/usr/local/_ > Then I would like to see the files and directories on the remote host "bar", > but what I see is the possible completions for my own host. Hm. Depending on what you think about us[1], you may think that we: 1) weren't sure if we should do that (and how: using `rsh ... ls' or zftp), because there may be systems without rsh (offering only ssh), because you may need something like .rhosts for this to work, which is evil, because it can get pretty expensive, right[2]? 2) were just too lazy to implement that[3] Bye Sven [1] I think I wrote the two initially, but I also think someone else had his fingers in them after that. [2] This only really means that we should make it configurable: to use either rsh or zftp or not try remote-completion and so on... [3] Actually, I *had* thought about trying to do that, was slightly scared because of 2) and then forgot. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de