- '*rc' works?
Yes, try shellcheckrc for example.
- '*rc' is not ok because 'rc' may be...
Comprehensive file extension lists I found online show no problems. Also, Cud still lexes "~/.bashrc" and "~/.zshrc" correctly as shell script. So those present no conflict. Bash and zsh have just a few confs anyway, so a "detect" stanza could handle them.
Maybe transpose dot and asterisk to compromise? A new pattern
would catch .netrc or .wgetrc while missing shellcheckrc and most.rc. Yet it's vastly more common than dot-suffix
on *nix and macOS. On Windows, the .rc suffix means
resource definition script which has its own Cud lexer.
So avoiding that dot-suffix pattern may be more correct. The compromise pattern
covers most cases on *nix and macOS. A "hidden file" ending in "rc" is always a configuration file.
- for the case of fppkg.cfg - better to add this case to "detect" option (described in the wiki).
No, because this pattern is not specific to Free Pascal. Windows
uses *.cfg a lot. Linux programs use it too, if not commonly. Java apps may have a "jvm.cfg" file. The suffix can only mean "configuration" anyway, no matter the platform.
So my new recommendation is
Code: Select all
"files": ".*rc;conf;*.conf;config;*.config;cfg;*.cfg"
Leaving "shellcheckrc" and "most.rc" TBD. I just tested "detect" lines for them without success. So, outliers need more thought, but that makes sense, since their names are non-standard for their category.
Why does the lexer show as "Config-rc ^" (with caret) in dialogs, not just "Config-rc"? I tried all lexer name variations to "detect" shellcheckrc but nothing worked. And the name should be "Config-RC" as RC was technically an acronym (Run Control, I think).
Thanks!