.command file support is broken for me in Panther.
I have a command file on my Desktop, call it "foo.command". Terminal.app is not running. I double click it, it launches Terminal.app, it runs the command in a new window. Fine. I do it again, fine. As much as I want to, keep doing it, it works.
But then ... it stops working. For no reason. I try again 20 seconds later, and it no longer works. I click, but no window opens. I don't do anything but simply wait. What is UP?
I even completely removed my com.apple.Terminal.plist file, so it is not my prefs, it seems. What is UP?
So if you use happening under Panther, you may want to comment out the "extra info about Terminal" stuff.* SUMMARY
After sending an Apple event to Terminal.app, it ceases to open and execute.command files.
* STEPS TO REPRODUCE
1. Create an executable.command file on the Desktop:
$ cd Desktop/
$ cat > foo.command
#!/bin/sh
echo "hi"
^C
$ chmod a+x foo.command
2. Quit Terminal.app
3. Double-click foo.command in Finder
4. See that Terminal.app opens, makes new window, and executes the script
5. Make a new Terminal.app window, and execute this command:
$ osascript -e 'tell app "Terminal" to activate'
6. Double-click foo.command in Finder, again
7. See that Terminal.app activates, but does not make new window, or execute script
* NOTES
FWIW, every AppleScript (actually, I discovered this sending Apple events to Terminal.app from Perl using Mac::Glue, but osascript is a lot easier for the sake of the bug report) I tried to use with Terminal.app cause the problem. Activate, get property, whatever.
Also, I've confirmed the script does not run, by making the.command script do something verifiable (like making a new file). It's not merely that you don't see it running, it actually isn't running.
Re:What's happening?
pudge on 2003-11-22T19:40:34
happening is a little script I use to set my iChat status. Primarily, it shows my current application, and what is on iTunes, but it can do all sorts of things. It can show what is playing on EyeTV, it can show the current window in an app or the current process in Terminal.app, or the current channel in IRC, whatever.