Does netbeans support coloring for .sh (bash) scripts? Does netbeans support coloring for .sh (bash) scripts? bash bash

Does netbeans support coloring for .sh (bash) scripts?


I have not tried this myself but you can get shell script support in Netbeans if you install the C/C++ plugin.


old question, time for an update (tested for 8.0.2,8.1,8.2).

Here's what worked for me

  1. Install C/C++ plugin. This will recognize .sh extensions as bash files
  2. Install nb-noext-mime-resolver (for 8.2 you'll find it as No Extension MIME Resolver) . This will add support for files with no extension by recognizing the shebang line
  3. Go to tools/options/editor/spellchecker and uncheck 'Script and make comments'.(not available after 8.2) This will get rid of the red squiggly lines that appear under 'usr' and other legitimate notations in the shebang line and elsewhere.

You'll get full syntax highlighting as well as the ability to right click and select 'run' which will launch your script in the built in terminal. very nice.

To get the context menu 'run' to work with your shell

  1. Select 'Run'/'Set Project Configuration'/'Customize'
  2. Click 'New' and add a name for your shell like 'bash' or 'cygwin'
  3. Select 'Run As' 'Script (run in command line'
  4. Where it says 'Php Interpreter' (or equivilent) add the path to your bash shell. e.g: C:\cygwin\bin\bash.exe
  5. Click 'ok'.

Also, check out the properties of the bash files and you'll find some helpful ones.


This is very odd. I have NB6.8beta installed with the C/C++ plugin. When I open a .sh file I do see syntax high lighting. Quotes strings show up in orange, commands are in blue.