zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: zsh-users@zsh.org
Subject: Re: _screen calls non-existent program
Date: Tue, 19 Oct 2010 13:58:22 +0100	[thread overview]
Message-ID: <20101019135822.0082a9e6@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <5C904183-5F0E-4971-B036-497A143DD227@biskalar.de>

On Tue, 19 Oct 2010 14:21:12 +0200
Sebastian Stark <seb-zsh@biskalar.de> wrote:
> I just noticed that if I try screens completion I am not able to
> select one of many running sessions:
> 
>  screen -S <tab>
> 
> gives an empty set.
> 
> Looking at _screen I see that the list of existing sessions should
> come from
> 
>   _call_program screen-sessions $words[1] -ls
> 
> Now I'm wondering what the screen-sessions command should look like,
> it is not available on any of my machines. To me it looks a bit like
> it is the same as screen itself, because of the -ls option. But than
> I don't get the $words[1] part.
> 
> Any pointers?

"screen-sessions" is just the name to use in the completion context.
The command should be in $words[1], which should be "screen".  "screen
-ls" does the right thing.

The real problem is the completion system hasn't actually been told to
complete a session here. The _arguments specification is:

'-S[name this session <pid>.sockname instead of <pid>.<tty>.<host>]:session name'

which simply outputs "session name", but doesn't try to complete
anything.  This is presumably because it's a new session, so completing
exactly an existing session isn't useful.  However, I can see that
completing an existing session might help you create a new name with
minimal typing. If you change that line (around 84) to

'-S[name this session <pid>.sockname instead of <pid>.<tty>.<host>]:session name:->any-sessions'

you'll get that effect.  It could be a style, I suppose.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


  parent reply	other threads:[~2010-10-19 13:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 12:21 Sebastian Stark
2010-10-19 12:51 ` Frank Terbeck
2010-10-19 13:00   ` Sebastian Stark
2010-10-19 13:07     ` Mikael Magnusson
2010-10-19 13:48       ` Sebastian Stark
2010-10-19 12:58 ` Peter Stephenson [this message]
2010-10-19 13:52   ` Sebastian Stark
2010-10-19 14:13     ` Peter Stephenson
2010-10-19 23:11       ` Phil Pennock

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=20101019135822.0082a9e6@pwslap01u.europe.root.pri \
    --to=peter.stephenson@csr.com \
    --cc=zsh-users@zsh.org \
    /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).