Comments (1)
Markdown allows to use csharp
as a language specifier token, but that's because it has a special rule for it. I believe bat
by default expects you to use C#
to refer to the CSharp syntax.
I'm not at a computer right now to verify, but try
echo "using System;" | bat -l 'C#'
EDIT: confirmed that the above works.
I agree that it would be nice if the bat
language argument on the command line would also work with the Markdown language tokens, but that would take quite a lot of re-working/duplication and maintenance and in some cases where ambiguity could ensue, could cause confusion.
Perhaps a simpler solution would be (if you never look at Java code for example), to update the first_line_match
for the C#.sublime-syntax
to match on using System;
, then you wouldn't even need the language specifier. (See https://github.com/sharkdp/bat/blob/master/README.md#adding-new-syntaxes--language-definitions for details on how to do that.)
from bat.
Related Issues (20)
- Open $VISUAL / $EDITOR on "v" keypress HOT 2
- how do I change the --highlight-line color from command line? HOT 1
- Gobal --help alias has unintended consequences
- Feature Request: Copy to Clipboard Option
- Syntax typo in russian README HOT 1
- --force-colorization does not work for --help
- bat display markdown wrongly HOT 1
- Set file name as terminal title HOT 1
- Add a --head option that is equivalent to piping the output to head but works with device files HOT 1
- Integrating with google/oss-fuzz for continuous fuzz testing? HOT 1
- Bat failed to work in Powershell or CMD properly HOT 5
- Uninstalling BAT HOT 1
- bat aliased as cat HOT 3
- Bat syntax highlighting doesn't play nicely with backslashes HOT 6
- The system cannot find the path specified. (os error 3) - When attempting to bat a file with Tilde in the path HOT 4
- Highlighting for bioinformatics HOT 4
- support coloresque for css language HOT 7
- Not have syntax highlight from stdin after pipe in nushell HOT 1
- Add optional git blame to file output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bat.