screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [screen-devel] PATCH: new 'if' primitive


From: Steve Kemp
Subject: Re: [screen-devel] PATCH: new 'if' primitive
Date: Wed, 22 Oct 2008 10:39:19 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Tue Oct 21, 2008 at 16:34:55 -0700, Micah Cowan wrote:

> >     if $FOO -eq "bar" ..
> 
> In usual shell that would be =, not -eq (-eq is for numbers; the reverse
> of Perl).

  D'oh.  Updated now to treat "-eq" as numerical, and "=" as string.

> It'd also be nifty to support $(...) as well. But that's not crucial.

  Sure.

> Also, I'm guessing we're not going to do string interpolation; that is,
> unlike shell,
> 
>   if $FOO = "foo bar"

  That will actually work as expected as the Parse function does the
 $FOO -> getenv(FOO) expansion.

  I have this test :

  if $HOME -eq /home/skx "alias home echo 'home is $HOME'"

  When executed that gives me:

    "home is /home/skx"

Steve
-- 
http://www.steve.org.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]