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

Re: Completion



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@xxxxxxxxx     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 



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