Zsh Mailing List Archive
Messages sorted by:
Re: _screen calls non-existent program
- X-seq: zsh-users 15451
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: _screen calls non-existent program
- Date: Tue, 19 Oct 2010 13:58:22 +0100
- In-reply-to: <5C904183-5F0E-4971-B036-497A143DD227@xxxxxxxxxxx>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <5C904183-5F0E-4971-B036-497A143DD227@xxxxxxxxxxx>
On Tue, 19 Oct 2010 14:21:12 +0200
Sebastian Stark <seb-zsh@xxxxxxxxxxx> 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 -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 part.
> Any pointers?
"screen-sessions" is just the name to use in the completion context.
The command should be in $words, 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@xxxxxxx> 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
Messages sorted by: