How to force Intellij to highlight file with no extension as Bash?

intellij-idea

Solution

You can use the `*.` pattern. Though it's registered for `Text files` type by default.

Problem

I'm editing Linux `init.d` scripts with Intellij IDEA 12 Ultimate and would like it to use Bash syntax highlighting. I already have the Bash syntax highlighting plugin, and it works great for files ending in `.sh`. The problem with the init.d scripts is they have no extension, and it seems the only way to get Intellij to recognize a files type (Preferences -> File Types -> Registered Patterns) is by extension. If Registered Pattern supported paths (like `*/etc/rc.d/init.d/*`) that would be swell, but that doesn't seem to work. The only workaround I've found for now is to add the name of each script I want to edit to Registered Patterns. Better than nothing, but does is there a better way? Thanks!

Original source