From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5280 invoked by alias); 26 Apr 2010 12:12:15 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27921 Received: (qmail 6469 invoked from network); 26 Apr 2010 12:12:12 -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: Mon, 26 Apr 2010 13:11:39 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Cc: 579209@bugs.debian.org Subject: Re: zsh: insert-last-word problem after completion Message-ID: <20100426131139.6e7311a7@csr.com> In-Reply-To: <20100426105331.GC25015@prunille.vinc17.org> References: <20100426105331.GC25015@prunille.vinc17.org> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.5 (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: 26 Apr 2010 12:11:39.0275 (UTC) FILETIME=[9FF105B0:01CAE539] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.68.1.156 On Mon, 26 Apr 2010 12:53:31 +0200 Vincent Lefevre wrote: > After a "zsh -f": > > % alias my_echo=echo > % false > % true & > % my_ech[TAB] > > A succession of [ESC] . (bound to insert-last-word) gives: > > my_echo& > my_echo&& > my_echo&false > > while I would expect: > > my_echo & > my_echo false That's a bug: can you get it to happen with the new completion system (I tried briefly and failed)? I presume there's a gap in the suffix-fixing logic for completion. > or even better: > > my_echo true > my_echo false > > i.e. the "&" should be ignored by insert-last-word. That's not a bug. As Mikael suggested, you need to use something that's smart about syntax; that's not the job of insert-last-word, which only knows about the division into editing words. -- 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