clemens fischer wrote:
> On Fri-2010/03/12-03:42 Micah Cowan wrote:
> 
>> I also whipped up a small shell script to help me find color values
>> I like. I've attached it here.
> 
> Does "color-trans.sh" really work in your bash?

Yes, it does.

> In the bash-4 I use it
> breaks at least when giving it anything but a number:
> 
>   Color number g is/ino/bin/color-trans.sh: line 66: [: g: integer expression 
> expected
>   /ino/bin/color-trans.sh: line 89: [: g: integer expression expected
> 
> You have things like `test "$some_var" -lt some_number' all over it.

Why would that be a problem? "$some_var" is expected to be a number.

Are you perhaps neglecting the space after "g"? It appears sh is
complaining at line 66, but it shouldn't be in that function unless you
either (a) typed just a number, or (b) typed anything it didn't
otherwise recognize as a command. (Yes, I know, not very robust. I only
hacked it up for my own purposes, didn't bother to clean it up for
others before sending it out.)

In particular, see the main() function, which strips initial "g " or "c
" (after recognizing them) before passing them along.

-- 
HTH,
Micah J. Cowan
http://micah.cowan.name/

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to