From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1505 invoked by alias); 8 Dec 2002 20:08:30 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1498 invoked from network); 8 Dec 2002 20:08:29 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 8 Dec 2002 20:08:29 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id MAA15302; Sun, 8 Dec 2002 12:08:19 -0800 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma015290; Sun, 8 Dec 02 12:07:58 -0800 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id gB8K81R22396; Sun, 8 Dec 2002 12:08:01 -0800 (PST) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id MAA24485; Sun, 8 Dec 2002 12:08:01 -0800 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15859.42657.660983.814181@casey.transmeta.com> Date: Sun, 08 Dec 2002 12:08:00 -0000 To: Richard Sharpe Cc: , fnasser@redhat.com, Subject: eval [was Re: Processing of convenience variables for scripts ...] In-Reply-To: References: <200212081916.LAA24268@casey.transmeta.com> X-SW-Source: 2002-12/txt/msg00165.txt.bz2 Richard Sharpe writes: > On Sun, 8 Dec 2002, Doug Evans wrote: > > > Andrew writes: > > >> The loop works, but add-symbol-file seems to be called without the > > >>> > > >>> convenience variables being expanded. > > >>> > > >>> Have it got that right? > > >>> > > >>> If so, what would be the first step to get them expanded? > > >> > > >> add-symbol-file takes constants, not expressions - so variables are not > > >> expanded. This should probably change but it's not clear how, given > > >> the parser... > > > > > > A quick/dirty hack would be: > > > > > > eval ..... > > > > Can someone point me to threads on `eval'? > > My poor eyes can't find one. > > I think that the intent was that someone implement eval. I can't find an > existing one. Maybe my eyes are bad as well. I recall a message from Fernando (I think) refering to the existing threads on eval, so I was wondering where they were. What about a $()-like command akin to bash? Maybe spelled $`` (backquote also from bash and because $` is a syntax that doesn't collide with anything). It's very useful to be able to run a command and have the result be used in another command. For add-symbol-file, one might do add-symbol-file $`printf %s, $name` blah... $`` is useful regardless of how the cli is rewritten, though perhaps in this example it's more clumsy than just $name. OTOH, there's enormous flexibility. It does require commands that are used with it to properly send their output through something that can be captured in a string, but that's a good thing for them to do anyway.