From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16709 invoked from network); 20 Mar 2005 22:05:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Mar 2005 22:05:21 -0000 Received: (qmail 74077 invoked from network); 20 Mar 2005 22:05:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Mar 2005 22:05:14 -0000 Received: (qmail 2871 invoked by alias); 20 Mar 2005 22:05:05 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8615 Received: (qmail 2857 invoked from network); 20 Mar 2005 22:05:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Mar 2005 22:05:04 -0000 Received: (qmail 72843 invoked from network); 20 Mar 2005 22:05:04 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 20 Mar 2005 22:05:00 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IDO00EML80ACFV1@vms044.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 20 Mar 2005 16:04:59 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j2KM4vVB010822 for ; Sun, 20 Mar 2005 14:04:57 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j2KM4ukM010821 for zsh-users@sunsite.dk; Sun, 20 Mar 2005 14:04:56 -0800 Date: Sun, 20 Mar 2005 22:04:55 +0000 From: Bart Schaefer Subject: Re: defining real time variables for a shell In-reply-to: <20050320200900.GD26316@fruitcom.com> To: Zsh Users Message-id: <1050320220456.ZM10820@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050320170559.GA30366@fruitcom.com> <050320102936.ZM9380@candle.brasslantern.com> <20050320190854.GC26316@fruitcom.com> <050320115822.ZM9627@candle.brasslantern.com> <20050320200900.GD26316@fruitcom.com> Comments: In reply to Eric Smith - Fruitcom "Re: defining real time variables for a shell" (Mar 20, 9:09pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Mar 20, 9:09pm, Eric Smith - Fruitcom wrote: } } } > elif [[ $cmd[1] == [\(\)0-9]* ]]; then } } > application=calc } } > ( I think you wrote that one for me :) ) } } Yeah, when I have a moment, I will write how I apply this command line } "mailcap" to most things I do. I think you did already: zsh-users/6463 ? } } > '(15/$GBP)+(3750/1900)' } } } } Just get rid of the $ sign -- it's not necessary in math context } } } } '(15/GBP)+(3750/1900)' } } Huh? the GBP is a var, how can a bare string be interpolated. } [eric@pepper ~] $ "(15/GBP)+(3750/1900)" } "GBP" is undefined Um, what's the application "calc"? When you said "my arithmatic on the command line" I assumed you were using zsh's built-in arithmetic, in which bare strings are treated as variable references. E.g., schaefer[509] calc() { print $(( $* )) } schaefer[510] GBP=1.44 schaefer[511] calc '(15/GBP)+(3750/1900)' 11.416666666666668