From de209f8a23ad418040da14b882c4a0ce6194ee87 Mon Sep 17 00:00:00 2001 From: rohan436 Date: Mon, 16 Mar 2026 16:47:50 +0800 Subject: [PATCH 1/3] docs: fix README sidebar wording --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95f4e2a4..f0d4efb4 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ languages: ### Git integration `bat` communicates with `git` to show modifications with respect to the index -(see left side bar): +(see left sidebar): ![Git integration example](https://i.imgur.com/2lSW4RE.png) From a4e853c4fa20016a4be5a705f7d637eb90aa012d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Gonz=C3=A1lez=20Prieto?= Date: Tue, 17 Mar 2026 22:59:21 +0100 Subject: [PATCH 2/3] Map ignore files to Git Ignore syntax This would catch any dotfiles that end in "ignore", but not `.ignore` Set as a lower priority rule (90 vs the usual 50) because it's a blanket assignation. If there are conflict with other, more specific rules, those will take precedence. --- CHANGELOG.md | 1 + src/syntax_mapping/builtins/common/90-ignore-files.toml | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 src/syntax_mapping/builtins/common/90-ignore-files.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e4a29d..7de41716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ - Add syntax highlighting support for COBOL, see #3584 (@adukhan99) - Fixed manpage syntax so that ANSI escape codes don't get incorrectly highlighted and thus broken, see #3586 (@BlueElectivire) - Map several Google Cloud CLI config files to their appropriate syntax #3635 (@victor-gp) +- Map all ignore dotfiles to Git Ignore syntax #3636 (@victor-gp) ## Themes diff --git a/src/syntax_mapping/builtins/common/90-ignore-files.toml b/src/syntax_mapping/builtins/common/90-ignore-files.toml new file mode 100644 index 00000000..90984aff --- /dev/null +++ b/src/syntax_mapping/builtins/common/90-ignore-files.toml @@ -0,0 +1,2 @@ +[mappings] +"Git Ignore" = [".?*ignore"] From ffed52f6ebc449b6dc74041829168541ef46b767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Gonz=C3=A1lez=20Prieto?= Date: Wed, 18 Mar 2026 14:20:35 +0100 Subject: [PATCH 3/3] Document how to contribute syntax mappings --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3852a755..3dcd11bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,6 +68,8 @@ users, please read the corresponding [documentation](https://github.com/sharkdp/bat/blob/master/doc/assets.md) first. +To map a file name pattern to an existing syntax, read [the documentation here](https://github.com/sharkdp/bat/blob/master/src/syntax_mapping/builtins/README.md). + Note: We are currently not accepting new default themes.