o2sh / onefetch

Command-line Git information tool

Home Page:https://onefetch.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.cls file extension not recognized

MaxBGreenberg opened this issue Β· comments

Summary πŸ’‘

When I try to run onefetch on a repository for a LaTeX document class, file extension .cls, it returns an error, Error: Could not find any source code in this repository. It appears that this file extension is not recognized.

Motivation πŸ”¦

Working on some custom XeLaTeX document classes which I'm tracking with git.

I don't know if it will be possible for us to handle this out-of-the-box. Last I checked, tokei (our language analysis tool) is designed in a way that languages cannot share the same file extensions. See XAMPPRocky/tokei#520 for example.

This will need to be resolved upstream with tokei (and tokei will need a new release to crates.io πŸ˜…).

You might be able to argue your case by showing some data. For example, with a quick search, 25k TeX files use the .cls extension, and less than 7k VBA files use .cls as the extension. IMO if an extension can only belong to one language, it should at least be the most common language πŸ˜†

Having looked through their issues, it looks like they're working towards adding a feature where you can remap a file extension to the .tokeirc configuration file. Does .tokeirc affect the behaviour of onefetch?

Since .tokeignore is used without us needing to explicitly enable/use it, I assume that .tokeirc would similarly be read without us needing to do anything besides bump the tokei version.

Just stumbled on XAMPPRocky/tokei#1014. Linking.