linguist
linguist copied to clipboard
Add support for generic option-lists like `.ackrc`
Description
This pull-request adds support for generic option-lists that use shell syntax for their contents:
# Comment
--key=value
--verbose
-f
Currently, this is limited to .ackrc
files, but I suspect analogous formats might be added in future. Hence why I've named this language Option List
instead of merely ackrc
or something.
About .ackrc
files
.ackrc
is a configuration file read by ack(1)
that has ~5,683 indexed results on GitHub, with a healthy ratio of users and repositories.
The dotless variant ackrc
appears to have adequate distribution, with ~430 search results and an ostensibly healthy user/repo ratio. Code search currently makes it cumbersome to count the exact number of users, so @lildude will want to review the actual usage of ackrc
files on GitHub.
Colour rationale
The colour I chose is a muted shade of the Shell language's colour (specifically, its saturation and brightness levels were halved). Since these option-lists are a "shade" of shell syntax, I figured the derivation was appropriate.
Shell: | #89e051
|
---|---|
Option List: | #476732
|
Checklist:
- [x] I am adding a new language
- [x] The ~~extension~~ filename of the language is used in hundreds of repositories:
Probably. I'll leave the census to @lildude. :wink: For now, a search for files named.ackrc
tosses up ~5,683 results. - [x] I have included a real-world usage sample.
-
ackrc
: Sourced fromlarrylv/dotfiles
, an MIT-licensed repository. -
.ackrc
: Written by yours truly. It adds Linguist-related filetypesack(1)
is missing.
-
- [ ] ~~I have included a syntax highlighting grammar~~
- [ ] ~~I have updated the heuristics~~
- [x] The ~~extension~~ filename of the language is used in hundreds of repositories:
@lildude Don't worry, I haven't forgotten about Mermaid. 😜 Just had to scratch an itch or two with some simpler formats first. 😁