-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
utility command to add customizations #1266
Comments
If you don't mind using an external repo, I have something for things like this in my bat-extras repo. It's currently experimental (and thus undocumented), but it should work fine: https://www.github.com/eth-p/bat-extras/tree/master/src%2Fbat-modules.sh It builds just like any of the other bat-extras scripts, and you can use it with The config file syntax is as follows: syntax URL
checkout REF # Defaults to master if omitted. And URL can be any of the following:
It should work fine on MacOS, Linux, and WSL 2. I haven't tested MSYS2/Cygwin/GitBash, but if it has all of the common gnu coreutils, it will probably work too. |
After reading #1262 and then this, you've given me a pretty interesting idea. @sharkdp, would you be open to the idea of hosting a community-driven repo of themes and syntaxes? If so, we could add a command like Doing something like this could also let us move some of the more obscure syntaxes we include into the community repo, and help reduce startup time. Better yet, we could strip it down to the bare minimum and have bat install syntaxes on demand! Or if that seems a bit too far out of bat-as-a-command's scope, I could probably create an external Python script (or Homebrew repo) exactly for something like this. |
Potentially related to that idea: #919 |
I would have to think about this a bit more, but it sounds like a cool idea. Two points that come to my mind right now:
|
#919 could definitely meet the criteria for the repository of syntaxes/themes. I have two concerns with that, though:
That could likely be solved with the automatic syntax download idea. I suppose we should also be mindful of the rare cases where bat is used without internet, though. Either way, we definitely should do a poll if we ever plan remove any built-ins. |
adding customizations is easy enough after one has understood the concept, but having a util command that invokes git would be nice (e.g.
bat --add-syntax git://..
)related #948
The text was updated successfully, but these errors were encountered: