Re: PATCH: new 'if' primitive

Steve Kemp <[email protected]> Tue, 21 Oct 2008 20:26:59 +0100
Newsgroups gmane.comp.gnu.screen
Message-ID <20081021192659.GA23950__6598.15665935657$1238089109$gmane$org@steve.org.uk>
On Tue Oct 21, 2008 at 12:21:48 -0700, Micah Cowan wrote:

> IMO, this would be much more useful if it could also perform basic tests
> on env var values (this could eliminate the need for your hostname and
> username primitives), and against the version number of screen.

  Those would be good enhancements, yes.

  What kind of syntax would you consider?  I'd expect something like:

    if $USER -cmp "steve"
    if $UID  -lt 1000

  It would also be nice to have backtick support, such that
 "if `uname -a` -cmp "2.6.17" ..


  Adding such support would be easy, once the syntax was defined.

> BTW, are you aware of Sadrul's efforts to introduce scriptability to
> screen via Lua? http://www.pidgin.im/~sadrul/pp/scripting-lua/

  No, I've not seen that.  Thanks.

Steve
-- 
Debian GNU/Linux System Administration
http://www.debian-administration.org/