Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion



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/:'

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.

Bye,
 Andy.

-- 
 E-Mail: Andy@xxxxxxxxx     URL: http://andy.spiegl.de
 PGP/GPG: see headers
                                o      _     _         _
  --------- __o       __o      /\_   _ \\o  (_)\__/o  (_)
  ------- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/
  ------ (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Dew knot trussed spell checquers too fined awl mist takes!



Messages sorted by: Reverse Date, Date, Thread, Author