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

READMEs shouldn't be highlighted when suffixed with ~ #313

Closed
henrywallace opened this issue Nov 4, 2017 · 3 comments
Closed

READMEs shouldn't be highlighted when suffixed with ~ #313

henrywallace opened this issue Nov 4, 2017 · 3 comments

Comments

@henrywallace
Copy link

No description provided.

@ogham
Copy link
Owner

ogham commented Dec 17, 2017

So like, ~README? I don't think I've seen that filename used before

@henrywallace henrywallace changed the title READMEs should be highlighted when prefixed with ~ READMEs should be highlighted when suffixed with ~ Dec 17, 2017
@henrywallace
Copy link
Author

henrywallace commented Dec 17, 2017

I incorrectly wrote prefixed, when I meant suffixed.

So for example, README.md~ will be highlighted, a common in-progress saved suffix.
Similarly, README.md.swp will be highlighted.
But, #README.md# will not be highlighted.

I'm using exa v0.8.0. I'd be happy to give a shot at a PR, if given some pointers where things are done.

@ogham
Copy link
Owner

ogham commented Dec 17, 2017

Oh! I originally misunderstood your bug report, and was going to say something like "exa should highlight README.md~ as a backup file, rather than as a readme file".

But then I tried it, and you're right, it's a bug:

screen shot 2017-12-17 at 18 03 02

A PR would be very welcome! It's happening because the filetype checker checks for immediate files (such as readmes) before it checks for tmp files in src/info/filetype.rs. The solution would be to move the temp file check above the immediate file check.

@henrywallace henrywallace changed the title READMEs should be highlighted when suffixed with ~ READMEs shouldn't be highlighted when suffixed with ~ Dec 17, 2017
@ogham ogham closed this as completed in 57e4c08 Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants