Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion
- X-seq: zsh-users 2925
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Completion
- Date: Tue, 22 Feb 2000 12:36:35 +0100 (MET)
- In-reply-to: Andy Spiegl's message of Tue, 22 Feb 2000 11:37:04 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author