[TxMt] Re: Running bash file in TM2
mailinglist at textmate.org
Tue Jul 15 09:23:17 UTC 2014
On 14 Jul 2014, at 18:11, Bill Gibson wrote:
> I want to run with command-R a bash program that runs a GAMS program,
> which itself produces output in file called tmp.out. This is already
> loaded in my Textmate project so running the GAMS program usually
> updates the textmate load copy of tmp.out to the results of the most
> recent run. I have two questions:
> 1. sometimes the update doesn't work and I can't figure out why?
Are you saying that you have a file open (tmp.out) which has been
changed on disk (by your bash script) and TextMate does not notice this
(and thus, does not reload the file)?
If so, I am not sure what could cause that.
> 2. do I need to do to be able to run the bash program with command-R?
If the bash script is in the current document than ⌘R should run it.
If not then do you want ⌘R to always run this script, regardless of
current document, if so you need to create a TextMate command, but if
you only want ⌘R to run it when files from the same folder is open,
then I suggest creating a Makefile to run it, by default ⌘B will
“build” the current Makefile goal and ⌘R will build the Makefile
goal named ‘run’ (unless you set TM_MAKE_RUN_TARGET).
More information about the textmate