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

Can't view files called "cache.rs". #831

Closed
adamnemecek opened this issue Feb 15, 2020 · 1 comment
Closed

Can't view files called "cache.rs". #831

adamnemecek opened this issue Feb 15, 2020 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@adamnemecek
Copy link

adamnemecek commented Feb 15, 2020

If I make a file named "cache.rs", and try to open it with bat, I get an error message.

error: The subcommand 'cache.rs' wasn't recognized
        Did you mean 'cache'?

If you believe you received this message in error, try re-running with 'bat -- dcache1.rs'

USAGE:
    bat [OPTIONS] [FILE]...
    bat <SUBCOMMAND>

For more information try --help

It seems like it's broken for all files that contains the word "cache" (e.g. "cache1".rs), not just "cache.rs". "cbche.rs" works just fine, so I'm guessing at some point you are checking for substring instead of perfect match?

@eth-p eth-p added the bug Something isn't working label Feb 15, 2020
@sharkdp sharkdp added the duplicate This issue or pull request already exists label Feb 16, 2020
@sharkdp
Copy link
Owner

sharkdp commented Feb 16, 2020

Which version of bat do you use? I can't reproduce this.

This should have been fixed in 0.12: #584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants