MacOS – Run Terminal Command from .terminal file

bashcommand linemacosterminal

I just figured out how to export settings from terminal which creates a .terminal file. And I realize that the ExecutionString parameter has changed to the CommandString parameter.

I put a command in the string tags and it worked but it jumped straight to [Process Completed] after it was done. Is there anyway to get it to give me a new prompt line for more commands?

Best Answer

In the .terminal file, RunCommandAsShell should not be set to <true/>.

This correlates to the "Run inside shell" checkbox in the "Shell" section of the preference window; which is more intuitively named.

When the preference is not selected (RunCommandAsShell is true), then the default shell is replaced with whatever command you've used. If the preference is selected (RunCommandAsShell is either false or not listed in the .terminal file), then the command is run after the default shell is loaded for that Terminal window/tab.

Related Question