-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Command line option --language csharp
will cause an error
#2775
Comments
Markdown allows to use echo "using System;" | bat -l 'C#' EDIT: confirmed that the above works. Perhaps a simpler solution would be (if you never look at Java code for example), to update the |
Another idea is that we could extend I'm not sure what the best way to approach it would be, since
I'm leaning towards the last approach. Thoughts, @sharkdp, @keith-hall, @Enselic? |
If I understand correctly the last approach is essentially registering an alias, right? I'm curious if there are any other use cases than for C# - where the language is referred to by multiple similar names. Because if it's just C# for example we could also bundle another |
I would say sharkdp and keith-hall are the experts when it comes to syntax mapping, and I 100% trust their judgements in these matters. |
@keith-hall it would just be an alias, yeah. I'll defer to your and sharkdp's judgement for the best approach to take with this for the same reasons Enselic mentioned, though. |
I think @eth-p's |
What steps will reproduce the bug?
[bat error]: unknown syntax: 'csharp'
What happens?
You cannot specify csharp as a language option.
What did you expect to happen instead?
Let's specify csharp in the markdown code block.
Syntax highlighting is performed as expected.
How did you install
bat
?cargo install bat
bat version and environment
Software version
bat 0.24.0
Operating system
Linux 6.2.0-36-generic
Command-line
Environment variables
System Config file
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '/home/kojix2/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '/home/kojix2/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'/home/kojix2/.cache/bat' not found
Compile time information
Less version
The text was updated successfully, but these errors were encountered: