Currently when I attempt to use the Shell Script bundle in TextMate to execute an open shell script, it uses its own environment variables and does not source my user's ~/.bashrc
file before execution.
Is it possible to configure TextMate to use my .bashrc
file so that the execution environment is similar to that of a vanilla terminal window?
If I dig into the Shell Script bundle, I see that the Run Script command is executing this snippet of Ruby code. I presume if it is possible, this is where I would want to make a change:
#!/usr/bin/env ruby18
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor"
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document"
TextMate.save_current_document
TextMate::Executor.make_project_master_current_document
TextMate::Executor.run(ENV["TM_SHELL"] || ENV["SHELL"] || "bash", ENV["TM_FILEPATH"])