From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4179 invoked from network); 22 Feb 2000 14:25:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2000 14:25:10 -0000 Received: (qmail 27776 invoked by alias); 22 Feb 2000 14:24:45 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2926 Received: (qmail 27762 invoked from network); 22 Feb 2000 14:24:44 -0000 Date: Tue, 22 Feb 2000 15:24:37 +0100 From: Andy Spiegl To: zsh-users@sunsite.auc.dk Subject: Re: Completion Message-ID: <20000222152437.A21283@br-online.de> Mail-Followup-To: zsh-users@sunsite.auc.dk References: <200002221136.MAA14730@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <200002221136.MAA14730@beta.informatik.hu-berlin.de>; from wischnow@informatik.hu-berlin.de on Tue, Feb 22, 2000 at 12:36:35PM +0100 X-PGP-GPG-Keys: finger pgp.andy@spiegl.de OR mail -s "send pgp" auto@spiegl.de 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. 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. Bye, Andy. -- E-Mail: Andy@spiegl.de URL: http://andy.spiegl.de PGP/GPG: see headers o _ _ _ --------- __o __o /\_ _ \\o (_)\__/o (_) ------- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ ------ (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man. - George Bernard Shaw