From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8047 invoked from network); 11 Jul 2000 23:05:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Jul 2000 23:05:05 -0000 Received: (qmail 6459 invoked by alias); 11 Jul 2000 23:04:46 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3268 Received: (qmail 6445 invoked from network); 11 Jul 2000 23:04:43 -0000 From: "Bart Schaefer" Message-Id: <1000711230438.ZM9043@candle.brasslantern.com> Date: Tue, 11 Jul 2000 23:04:38 +0000 In-Reply-To: <20000712000509.A124@vin.ens-lyon.fr> Comments: In reply to Vincent Lefevre "Re: ZLE Widget: Insert last word (except &)" (Jul 12, 12:05am) References: <20000711140506.5143gmx1@mx14.gmx.net> <20000712000509.A124@vin.ens-lyon.fr> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.auc.dk Subject: Re: ZLE Widget: Insert last word (except &) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 12, 12:05am, Vincent Lefevre wrote: } Subject: Re: ZLE Widget: Insert last word (except &) } } On Tue, Jul 11, 2000 at 19:29:55 +0200, Christoph Lange wrote: } > I found it annoying that the widget insert-last-word inserts `&' if the } > previous command was a background job. I'd rather like the last word } > *before* `&' to be inserted. } } Me too! Presumably what you'd really rather is that the last non-separator word is inserted. Even with Christoph's widget, if you type "echo foo;" and then invoke smart-insert-last-word you get ";" inserted. } IMHO, this behavior should be in zsh as standard. But there's more; "echo foo 2>&1" followed by {smart-,}insert-last-word inserts "1", and prefixing it with ESC 2 inserts "2>&". Or "(echo foo)", where the last word is ")". What about "{ echo foo; }" or the same suffixed with a redirection (inside or outside the braces)? If we don't accept the shell syntax definition of a "word", how can we choose a single definition of what constitutes a "word" that everyone will agree on? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net