zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "Michal Maruška" <mmc@maruska.dyndns.org>,
	zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: screen -x <complete>
Date: Mon, 22 Oct 2001 18:40:02 +0100	[thread overview]
Message-ID: <21848.1003772402@csr.com> (raw)
In-Reply-To: ""Michal =?iso-8859-2?q?Maru=B9ka?=""'s message of "Mon, 22 Oct 2001 17:54:19 BST." <200110221654.f9MGsJs14042@linux3.maruska.tin.it>

"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@csr.com>                  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.
**********************************************************************


  reply	other threads:[~2001-10-22 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-22 16:54 Michal Maruška
2001-10-22 17:40 ` Peter Stephenson [this message]
2001-11-09 18:29 Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21848.1003772402@csr.com \
    --to=pws@csr.com \
    --cc=mmc@maruska.dyndns.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).