In filetype_extensions.conf the line (notice `*rc`)
`Conf=*.conf;*.ini;config;*rc;*.cfg;*.desktop;*.properties;`
overwrites (notice `.bashrc`)
`Sh=PKGBUILD;*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.mksh;*.zsh;*.ash;*.bash;.bashrc;bash.bashrc;.bash_*;bash_*;*.m4;PKGBUILD;*profile;`
and therefore .bashrc is detected as being a Config file instead of a bash script.
Yeah, `*rc` seems way too broad. What format even works for `*rc` that has INI-style syntax?
Maybe it was meant for some type (like gtkrc) that isn't exactly an INI file but thats the best built-in lexer for the job. The `*rc` for conf has been that way since `filetype_extensions.conf` was first created in 2008 so what it was meant to cover is lost in the mists of time I'm afraid :smile:
Since its "first match wins" IIRC and conf comes before sh it wins. It would be good for there to be a way of ordering from most specific match like `.bashrc` to least specific like `*rc` because I think there are some other pairs of extensions that clash but may be resolvable by specificity.
@dario2994 in the meantime you can just take the `*rc;` out of your copy by editing it with `Menu->Tools->Configuration Files->filetype_extensions.conf`.
#2167 fixes this.
Closed #1499 via #2167.
github-comments@lists.geany.org