From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29059 invoked by alias); 19 Oct 2010 13:35:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15451 Received: (qmail 24783 invoked from network); 19 Oct 2010 13:35:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Tue, 19 Oct 2010 13:58:22 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: _screen calls non-existent program Message-ID: <20101019135822.0082a9e6@pwslap01u.europe.root.pri> In-Reply-To: <5C904183-5F0E-4971-B036-497A143DD227@biskalar.de> References: <5C904183-5F0E-4971-B036-497A143DD227@biskalar.de> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Oct 2010 12:58:23.0194 (UTC) FILETIME=[4FE91BA0:01CB6F8D] X-Scanned-By: MailControl A-10-90-03 (www.mailcontrol.com) on 10.68.0.149 On Tue, 19 Oct 2010 14:21:12 +0200 Sebastian Stark wrote: > I just noticed that if I try screens completion I am not able to > select one of many running sessions: > > screen -S > > 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 .sockname instead of ..]: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 .sockname instead of ..]:session name:->any-sessions' you'll get that effect. It could be a style, I suppose. -- Peter Stephenson 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