iosdude wrote:Thank you SO much - that solved my problem.
Cool. Thanks for letting me know.
I am aware that *.sh files are associated with Xcode (on my system anyway) but I expected LB to execute the script instead of opening it.
Maybe related to LB indexing using Launch Services? The only control over that is in Options
for the Applications
indexing rule; norbert's post describes how to disable it:Re: Index folders
I don't feel like testing if that changes LB's behavior with scripts/executables but am curious of the result if you do. Note to ObjDev
: "Use Mac OS X LaunchServices database" and "Prefetch application icons" options aren't documented in LB Help.
Btw, filename extensions are near the top of my list of my most undesirable things about OS X. I think their usage is negatively retrograde, prolonging an inelegant machine-centric data identification method that's overdue to be obsoleted. Makes me wince whenever they seem to have permanently infected someone's vocabulary.
Is there a way to have the Terminal window close after my shell script completes?
The easiest way I know to do it is to select the script in LB, press Space, and enter ;exit
as the string parameter. Whether the window actually closes depends on the "When the shell exits:" option under the Shell
tab of Terminal > Preferences > Settings
for the Default profile (or whichever is used when a new window opens). For example, if it's "Don't close the window" the window will remain open with "[Process completed]" displayed. "Close if the shell exited cleanly" can be a preferable choice.
There's also this, under Running Unix Executables
in LB Help:
Running in background
By default, LaunchBar runs Unix Executables and Shell Scripts in a newly opened Terminal window. You can optionally run them in background (without any window) by opening them with Option-Return.