Closed liiight closed 2 years ago
@willmcgugan I'd like to take a jab at doing this, if that's ok
You're more than welcome! What does the text lexer do? Maybe you could just print it there is no lexer.
Text lexer just print the contents as plain text, I think that's a sensible fallback.
Maybe a switch can be added, like --enable-lexer-fallback
?
I think this should be the default fallback. available even without a switch
Merged via #12
Hi there. in my understanding, this should be working right? rich should have displayed file
Try upgrading rich-cli
I noticed this after upgrading with pipx. which is the latest version?
this is not fixed.
When trying to load a file that does not have a lexer (without specifying a lexer override via
-x
), the file fails to load:I would like to suggest a fallback to
text
lexer, perhaps with a warning message, instead of not displaying the file