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

Re: screen -x <complete>



"Michal =?iso-8859-2?q?Maru=B9ka?=" wrote:
> 
> 
> I've decided i would try to look at the completion system of zsh. 
> I want to complete on sessions opened by screen(1):
> 
> i get when running:
> $ screen -x
> > There are several suitable screens on:
> >        899.pts-10.linux3       (Attached)
> >        326.pts-54.linux3       (Attached)
> > Type "screen [-d] -r [pid.]tty.host" to resume one of them.
> 
> 
> Could anybody tell me where to start (i want to learn it by example, manual
> -reading will follow), or has it already been implemented?

Apparently no-one's done screen yet, it would be useful to have a function.

There are various strands.  First (or maybe last) you probably want to look
at one of the many functions that use _arguments to handle options and
arguments, so you can handle these for screen.

Then you need to persuade _arguments to handle the remaining arguments as a
new command.  Look at, for example, Completion/Unix/Command/_rlogin.  This
has already got some simple _arguments handling for you.

Finally, you want to be able to postprocess the output of `screen -ls' to
get detached sessions to reattach to.  A very simple example of adding
a list from the output of a command occurs in Completion/Zsh/Type/_limits.

You might want to have a look at
  http://zsh.sunsite.dk/Guide/zshguide06.html#l142

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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