-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
What version of bat
are you using?
bat 0.15.4
Describe the bug you encountered:
Git configuration files inside $XDG_CONFIG_HOME/git/{ignore,config,attributes}
are not highlighted
From man git-config
FILES
If not set explicitly with --file, there are four files where git config will search for
configuration options:
$(prefix)/etc/gitconfig
System-wide configuration file.
$XDG_CONFIG_HOME/git/config
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set or empty,
$HOME/.config/git/config will be used. Any single-valued variable set in this file will be
overwritten by whatever is in ~/.gitconfig. It is a good idea not to create this file if you
sometimes use older versions of Git, as support for this file was added fairly recently.
~/.gitconfig
User-specific configuration file. Also called "global" configuration file.
$GIT_DIR/config
Repository specific configuration file.
$GIT_DIR/config.worktree
This is optional and is only searched when extensions.worktreeConfig is present in
$GIT_DIR/config.
Describe what you expected to happen?
They should be highlighted
How did you install bat
?
homebrew
system
$ uname -srm
Darwin 19.6.0 x86_64
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.6
BuildVersion: 19G2021
bat
$ bat --version
bat 0.15.4
$ env
BAT_CONFIG_PATH=/Users/ahmed/.config/bat/config
PAGER=less
bat_config
$ cat /Users/ahmed/.config/bat/config
--theme="TwoDark"
--style="numbers,changes,header"
--italic-text=always
--map-syntax '.*ignore:Git Ignore'
--map-syntax '.gitconfig.local:Git Config'
--map-syntax '.zsh*:Bourne Again Shell (bash)'
--map-syntax '.vimrc.local:VimL'
--map-syntax 'vimrc:VimL'
bat_wrapper
No wrapper script for 'bat'.
bat_wrapper_function
No wrapper function for 'bat'.
$ /usr/local/bin/zsh --login -i -c type cat
cat is an alias for bat
cat is /usr/local/opt/coreutils/libexec/gnubin/cat
cat is /bin/cat
tool
$ less --version
less 487 (POSIX regular expressions)