I use TM to frame out basic shell scripts all the time, mostly working in bash.
I have this #!/opt/local/bin/tclsh puts "start of my tcl script" set lst {{item 1} {item 2} {item 3}}
What bundle item do I need to unfilter out in order to get "Run" to work on this? Currently I use "Shell Script".
I can end the script in .shell and that does it, but I never have had to do that with other bash scripts, I just set #!/bin/bash and I am usually good to go. Why is setting of my shebang to #!/opt/local/bin/ tclsh not kicking TM into the correct scope?
Thanks.
Hey Scott,
There is already a “Run” command in the TCL bundle. That's probably the one you want to use. To get TextMate to recognize a TCL script by the #! line, you need to add a “firstLineMatch” rule to the grammar. For instance, the shell script grammar has this firstLineMatch:
firstLineMatch = '^#!.*(bash|zsh|sh|tcsh)';
You could add a similar first line match to the TCL grammar:
firstLineMatch = '^#!.*(tclsh)';
—Alex