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

2008-10-22 Thread Steve Kemp
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. Bu

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

2008-10-21 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Kemp wrote: > On Tue Oct 21, 2008 at 13:18:41 -0700, Micah Cowan wrote: > >> There's plenty of time to discuss it, given that it definitely wouldn't >> be added for 4.1.0. If Lua support is mature by then, then the obvious >> solution would be t

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

2008-10-21 Thread Steve Kemp
On Tue Oct 21, 2008 at 13:18:41 -0700, Micah Cowan wrote: > There's plenty of time to discuss it, given that it definitely wouldn't > be added for 4.1.0. If Lua support is mature by then, then the obvious > solution would be to just use that, instead of inventing something new. That sounds reas

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

2008-10-21 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Kemp wrote: > 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 primitive

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

2008-10-21 Thread Steve Kemp
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 enh

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

2008-10-21 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Kemp wrote: > To build upon the previously submitted alias primitive I've > added support for 'if'. 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 an

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

2008-10-21 Thread Steve Kemp
To build upon the previously submitted alias primitive I've added support for 'if'. I'll submit this change here for potential inclusion, or discussion. It could be improved with the addition of support for "else", but so far I've not had the need. Sample usage: if -x /usr/bin/cmatr