Manually setting the filetype from the default unknown to sh on a script that does not use a file extension nor use the standard #! /bin/sh header doesn't change the colors and other syntax highlighting.
Solution
Please set filetype shell not the file extension set filetype sh.
Comments
set filetype X does not mean treat this file as if it were file.X as I had thought at first glance of the setting.
There wasn't really a straightforward way to search for extension -> filetype that micro would have used (although it's quite obvious) but to open another script and double check the values it was producing for micro to use.
I'm posting this here for hopefully easier troubleshooting for others.
I didn't find any results while troubleshooting (probably nobody else is quite as bad at their Google-fu than I). So perhaps this will show up in the results for others.
Problem
Manually setting the filetype from the default
unknown
tosh
on a script that does not use a file extension nor use the standard#! /bin/sh
header doesn't change the colors and other syntax highlighting.Solution
Please
set filetype shell
not the file extensionset filetype sh
.Comments
set filetype X
does not mean treat this file as if it werefile.X
as I had thought at first glance of the setting.There wasn't really a straightforward way to search for extension -> filetype that micro would have used (although it's quite obvious) but to open another script and double check the values it was producing for micro to use.
I'm posting this here for hopefully easier troubleshooting for others. I didn't find any results while troubleshooting (probably nobody else is quite as bad at their Google-fu than I). So perhaps this will show up in the results for others.