Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodetect .bashrc as bash instead of Config #1499

Closed
dario2994 opened this issue May 20, 2017 · 3 comments · Fixed by #2167

Comments

@dario2994
Copy link

commented May 20, 2017

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.

@codebrainz

This comment has been minimized.

Copy link
Member

commented May 20, 2017

Yeah, *rc seems way too broad. What format even works for *rc that has INI-style syntax?

@elextr

This comment has been minimized.

Copy link
Member

commented May 20, 2017

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 😄

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.

@ntrel

This comment has been minimized.

Copy link
Member

commented May 31, 2019

#2167 fixes this.

@ntrel ntrel closed this in #2167 Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.