From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1210 invoked from network); 6 Oct 2006 17:04:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Oct 2006 17:04:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 55124 invoked from network); 6 Oct 2006 17:04:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 17:04:40 -0000 Received: (qmail 24849 invoked by alias); 6 Oct 2006 17:04:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10802 Received: (qmail 24699 invoked from network); 6 Oct 2006 17:04:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Oct 2006 17:04:15 -0000 Received: (qmail 51180 invoked from network); 6 Oct 2006 17:04:15 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 17:04:11 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1GVt7J-0001c7-29; Fri, 06 Oct 2006 18:04:09 +0100 Date: Fri, 6 Oct 2006 19:04:09 +0200 From: Phil Pennock To: Chris Johnson Cc: zsh-users@sunsite.dk Subject: Re: ZLE widget to run gdb on command line Message-ID: <20061006170408.GA3693@parhelion.globnix.org> Mail-Followup-To: Chris Johnson , zsh-users@sunsite.dk References: <20061006145222.GA32307@namib.cs.utk.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061006145222.GA32307@namib.cs.utk.edu> Sender: Phil Pennock On 2006-10-06 at 10:52 -0400, Chris Johnson wrote: > print -s ${(z)BUFFER} > BUFFER="gdb !!0 -x =(echo run !!1*)" If one of the args starts with - then won't that turn into an option to echo? Perhaps =(print -r -- run !!1*) would be more reliable? Or am I missing something? Also there's the matter of quoted strings, such as 'foo bar'. =(print -r -- ${(Q):-"${(qqq):-run !!1*}"}) The nearest that I can get to preserving the quotes but passing things through to the command is the above, but it seems a bit strange to be immediately removing a level of quoting just applied, so I've probably over-complicated it. Regards, -Phil