Improved compatibility with SunOS

Colors with grep/ls are used only if supported. We check if ls supports --color
argument, as previous checking for color terminal capability does not mean that
ls knows about it (this should work correctly for both SunOS and Cygwin).

Changed '[[ .. ]]' to '[ .. ]' as first form is not understood by SunOS.
Reindent on bash* files.

Set Vim filetype=sh and reindented.