You can add a default application for public.plain-text in ~/Library/Preferences/com.apple.LaunchServices.plist.
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.apple.textedit;}' '{LSHandlerContentType=public.unix-executable;LSHandlerRoleAll=com.apple.textedit;}'
Restart to apply the changes (logging out and back in isn't enough).
I've added this to a duti configuration file:
com.apple.textedit public.plain-text all
com.macromates.textmate public.unix-executable all
Run plutil -convert xml1 ~/Library/Preferences/com.apple.launchservices.plist
and add an entry like this under LSHandlers:
<dict>
<key>LSHandlerContentType</key>
<string>public.unix-executable</string>
<key>LSHandlerRoleAll</key>
<string>com.macromates.textmate</string>
</dict>
You can also change the default application for normal files with no extension:
<dict>
<key>LSHandlerContentType</key>
<string>public.plain-text</string>
<key>LSHandlerRoleAll</key>
<string>com.macromates.textmate</string>
</dict>
You can apply the changes by restarting. Just logging out and back in doesn't seem to work. You could also rebuild the Launch Services database, but it has the side-effect that the warnings about opening applications for the first time are shown again.
Another option is to add something like this to a duti configuration file:
com.macromates.textmate public.unix-executable all
com.macromates.textmate public.plain-text all
To make this question more searchable, here is the error message Finder shows when you try to change the default application for executable scripts:
The operation can’t be completed.
An unexpected error occurred (error code -50).
Best Answer
There can be only one 'default' for the whole system. However, you can of course set one or more files to associate with another app from the default.
In the Finder, you can select multiple files of the same type within a folder, then press Command Option I, which brings up one "Get Info" dialog for all the files.
(In fact, they don't even have to be the same file type, as long as one app can open all of the types.) You can then change the app that opens those files on a double-click.
Obviously, any files added subsequently would need to be changed manually after the fact.
You could create a Folder Action to modify the opening app for any file dropped into a given folder.