From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 853 invoked from network); 22 Feb 2000 11:37:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2000 11:37:10 -0000 Received: (qmail 2827 invoked by alias); 22 Feb 2000 11:36:46 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2925 Received: (qmail 2820 invoked from network); 22 Feb 2000 11:36:46 -0000 Date: Tue, 22 Feb 2000 12:36:35 +0100 (MET) Message-Id: <200002221136.MAA14730@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 11:37:04 +0100 Subject: Re: Completion Andy Spiegl wrote: > Hi Bart, > > > zstyle '*:ssh:*:my-accounts' users-hosts tractrix:kom.auc.dk ... > > zstyle '*:rsh:*:my-accounts' users-hosts alboege:fictitious.com ... > > > > There are also styles that are lists of hosts, users, other-accounts, etc., > > but you can cover most of the cases for ssh with just this one. > Is there anything similar for scp/rcp? > > 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? ;-) > I suppose this could be done in zsh (because everything can be done with > zsh), but I am still not fit enough with the zsh syntax. :-( So I would be > glad if someone had done it already. Eh? The completion system contains functions[1] for rcp and scp, so it should work out-of-the-box. Bye Sven [1] They are actually functions for the r{sh,login,...} and ssh suites. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de