Related: https://github.com/sharkdp/bat/pull/582
What version of bat are you using?
bat 0.15.1
Describe the bug you encountered:
My User for my SSH Hosts start with a numeric character. bat shows the digits in a different color than the alpha characters:

Describe what you expected to happen?
The entire User should be colored as tan, not just the sratna. Note that GitHub also misrenders the User: https://github.com/sumanthratna/dotprophet/blob/50781d97425d37b35a3cfbfb4e72abdb7873325d/sshconfig.
How did you install bat?
Homebrew
$ uname -srm
Darwin 19.5.0 x86_64
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F72f
$ bat --version
bat 0.15.1
$ env
No wrapper script for 'bat'.
No wrapper function for 'bat'.
No wrapper function for 'cat'.
$ less --version
less 487 (POSIX regular expressions)
Thank you for reporting this.
This needs to be fixed upstream in https://github.com/robballou/sublimetext-sshconfig
It looks like this got fixed: https://github.com/robballou/sublimetext-sshconfig/issues/7#event-3329426974. I'll close this issue once the next release of bat is published.
The sysadmin in me wants to clean up your ssh_config.
Host tj
HostName jumpbox.example.com
User you
Host zoidberg director snowy
User you
ProxyJump tj
Host *
# The things from the top of your file, except
# most of them are already defaults.
ServerAliveInterval 120
or even
Host tj
HostName jumpbox.example.com
Host zoidberg director snowy
ProxyJump tj
Host *.example.com
User you
Host *
# The things from the top of your file, except
# most of them are already defaults.
ServerAliveInterval 120
It looks like this got fixed: robballou/sublimetext-sshconfig#7 (comment).
:+1:
I'm closing the ticket now, but feel free to re-open this, if this should still be an issue in the next release
I just tried bat ~/.ssh/config and bat isn't showing any syntax highlighting. Should I create a new issue for this or does this sound like an issue with https://github.com/robballou/sublimetext-sshconfig?
EDIT: I installed from brew; I'm on bat 0.15.1.
I just tried
bat ~/.ssh/configandbatisn't showing any syntax highlighting. Should I create a new issue for this or does this sound like an issue with https://github.com/robballou/sublimetext-sshconfig?EDIT: I installed from
brew; I'm onbat 0.15.1.
That should work and sounds like some kind of bug. It would be great if you could open a new ticket. (I can not reproduce it with 0.15.1)
This issue should be fixed in bat v0.15.2. Feedback would be appreciated.
I don't think this has been fixed for me. The output looks the same as that in the screenshot in the original post.
I don't think it's an upstream problem anymore. There's a unit test for your username. It passes. 🤷♂️
This is strange; the submodule for sublimetext-sshconfig in this repo (sharkdp/bat) has been updated: https://github.com/sharkdp/bat/commit/257f978cebab7942b813cc3bd5ad74a833d35b97.
Oh, this is my fault. I forgot to rebuild the binary caches. I will put out a new release soon.
Should be fixed in v0.15.3.
It works in v0.15.3!
Most helpful comment
The sysadmin in me wants to clean up your
ssh_config.or even