From 90b2c57951d8423e41859c5c228151ad087ce0d1 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Thu, 17 Jul 2025 06:56:16 +0200 Subject: [PATCH 01/27] Stop auto-merge dependabot PRs Our CI runs a fair amount of unaudited third party code. I'd like to stop using my Personal Access Token until we have had time to security harden our CI. --- .../workflows/Auto-merge-dependabot-PRs.yml | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/Auto-merge-dependabot-PRs.yml diff --git a/.github/workflows/Auto-merge-dependabot-PRs.yml b/.github/workflows/Auto-merge-dependabot-PRs.yml deleted file mode 100644 index 741eb684..00000000 --- a/.github/workflows/Auto-merge-dependabot-PRs.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This workflow triggers auto-merge of any PR that dependabot creates so that -# PRs will be merged automatically without maintainer intervention if CI passes -name: Auto-merge dependabot PRs - -on: - pull_request_target: - types: [opened] - -jobs: - auto-merge: - if: github.repository == 'sharkdp/bat' && startsWith(github.head_ref, 'dependabot/') - runs-on: ubuntu-latest - environment: - name: auto-merge - url: https://github.com/sharkdp/bat/blob/main/.github/workflows/Auto-merge-dependabot-PRs.yml - env: - GITHUB_TOKEN: ${{ secrets.AUTO_MERGE_GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - - run: | - gh pr review ${{ github.event.pull_request.number }} --comment --body "If CI passes, this dependabot PR will be [auto-merged](https://github.com/sharkdp/bat/blob/main/.github/workflows/Auto-merge-dependabot-PRs.yml) 🚀" - - run: | - gh pr merge --auto --squash ${{ github.event.pull_request.number }} From 8b12191bdac9de952d9df842b21b88aa3ceec02a Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Feb 2025 20:56:51 +0200 Subject: [PATCH 02/27] Make map-syntax target case insensitive --- src/assets.rs | 9 ++++++++- tests/integration_tests.rs | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/assets.rs b/src/assets.rs index a5608e3b..ed6f27e9 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -163,7 +163,7 @@ impl HighlightingAssets { if let Some(MappingTarget::MapTo(syntax_name)) = syntax_match { return self - .find_syntax_by_name(syntax_name)? + .find_syntax_by_token(syntax_name)? .ok_or_else(|| Error::UnknownSyntax(syntax_name.to_owned())); } @@ -259,6 +259,13 @@ impl HighlightingAssets { .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set })) } + fn find_syntax_by_token(&self, token: &str) -> Result> { + let syntax_set = self.get_syntax_set()?; + Ok(syntax_set + .find_syntax_by_token(token) + .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set })) + } + fn get_syntax_for_file_name( &self, file_name: &OsStr, diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index c367c538..0f570f89 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -2821,6 +2821,27 @@ fn highlighting_independant_from_map_syntax_case() { .stderr(""); } +#[test] +fn map_syntax_target_syntax_case_insensitive() { + let expected = bat() + .arg("-f") + .arg("--map-syntax=*.config:json") + .arg("map-syntax_case.Config") + .assert() + .get_output() + .stdout + .clone(); + + bat() + .arg("-f") + .arg("--map-syntax=*.config:json") + .arg("map-syntax_case.Config") + .assert() + .success() + .stdout(expected) + .stderr(""); +} + #[test] fn strip_ansi_always_strips_ansi() { bat() From 35c3f065a360b339345c04f5a5d2acd72deb8a31 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Feb 2025 21:02:50 +0200 Subject: [PATCH 03/27] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29ddf751..b56fbf8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fix crash for multibyte characters in file path, see issue #3230 and PR #3245 (@HSM95) - Add missing mappings for various bash/zsh files, see PR #3262 (@AdamGaskins) - Send all bat errors to stderr by default, see #3336 (@JerryImMouse) +- Make --map-syntax target case insensitive to match --language, see #3206 (@keith-hall) ## Other From feb0bc1ae62c09b7c2bcf198c634812914914afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Tue, 22 Jul 2025 07:15:52 +0200 Subject: [PATCH 04/27] Update terminal-colorsaurus to 1.0 --- Cargo.lock | 15 +++++++++++---- Cargo.toml | 2 +- src/theme.rs | 8 ++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6cbcd425..506d3981 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1536,9 +1536,9 @@ dependencies = [ [[package]] name = "terminal-colorsaurus" -version = "0.4.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "858625398bdd5da7a96e8ad33a10031a50c3a5ad50d5aaa81a2827369a9c216c" +checksum = "3f7226dad4b1817567c1e2f5d453897ef36abe79def7783af3fa241a694e30b3" dependencies = [ "cfg-if", "libc", @@ -1546,13 +1546,14 @@ dependencies = [ "mio", "terminal-trx", "windows-sys 0.59.0", + "xterm-color", ] [[package]] name = "terminal-trx" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a5b836e7f4f81afe61b5cd399eee774f25edcfd47009a76e29f53bb6487833" +checksum = "975b4233aefa1b02456d5e53b22c61653c743e308c51cf4181191d8ce41753ab" dependencies = [ "cfg-if", "libc", @@ -2040,6 +2041,12 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +[[package]] +name = "xterm-color" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de5f056fb9dc8b7908754867544e26145767187aaac5a98495e88ad7cb8a80f" + [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index bc5ff954..1c07f79b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ walkdir = { version = "2.5", optional = true } bytesize = { version = "1.3.0" } encoding_rs = "0.8.35" execute = { version = "0.2.13", optional = true } -terminal-colorsaurus = "0.4" +terminal-colorsaurus = "1.0" unicode-segmentation = "1.12.0" itertools = "0.13.0" diff --git a/src/theme.rs b/src/theme.rs index b2903b86..90c0e3dc 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -266,10 +266,10 @@ impl ColorSchemeDetector for TerminalColorSchemeDetector { } fn detect(&self) -> Option { - use terminal_colorsaurus::{color_scheme, ColorScheme as ColorsaurusScheme, QueryOptions}; - match color_scheme(QueryOptions::default()).ok()? { - ColorsaurusScheme::Dark => Some(ColorScheme::Dark), - ColorsaurusScheme::Light => Some(ColorScheme::Light), + use terminal_colorsaurus::{theme_mode, QueryOptions, ThemeMode}; + match theme_mode(QueryOptions::default()).ok()? { + ThemeMode::Dark => Some(ColorScheme::Dark), + ThemeMode::Light => Some(ColorScheme::Light), } } } From 38762724f5711a9b40a7b60386c61d65a619da09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Tue, 22 Jul 2025 07:27:40 +0200 Subject: [PATCH 05/27] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b56fbf8c..e85ba4ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Build script: replace string-based codegen with quote-based codegen #3340 (@cyqsimon) - Improve code coverage of `--list-languages` parameter #2942 (@sblondon) - Only start offload worker thread when there's more than 1 core #2956 (@cyqsimon) +- Update terminal-colorsaurus (the library used for dark/light detection) to 1.0, see #3347 (@bash) ## Syntaxes From 23d97eb4a899444e2fa226495c2d28027335cc69 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 23 Jul 2025 07:56:46 -0400 Subject: [PATCH 06/27] Update console dependency to 0.16.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c07f79b..0b5187c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine nu-ansi-term = "0.50.0" ansi_colours = "^1.2" bincode = "1.0" -console = "0.15.10" +console = "0.16.0" flate2 = "1.1" once_cell = "1.20" thiserror = "2.0" From d0b5dd8977a35f6e5f8b81d155ba53cff5275ea1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 23 Jul 2025 07:57:07 -0400 Subject: [PATCH 07/27] Update Cargo.lock for console 0.16.0 --- Cargo.lock | 113 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 93 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 506d3981..59dbd349 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -304,15 +304,15 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "console" -version = "0.15.10" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +checksum = "2e09ced7ebbccb63b4c65413d821f2e00ce54c5ca4514ddc6b3c892fdbcbc69d" dependencies = [ "encode_unicode", "libc", "once_cell", "unicode-width", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -613,7 +613,7 @@ dependencies = [ "cfg-if", "libc", "wasi 0.13.3+wasi-0.2.2", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1093,7 +1093,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1842,7 +1842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ "windows-core 0.56.0", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1852,7 +1852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core 0.57.0", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1864,7 +1864,7 @@ dependencies = [ "windows-implement 0.56.0", "windows-interface 0.56.0", "windows-result", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1876,7 +1876,7 @@ dependencies = [ "windows-implement 0.57.0", "windows-interface 0.57.0", "windows-result", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1929,7 +1929,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1938,7 +1938,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1947,7 +1947,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", ] [[package]] @@ -1956,14 +1965,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -1972,48 +1997,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.7.11" From 3dfb51b25d1e0fe695b548f986ffb4d15210fc1f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 23 Jul 2025 08:04:24 -0400 Subject: [PATCH 08/27] Add changelog entry for PR#3351 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e85ba4ba..3c15c198 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Improve code coverage of `--list-languages` parameter #2942 (@sblondon) - Only start offload worker thread when there's more than 1 core #2956 (@cyqsimon) - Update terminal-colorsaurus (the library used for dark/light detection) to 1.0, see #3347 (@bash) +- Update console dependency to 0.16, see #3351 (@musicinmybrain) ## Syntaxes From 3574118e171aa6d94848f36239e70788d51e47d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Thu, 31 Jul 2025 00:00:00 +0000 Subject: [PATCH 09/27] Add syntax mapping for flatpakref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Géczi --- src/syntax_mapping/builtins/linux/50-flatpak.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/syntax_mapping/builtins/linux/50-flatpak.toml diff --git a/src/syntax_mapping/builtins/linux/50-flatpak.toml b/src/syntax_mapping/builtins/linux/50-flatpak.toml new file mode 100644 index 00000000..fffc6dd2 --- /dev/null +++ b/src/syntax_mapping/builtins/linux/50-flatpak.toml @@ -0,0 +1,4 @@ +[mappings] +"INI" = [ + "*.flatpakref", +] From 20caaf26c847cc382436c10ef9aa7b541715df58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Thu, 31 Jul 2025 00:00:00 +0000 Subject: [PATCH 10/27] Add syntax mapping for flatpakrepo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Géczi --- src/syntax_mapping/builtins/linux/50-flatpak.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/syntax_mapping/builtins/linux/50-flatpak.toml b/src/syntax_mapping/builtins/linux/50-flatpak.toml index fffc6dd2..76cc70b1 100644 --- a/src/syntax_mapping/builtins/linux/50-flatpak.toml +++ b/src/syntax_mapping/builtins/linux/50-flatpak.toml @@ -1,4 +1,5 @@ [mappings] "INI" = [ "*.flatpakref", + "*.flatpakrepo" ] From bac58be1eeba16e4a905ed83ed055713808f65e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Thu, 31 Jul 2025 00:00:00 +0000 Subject: [PATCH 11/27] Add entry to `CHANGELOG.md` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Géczi --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c15c198..8e5175c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - Add syntax highlighting for VHDL, see #3337 (@JerryImMouse) - Add syntax mapping for certbot certificate configuration #3338 (@cyqsimon) - Update Lean syntax from Lean 3 to Lean 4 #3322 (@YDX-2147483647) +- Map `.flatpakref` and `.flatpakrepo` files to INI syntax #3353 (@Ferenc-) ## Themes From c56ce6ad36bd7ea5ad79dda55ef2da9abcf2e559 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 02:53:17 +0000 Subject: [PATCH 12/27] Bump assets/syntaxes/02_Extra/typst-syntax-highlight Bumps [assets/syntaxes/02_Extra/typst-syntax-highlight](https://github.com/hyrious/typst-syntax-highlight) from `3f2561d` to `4e2e68b`. - [Commits](https://github.com/hyrious/typst-syntax-highlight/compare/3f2561d4d891f9f326fa70f9f06b6e99fda8adc3...4e2e68b0a13555720a5ff0c4b32db98ddf490ed1) --- updated-dependencies: - dependency-name: assets/syntaxes/02_Extra/typst-syntax-highlight dependency-version: 4e2e68b0a13555720a5ff0c4b32db98ddf490ed1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- assets/syntaxes/02_Extra/typst-syntax-highlight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/typst-syntax-highlight b/assets/syntaxes/02_Extra/typst-syntax-highlight index 3f2561d4..4e2e68b0 160000 --- a/assets/syntaxes/02_Extra/typst-syntax-highlight +++ b/assets/syntaxes/02_Extra/typst-syntax-highlight @@ -1 +1 @@ -Subproject commit 3f2561d4d891f9f326fa70f9f06b6e99fda8adc3 +Subproject commit 4e2e68b0a13555720a5ff0c4b32db98ddf490ed1 From 9d3245eebe28a184d77ec84099366b658238ab10 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Thu, 7 Aug 2025 22:32:32 +0300 Subject: [PATCH 13/27] Replace missing asset submodules --- .gitmodules | 8 +++---- CHANGELOG.md | 1 + assets/syntaxes/02_Extra/Hosts.sublime-syntax | 23 ------------------- assets/syntaxes/02_Extra/hosts | 2 +- tests/syntax-tests/highlighted/Hosts/hosts | 12 +++++----- 5 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 assets/syntaxes/02_Extra/Hosts.sublime-syntax diff --git a/.gitmodules b/.gitmodules index 1ba4495e..860bcbb0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -113,9 +113,6 @@ [submodule "assets/syntaxes/DotENV"] path = assets/syntaxes/02_Extra/DotENV url = https://github.com/zaynali53/DotENV -[submodule "assets/syntaxes/hosts"] - path = assets/syntaxes/02_Extra/hosts - url = https://github.com/brandonwamboldt/sublime-hosts [submodule "assets/syntaxes/ssh-config"] path = assets/syntaxes/02_Extra/ssh-config url = https://github.com/robballou/sublimetext-sshconfig.git @@ -177,7 +174,7 @@ url = https://github.com/euler0/sublime-glsl [submodule "assets/syntaxes/02_Extra/Nginx"] path = assets/syntaxes/02_Extra/Nginx - url = https://github.com/brandonwamboldt/sublime-nginx + url = https://github.com/SublimeText/nginx [submodule "assets/syntaxes/02_Extra/Apache"] path = assets/syntaxes/02_Extra/Apache url = https://github.com/colinta/ApacheConf.tmLanguage @@ -278,3 +275,6 @@ [submodule "assets/syntaxes/02_Extra/SmartVHDL"] path = assets/syntaxes/02_Extra/SmartVHDL url = https://github.com/TheClams/SmartVHDL +[submodule "assets/syntaxes/02_Extra/hosts"] + path = assets/syntaxes/02_Extra/hosts + url = https://github.com/tijn/hosts.tmLanguage diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5175c6..152b7d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ - Add syntax mapping for certbot certificate configuration #3338 (@cyqsimon) - Update Lean syntax from Lean 3 to Lean 4 #3322 (@YDX-2147483647) - Map `.flatpakref` and `.flatpakrepo` files to INI syntax #3353 (@Ferenc-) +- Update hosts syntax #3368 (@keith-hall) ## Themes diff --git a/assets/syntaxes/02_Extra/Hosts.sublime-syntax b/assets/syntaxes/02_Extra/Hosts.sublime-syntax deleted file mode 100644 index eac0ec0e..00000000 --- a/assets/syntaxes/02_Extra/Hosts.sublime-syntax +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: hosts -file_extensions: - - hosts -scope: source.hosts - -contexts: - main: - - scope: comment.line.number-sign - match: \#.* - comment: comment - - - match: ^\s*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9a-f:]+) - comment: ipaddress - scope: constant.numeric.ipaddress - - - - match: \s(localhost|ip6-loopback|ip6-localhost|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts|broadcasthost)\b - scope: keyword.host.predefined} - comment: prefdfined - diff --git a/assets/syntaxes/02_Extra/hosts b/assets/syntaxes/02_Extra/hosts index 21250a71..60ed92c4 160000 --- a/assets/syntaxes/02_Extra/hosts +++ b/assets/syntaxes/02_Extra/hosts @@ -1 +1 @@ -Subproject commit 21250a7117655b0525821237b98b882dcc231350 +Subproject commit 60ed92c472dc6038a13a38d033bba6bc64fd6913 diff --git a/tests/syntax-tests/highlighted/Hosts/hosts b/tests/syntax-tests/highlighted/Hosts/hosts index 8d322f00..22166747 100644 --- a/tests/syntax-tests/highlighted/Hosts/hosts +++ b/tests/syntax-tests/highlighted/Hosts/hosts @@ -1,8 +1,8 @@ -#this is a comment in the hosts file -127.0.0.1  localhost +#this is a comment in the hosts file +127.0.0.1 localhost -192.168.0.1 sample.test #a comment -192.160.0.200 try.sample.test try #another comment -216.58.223.238 google.com +192.168.0.1 sample.test #a comment +192.160.0.200 try.sample.test try #another comment +216.58.223.238 google.com -::1 localhost.try ip6-localhost +::1 localhost.try ip6-localhost From bd782ab22890c8b9c706dc93a5eccbd8b6ce7e31 Mon Sep 17 00:00:00 2001 From: Binbin Qian Date: Sun, 3 Aug 2025 01:00:43 +0800 Subject: [PATCH 14/27] Make batdiff more portable --- README.md | 2 +- doc/README-ko.md | 2 +- doc/README-ru.md | 2 +- doc/README-zh.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 03809435..f5ffd50c 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ You can combine `bat` with `git diff` to view lines around code changes with pro highlighting: ```bash batdiff() { - git diff --name-only --relative --diff-filter=d -z | xargs --null bat --diff + git diff --name-only --relative --diff-filter=d -z | xargs -0 bat --diff } ``` If you prefer to use this as a separate tool, check out `batdiff` in [`bat-extras`](https://github.com/eth-p/bat-extras). diff --git a/doc/README-ko.md b/doc/README-ko.md index 55cd8818..2b61abea 100644 --- a/doc/README-ko.md +++ b/doc/README-ko.md @@ -163,7 +163,7 @@ git show v0.6.0:src/main.rs | bat -l rs 볼 수 있습니다: ```bash batdiff() { - git diff --name-only --diff-filter=d -z | xargs --null bat --diff + git diff --name-only --relative --diff-filter=d -z | xargs -0 bat --diff } ``` 이것을 별도의 도구로 쓰고 싶다면 diff --git a/doc/README-ru.md b/doc/README-ru.md index 06093077..06c9a4f4 100644 --- a/doc/README-ru.md +++ b/doc/README-ru.md @@ -145,7 +145,7 @@ git show v0.6.0:src/main.rs | bat -l rs Вы можете использовать `bat` с `git diff` для просмотра строк кода вокруг изменений с подсветкой синтаксиса: ```bash batdiff() { - git diff --name-only --relative --diff-filter=d | xargs bat --diff + git diff --name-only --relative --diff-filter=d -z | xargs -0 bat --diff } ``` Если вы хотите использовать это как отдельную программу, посмотрите `batdiff` из [`bat-extras`](https://github.com/eth-p/bat-extras). diff --git a/doc/README-zh.md b/doc/README-zh.md index b626ca8e..91fd929b 100644 --- a/doc/README-zh.md +++ b/doc/README-zh.md @@ -150,7 +150,7 @@ git show v0.6.0:src/main.rs | bat -l rs ```bash batdiff() { - git diff --name-only --diff-filter=d -z | xargs --null bat --diff + git diff --name-only --relative --diff-filter=d -z | xargs -0 bat --diff } ``` From b4d529402a12c41d21f1a44814f8bec2456ed690 Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 16:06:13 +0200 Subject: [PATCH 15/27] Update ps1 completion;removed shortcuts from completion;added completion for language, theme and options --- assets/completions/_bat.ps1.in | 242 +++++++++++++++++++++++---------- 1 file changed, 170 insertions(+), 72 deletions(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index b6f62aae..b1f4a87f 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -2,96 +2,194 @@ using namespace System.Management.Automation using namespace System.Management.Automation.Language -Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -ScriptBlock { +Register-ArgumentCompleter -Native -CommandName 'bat' -ScriptBlock { param($wordToComplete, $commandAst, $cursorPosition) + $ArrayStyle = @('default', 'auto', 'full', 'plain', 'changes', 'header', 'header-filename', 'header-filesize', 'grid', 'rule', 'numbers', 'snip') + $ArrayCompletion = @('bash', 'fish', 'zsh', 'ps1') + $ArrayWhen = @('auto', 'never', 'always') + $ArrayYesNo = @('never', 'always') + $ArrayWrap = @('always', 'never', 'character') + $ArrayBinary = @('no-printing', 'as-text') + $ArrayPrint = @('unicode', 'caret') + + function Get-MyThemes(){ + $themes = bat --list-themes | ForEach-Object {$_ -replace "^(.*)$", '''$1'''} | select-object + return $themes + } + + function Get-MyLanguages(){ + $themes = bat --list-languages | ForEach-Object{[pscustomobject]@{MyParameter=$_.Substring(0,$_.IndexOf(":")).Trim();MyDescription=$_.Substring($_.IndexOf(":")+1)}} | select-object + return $themes + } + + $commandElements = $commandAst.CommandElements $command = @( - '{{PROJECT_EXECUTABLE}}' + 'bat' for ($i = 1; $i -lt $commandElements.Count; $i++) { $element = $commandElements[$i] if ($element -isnot [StringConstantExpressionAst] -or $element.StringConstantType -ne [StringConstantType]::BareWord -or - $element.Value.StartsWith('-')) { + $element.Value -eq $wordToComplete) { + #-or $element.Value.StartsWith('-') break } $element.Value }) -join ';' - $completions = @(switch ($command) { - '{{PROJECT_EXECUTABLE}}' { - [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.') - [CompletionResult]::new('--language', 'language', [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.') - [CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Highlight lines N through M.') - [CompletionResult]::new('--highlight-line', 'highlight-line', [CompletionResultType]::ParameterName, 'Highlight lines N through M.') - [CompletionResult]::new('--file-name', 'file-name', [CompletionResultType]::ParameterName, 'Specify the name to display for a file.') - [CompletionResult]::new('--diff-context', 'diff-context', [CompletionResultType]::ParameterName, 'diff-context') - [CompletionResult]::new('--tabs', 'tabs', [CompletionResultType]::ParameterName, 'Set the tab width to T spaces.') - [CompletionResult]::new('--wrap', 'wrap', [CompletionResultType]::ParameterName, 'Specify the text-wrapping mode (*auto*, never, character).') - [CompletionResult]::new('--terminal-width', 'terminal-width', [CompletionResultType]::ParameterName, 'Explicitly set the width of the terminal instead of determining it automatically. If prefixed with ''+'' or ''-'', the value will be treated as an offset to the actual terminal width. See also: ''--wrap''.') - [CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'When to use colors (*auto*, never, always).') - [CompletionResult]::new('--italic-text', 'italic-text', [CompletionResultType]::ParameterName, 'Use italics in output (always, *never*)') - [CompletionResult]::new('--decorations', 'decorations', [CompletionResultType]::ParameterName, 'When to show the decorations (*auto*, never, always).') - [CompletionResult]::new('--paging', 'paging', [CompletionResultType]::ParameterName, 'Specify when to use the pager, or use `-P` to disable (*auto*, never, always).') - [CompletionResult]::new('--pager', 'pager', [CompletionResultType]::ParameterName, 'Determine which pager to use.') - [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').') - [CompletionResult]::new('--map-syntax', 'map-syntax', [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').') - [CompletionResult]::new('--theme', 'theme', [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting.') - [CompletionResult]::new('--theme-dark', 'theme', [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting for dark backgrounds.') - [CompletionResult]::new('--theme-light', 'theme', [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting for light backgrounds.') - [CompletionResult]::new('--style', 'style', [CompletionResultType]::ParameterName, 'Comma-separated list of style elements to display (*default*, auto, full, plain, changes, header, header-filename, header-filesize, grid, rule, numbers, snip).') - [CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'Only print the lines from N to M.') - [CompletionResult]::new('--line-range', 'line-range', [CompletionResultType]::ParameterName, 'Only print the lines from N to M.') - [CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).') - [CompletionResult]::new('--show-all', 'show-all', [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).') - [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').') - [CompletionResult]::new('--plain', 'plain', [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').') - [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.') - [CompletionResult]::new('--diff', 'diff', [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.') - [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').') - [CompletionResult]::new('--number', 'number', [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').') - [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'f') - [CompletionResult]::new('--force-colorization', 'force-colorization', [CompletionResultType]::ParameterName, 'force-colorization') - [CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''') - [CompletionResult]::new('--no-paging', 'no-paging', [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''') - [CompletionResult]::new('--list-themes', 'list-themes', [CompletionResultType]::ParameterName, 'Display all supported highlighting themes.') - [CompletionResult]::new('-L', 'L', [CompletionResultType]::ParameterName, 'Display all supported languages.') - [CompletionResult]::new('--list-languages', 'list-languages', [CompletionResultType]::ParameterName, 'Display all supported languages.') - [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'u') - [CompletionResult]::new('--unbuffered', 'unbuffered', [CompletionResultType]::ParameterName, 'unbuffered') - [CompletionResult]::new('--no-config', 'no-config', [CompletionResultType]::ParameterName, 'Do not use the configuration file') - [CompletionResult]::new('--no-custom-assets', 'no-custom-assets', [CompletionResultType]::ParameterName, 'Do not load custom assets') - [CompletionResult]::new('--lessopen', 'lessopen', [CompletionResultType]::ParameterName, 'Enable the $LESSOPEN preprocessor') - [CompletionResult]::new('--no-lessopen', 'no-lessopen', [CompletionResultType]::ParameterName, 'Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)') - [CompletionResult]::new('--config-file', 'config-file', [CompletionResultType]::ParameterName, 'Show path to the configuration file.') - [CompletionResult]::new('--generate-config-file', 'generate-config-file', [CompletionResultType]::ParameterName, 'Generates a default configuration file.') - [CompletionResult]::new('--config-dir', 'config-dir', [CompletionResultType]::ParameterName, 'Show bat''s configuration directory.') - [CompletionResult]::new('--cache-dir', 'cache-dir', [CompletionResultType]::ParameterName, 'Show bat''s cache directory.') - [CompletionResult]::new('--diagnostic', 'diagnostic', [CompletionResultType]::ParameterName, 'Show diagnostic information for bug reports.') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print this help message.') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print this help message.') - [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Show version information.') - [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Show version information.') - ## Completion of the 'cache' command itself is removed for better UX - ## See https://github.com/sharkdp/bat/issues/2085#issuecomment-1271646802 + $completions = @(switch -Wildcard ($command) { + '*;--help' { break } - '{{PROJECT_EXECUTABLE}};cache' { - [CompletionResult]::new('--source', 'source', [CompletionResultType]::ParameterName, 'Use a different directory to load syntaxes and themes from.') - [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'Use a different directory to store the cached syntax and theme set.') - [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.') - [CompletionResult]::new('--build', 'build', [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.') - [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.') - [CompletionResult]::new('--clear', 'clear', [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.') - [CompletionResult]::new('--blank', 'blank', [CompletionResultType]::ParameterName, 'Create completely new syntax and theme sets (instead of appending to the default sets).') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') - [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') - [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + '*;--version' { + break + } + '*;--acknowledgements' { + break + }'*;--language' { + Get-MyLanguages | + ForEach-Object {[CompletionResult]::new(($_.MyParameter -replace "^(.*)$", '''$1'''), $_.MyParameter, [CompletionResultType]::ParameterName, $_.MyDescription ?? '_no value_')} + break + } + '*;--theme' { + Get-MyThemes | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterName, $_)} + break + } + '*;--binary' { + $ArrayBinary | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + }'*;--style' { + $ArrayStyle | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--wrap' { + $ArrayWrap | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--color' { + $ArrayStyle | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--italic-text' { + $ArrayYesNo | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--paging' { + $ArrayWhen | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--decorations' { + $ArrayWhen | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--completion' { + $ArrayCompletion | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--strip-ansi' { + $ArrayWhen | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--nonprintable-notation' { + $ArrayPrint | + ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} + break + } + '*;--generate-config-file' { + break + } + 'bat;cache' { + [CompletionResult]::new('--source' , 'source' , [CompletionResultType]::ParameterName, 'Use a different directory to load syntaxes and themes from.') + [CompletionResult]::new('--target' , 'target' , [CompletionResultType]::ParameterName, 'Use a different directory to store the cached syntax and theme set.') + # [CompletionResult]::new('-b' , 'b' , [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.') + [CompletionResult]::new('--build' , 'build' , [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.') + # [CompletionResult]::new('-c' , 'c' , [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.') + [CompletionResult]::new('--clear' , 'clear' , [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.') + [CompletionResult]::new('--blank' , 'blank' , [CompletionResultType]::ParameterName, 'Create completely new syntax and theme sets (instead of appending to the default sets).') + # [CompletionResult]::new('-h' , 'h' , [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help' , 'help' , [CompletionResultType]::ParameterName, 'Prints help information') + # [CompletionResult]::new('-V' , 'V' , [CompletionResultType]::ParameterName, 'Prints version information') + # [CompletionResult]::new('--version' , 'version' , [CompletionResultType]::ParameterName, 'Prints version information') + break + } + default { + # [CompletionResult]::new('-l' , 'l' , [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.') + [CompletionResult]::new('--language' , 'language' , [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.') + # [CompletionResult]::new('-H' , 'H' , [CompletionResultType]::ParameterName, 'Highlight lines N through M.') + [CompletionResult]::new('--highlight-line' , 'highlight-line' , [CompletionResultType]::ParameterName, 'Highlight lines N through M.') + [CompletionResult]::new('--file-name' , 'file-name' , [CompletionResultType]::ParameterName, 'Specify the name to display for a file.') + [CompletionResult]::new('--diff-context' , 'diff-context' , [CompletionResultType]::ParameterName, 'diff-context') + [CompletionResult]::new('--tabs' , 'tabs' , [CompletionResultType]::ParameterName, 'Set the tab width to T spaces.') + [CompletionResult]::new('--wrap' , 'wrap' , [CompletionResultType]::ParameterName, 'Specify the text-wrapping mode (*auto*, character).') + [CompletionResult]::new('--terminal-width' , 'terminal-width' , [CompletionResultType]::ParameterName, 'Explicitly set the width of the terminal instead of determining it automatically. If prefixed with ''+'' or ''-'', the value will be treated as an offset to the actual terminal width. See also: ''--wrap''.') + [CompletionResult]::new('--color' , 'color' , [CompletionResultType]::ParameterName, 'When to use colors (*auto*, never, always).') + [CompletionResult]::new('--italic-text' , 'italic-text' , [CompletionResultType]::ParameterName, 'Use italics in output (always, *never*)') + [CompletionResult]::new('--decorations' , 'decorations' , [CompletionResultType]::ParameterName, 'When to show the decorations (*auto*, never, always).') + [CompletionResult]::new('--paging' , 'paging' , [CompletionResultType]::ParameterName, 'Specify when to use the pager, or use ''-P'' to disable (*auto*, never, always).') + [CompletionResult]::new('--pager' , 'pager' , [CompletionResultType]::ParameterName, 'Determine which pager to use.') + # [CompletionResult]::new('-m' , 'm' , [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').') + [CompletionResult]::new('--map-syntax' , 'map-syntax' , [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').') + [CompletionResult]::new('--theme' , 'theme' , [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting.') + [CompletionResult]::new('--theme-dark' , 'themedark' , [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting for dark backgrounds.') + [CompletionResult]::new('--theme-light' , 'themelight' , [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting for light backgrounds.') + [CompletionResult]::new('--style' , 'style' , [CompletionResultType]::ParameterName, 'Comma-separated list of style elements to display (*default*, auto, full, plain, changes, header, header-filename, header-filesize, grid, rule, numbers, snip).') + # [CompletionResult]::new('-r' , 'r' , [CompletionResultType]::ParameterName, 'Only print the lines from N to M.') + [CompletionResult]::new('--line-range' , 'line-range' , [CompletionResultType]::ParameterName, 'Only print the lines from N to M.') + # [CompletionResult]::new('-A' , 'A' , [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).') + [CompletionResult]::new('--show-all' , 'show-all' , [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).') + [CompletionResult]::new('--nonprintable-notation' , 'nonprintable-notation' , [CompletionResultType]::ParameterName, 'Set notation for non-printable characters. (unicode, caret)') + [CompletionResult]::new('--chop-long-lines' , 'chop-long-lines' , [CompletionResultType]::ParameterName, 'Truncate all lines longer than screen width. Alias for ''--wrap=never''.') + [CompletionResult]::new('--binary' , 'binary' , [CompletionResultType]::ParameterName, 'How to treat binary content. (*no-printing*, as-text)') + [CompletionResult]::new('--ignored-suffix' , 'ignored-suffix' , [CompletionResultType]::ParameterName, 'Ignore extension. For example: ''bat --ignored-suffix ".dev" my_file.json.dev'' will use JSON syntax, and ignore ''.dev''') + [CompletionResult]::new('--squeeze-blank' , 'squeeze-blank' , [CompletionResultType]::ParameterName, 'Squeeze consecutive empty lines into a single empty line.') + [CompletionResult]::new('--squeeze-limit' , 'squeeze-limit' , [CompletionResultType]::ParameterName, 'Set the maximum number of consecutive empty lines to be printed.') + [CompletionResult]::new('--strip-ansi' , 'strip-ansi' , [CompletionResultType]::ParameterName, 'Specify when to strip ANSI escape sequences from the input. The automatic mode will remove escape sequences unless the syntax highlighting language is plain text. (auto, always, *never*).') + # [CompletionResult]::new('-p' , 'p' , [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').') + [CompletionResult]::new('--plain' , 'plain' , [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').') + # [CompletionResult]::new('-d' , 'd' , [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.') + [CompletionResult]::new('--diff' , 'diff' , [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.') + # [CompletionResult]::new('-n' , 'n' , [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').') + [CompletionResult]::new('--number' , 'number' , [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').') + # [CompletionResult]::new('-f' , 'f' , [CompletionResultType]::ParameterName, 'f') + [CompletionResult]::new('--force-colorization' , 'force-colorization' , [CompletionResultType]::ParameterName, 'force-colorization') + # [CompletionResult]::new('-P' , 'P' , [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''') + [CompletionResult]::new('--no-paging' , 'no-paging' , [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''') + [CompletionResult]::new('--list-themes' , 'list-themes' , [CompletionResultType]::ParameterName, 'Display all supported highlighting themes.') + # [CompletionResult]::new('-L' , 'L' , [CompletionResultType]::ParameterName, 'Display all supported languages.') + [CompletionResult]::new('--list-languages' , 'list-languages' , [CompletionResultType]::ParameterName, 'Display all supported languages.') + # [CompletionResult]::new('-u' , 'u' , [CompletionResultType]::ParameterName, 'u') + [CompletionResult]::new('--unbuffered' , 'unbuffered' , [CompletionResultType]::ParameterName, 'unbuffered') + [CompletionResult]::new('--completion' , 'completion' , [CompletionResultType]::ParameterName, 'Show shell completion for a certain shell. [possible values: bash, fish, zsh, ps1]') + [CompletionResult]::new('--no-config' , 'no-config' , [CompletionResultType]::ParameterName, 'Do not use the configuration file') + [CompletionResult]::new('--no-custom-assets' , 'no-custom-assets' , [CompletionResultType]::ParameterName, 'Do not load custom assets') + [CompletionResult]::new('--lessopen' , 'lessopen' , [CompletionResultType]::ParameterName, 'Enable the $LESSOPEN preprocessor') + [CompletionResult]::new('--no-lessopen' , 'no-lessopen' , [CompletionResultType]::ParameterName, 'Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)') + [CompletionResult]::new('--config-file' , 'config-file' , [CompletionResultType]::ParameterName, 'Show path to the configuration file.') + [CompletionResult]::new('--generate-config-file' , 'generate-config-file' , [CompletionResultType]::ParameterName, 'Generates a default configuration file.') + [CompletionResult]::new('--config-dir' , 'config-dir' , [CompletionResultType]::ParameterName, 'Show bat''s configuration directory.') + [CompletionResult]::new('--cache-dir' , 'cache-dir' , [CompletionResultType]::ParameterName, 'Show bat''s cache directory.') + [CompletionResult]::new('--acknowledgements' , 'acknowledgements' , [CompletionResultType]::ParameterName, 'Show acknowledgements.') + [CompletionResult]::new('--set-terminal-title' , 'set-terminal-title' , [CompletionResultType]::ParameterName, 'Sets terminal title to filenames when using a pager.') + [CompletionResult]::new('--diagnostic' , 'diagnostic' , [CompletionResultType]::ParameterName, 'Show diagnostic information for bug reports.') + # [CompletionResult]::new('-h' , 'h' , [CompletionResultType]::ParameterName, 'Print this help message.') + [CompletionResult]::new('--help' , 'help' , [CompletionResultType]::ParameterName, 'Print this help message.') + # [CompletionResult]::new('-V' , 'V' , [CompletionResultType]::ParameterName, 'Show version information.') + [CompletionResult]::new('--version' , 'version' , [CompletionResultType]::ParameterName, 'Show version information.') break } }) $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | - Sort-Object -Property ListItemText + Sort-Object -Property CompletionText } From 7e436e307d6c9c11f3c04ac567cfbbf90e60e4da Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 21:11:32 +0200 Subject: [PATCH 16/27] Update assets/completions/_bat.ps1.in changed back to Template Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- assets/completions/_bat.ps1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index b1f4a87f..d6c27c3e 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -2,7 +2,7 @@ using namespace System.Management.Automation using namespace System.Management.Automation.Language -Register-ArgumentCompleter -Native -CommandName 'bat' -ScriptBlock { +Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -ScriptBlock { param($wordToComplete, $commandAst, $cursorPosition) $ArrayStyle = @('default', 'auto', 'full', 'plain', 'changes', 'header', 'header-filename', 'header-filesize', 'grid', 'rule', 'numbers', 'snip') From 43c5fef70ad68919838c7f41210cb64ea9ed2cf9 Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 21:13:15 +0200 Subject: [PATCH 17/27] Update assets/completions/_bat.ps1.in Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- assets/completions/_bat.ps1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index d6c27c3e..a5608951 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -61,7 +61,7 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script $ArrayBinary | ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} break - }'*;--style' { + } '*;--style' { $ArrayStyle | ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} break From 4363ddf0fbc860bfe58fc0f28b209859b9f09023 Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 21:13:24 +0200 Subject: [PATCH 18/27] Update assets/completions/_bat.ps1.in Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- assets/completions/_bat.ps1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index a5608951..159374f9 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -47,7 +47,7 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script } '*;--acknowledgements' { break - }'*;--language' { + } '*;--language' { Get-MyLanguages | ForEach-Object {[CompletionResult]::new(($_.MyParameter -replace "^(.*)$", '''$1'''), $_.MyParameter, [CompletionResultType]::ParameterName, $_.MyDescription ?? '_no value_')} break From 0238473868de920cb150218e1da336f13a8e4169 Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 21:16:01 +0200 Subject: [PATCH 19/27] Update assets/completions/_bat.ps1.in Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- assets/completions/_bat.ps1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index 159374f9..1143b419 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -72,7 +72,7 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script break } '*;--color' { - $ArrayStyle | + $ArrayWhen | ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} break } From d4fc07a347293a3d645b972efb91f26e1fad13f4 Mon Sep 17 00:00:00 2001 From: deflektor Date: Sun, 3 Aug 2025 21:25:12 +0200 Subject: [PATCH 20/27] Update _bat.ps1.in --- assets/completions/_bat.ps1.in | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/assets/completions/_bat.ps1.in b/assets/completions/_bat.ps1.in index 1143b419..7061b9db 100644 --- a/assets/completions/_bat.ps1.in +++ b/assets/completions/_bat.ps1.in @@ -14,25 +14,24 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script $ArrayPrint = @('unicode', 'caret') function Get-MyThemes(){ - $themes = bat --list-themes | ForEach-Object {$_ -replace "^(.*)$", '''$1'''} | select-object + $themes = {{PROJECT_EXECUTABLE}} --list-themes | ForEach-Object {$_ -replace "^(.*)$", '''$1'''} | select-object return $themes } function Get-MyLanguages(){ - $themes = bat --list-languages | ForEach-Object{[pscustomobject]@{MyParameter=$_.Substring(0,$_.IndexOf(":")).Trim();MyDescription=$_.Substring($_.IndexOf(":")+1)}} | select-object + $themes = {{PROJECT_EXECUTABLE}} --list-languages | ForEach-Object{[pscustomobject]@{MyParameter=$_.Substring(0,$_.IndexOf(":")).Trim();MyDescription=$_.Substring($_.IndexOf(":")+1)}} | select-object return $themes } - $commandElements = $commandAst.CommandElements $command = @( - 'bat' + '{{PROJECT_EXECUTABLE}}' for ($i = 1; $i -lt $commandElements.Count; $i++) { $element = $commandElements[$i] if ($element -isnot [StringConstantExpressionAst] -or $element.StringConstantType -ne [StringConstantType]::BareWord -or + #$element.Value.StartsWith('-') -or $element.Value -eq $wordToComplete) { - #-or $element.Value.StartsWith('-') break } $element.Value @@ -47,7 +46,8 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script } '*;--acknowledgements' { break - } '*;--language' { + } + '*;--language' { Get-MyLanguages | ForEach-Object {[CompletionResult]::new(($_.MyParameter -replace "^(.*)$", '''$1'''), $_.MyParameter, [CompletionResultType]::ParameterName, $_.MyDescription ?? '_no value_')} break @@ -61,7 +61,8 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script $ArrayBinary | ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} break - } '*;--style' { + } + '*;--style' { $ArrayStyle | ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, [CompletionResultType]::ParameterValue, $_)} break @@ -109,7 +110,7 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script '*;--generate-config-file' { break } - 'bat;cache' { + '{{PROJECT_EXECUTABLE}};cache' { [CompletionResult]::new('--source' , 'source' , [CompletionResultType]::ParameterName, 'Use a different directory to load syntaxes and themes from.') [CompletionResult]::new('--target' , 'target' , [CompletionResultType]::ParameterName, 'Use a different directory to store the cached syntax and theme set.') # [CompletionResult]::new('-b' , 'b' , [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.') From c25e005c8796b769cf46577de71ffe10ab648d01 Mon Sep 17 00:00:00 2001 From: Keith Hall <11882719+keith-hall@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:48:07 +0200 Subject: [PATCH 21/27] Add missing command line switches to manpage - `--binary` - `--completion` - `--strip-ansi` --- assets/manual/bat.1.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/assets/manual/bat.1.in b/assets/manual/bat.1.in index 84608c15..86923db7 100644 --- a/assets/manual/bat.1.in +++ b/assets/manual/bat.1.in @@ -37,6 +37,23 @@ Use character sequences like ^G, ^J, ^@, .. to identify non-printable characters Use special Unicode code points to identify non-printable characters .RE .HP +\fB\-\-binary\fR +.IP +How to treat binary content. + +Possible values: +.RS +.IP "no\-printing" +Do not print any binary content (default) +.IP "as\-text" +Treat binary content as normal text +.RE +.HP +\fB\-\-completion\fR +.IP +Show shell completion for a certain shell. +Possible values: bash, fish, zsh, ps1 +.HP \fB\-p\fR, \fB\-\-plain\fR .IP Only show plain style, no decorations. This is an alias for @@ -197,6 +214,12 @@ Squeeze consecutive empty lines into a single empty line. .IP Set the maximum number of consecutive empty lines to be printed. .HP +\fB\-\-strip\-ansi\fR +.IP +Specify when to strip ANSI escape sequences from the input. The automatic mode will remove +escape sequences unless the syntax highlighting language is plain text. Possible values: +auto, always, *never*. +.HP \fB\-\-style\fR .IP Configure which elements (line numbers, file headers, grid borders, Git modifications, From a8d610c6e84f7f78957e626f07e261ebf8dd719c Mon Sep 17 00:00:00 2001 From: Binbin Qian Date: Tue, 5 Aug 2025 23:54:27 +0800 Subject: [PATCH 22/27] Make MANPAGER more portable --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5ffd50c..8bcd6d46 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ bat main.cpp | xclip `MANPAGER` environment variable: ```bash -export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'" +export MANPAGER="sh -c 'awk '\''{ gsub(/\x1B\[[0-9;]*m/, \"\", \$0); gsub(/.\x08/, \"\", \$0); print }'\'' | bat -p -lman'" man 2 select ``` (replace `bat` with `batcat` if you are on Debian or Ubuntu) From 466087156f3de81f4e7eb68047b44e986d7d3e50 Mon Sep 17 00:00:00 2001 From: Binbin Qian Date: Wed, 6 Aug 2025 00:20:49 +0800 Subject: [PATCH 23/27] Update `man` usage for Chinese docs --- doc/README-zh.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/README-zh.md b/doc/README-zh.md index 91fd929b..586a4856 100644 --- a/doc/README-zh.md +++ b/doc/README-zh.md @@ -170,20 +170,23 @@ bat main.cpp | xclip #### `man` -`bat`也能给`man`的输出上色。这需要设置`MANPAGER`环境变量: +`bat` 可以通过设置 `MANPAGER` 环境变量,用作 `man` 的彩色分页器: ```bash -export MANPAGER="sh -c 'col -bx | bat -l man -p'" +export MANPAGER="sh -c 'awk '\''{ gsub(/\x1B\[[0-9;]*m/, \"\", \$0); gsub(/.\x08/, \"\", \$0); print }'\'' | bat -p -lman'" man 2 select ``` -(如果你使用的是 Debian 或者 Ubuntu,使用`batcat`替换`bat`) +(如果你使用 Debian 或 Ubuntu,请将 `batcat` 替换为 `bat`) -如果你遇到格式化问题,设置`MANROFFOPT="-c"`也许会有帮助。 +如果你希望将其打包为一个新的命令,也可以使用 [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md)。 -`batman`能提供类似功能——作为一个独立的命令。 +> [!WARNING] +> 在使用 Mandoc 的 `man` 实现时,这[无法](https://github.com/sharkdp/bat/issues/1145)直接工作。 +> +> 请使用 `batman`,或将此 Shell 脚本包装为 [Shebang 可执行文件](https://en.wikipedia.org/wiki/Shebang_(Unix)),并将 `MANPAGER` 指向该文件。 -注意:[man page 语法](assets/syntaxes/02_Extra/Manpage.sublime-syntax) 还需要完善。在使用特定的`man`实现时该功能[无法正常工作](https://github.com/sharkdp/bat/issues/1145)。 +注意,[Manpage 语法](assets/syntaxes/02_Extra/Manpage.sublime-syntax)是在此仓库中开发的,仍需一些改进。 #### `prettier` / `shfmt` / `rustfmt` From 77cfca1aff8bc28db60350497610a49b71e6c9d1 Mon Sep 17 00:00:00 2001 From: Nicholas Schwab Date: Sun, 10 Aug 2025 17:37:56 +0200 Subject: [PATCH 24/27] update gruvbox theme This fixes https://github.com/sharkdp/bat/issues/2115 for this theme --- assets/themes/gruvbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/gruvbox b/assets/themes/gruvbox index 64c47250..40503472 160000 --- a/assets/themes/gruvbox +++ b/assets/themes/gruvbox @@ -1 +1 @@ -Subproject commit 64c47250e54298b91e2cf8d401320009aba9f991 +Subproject commit 40503472826e51d87666e548a0634c4f1d74938c From 183def9569eebfcac23750640932a139cd57c928 Mon Sep 17 00:00:00 2001 From: Nicholas Schwab Date: Sun, 10 Aug 2025 17:52:30 +0200 Subject: [PATCH 25/27] docs(changelog): update gruvbox theme --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 152b7d34..8f3ab03a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - Add Catppuccin, see #3317 (@SchweGELBin) - Updated Catppuccin, see #3333 (@SchweGELBin) +- Updated gruvbox, see #3372 (@Nicholas42) ## `bat` as a library From 1a931224ebcd2d206b8eae8b679c9631d3603409 Mon Sep 17 00:00:00 2001 From: wcampbell Date: Wed, 13 Aug 2025 00:09:31 -0400 Subject: [PATCH 26/27] Add x86_64 Assembly to x86 sublime syntax file * Using ARM Assembly with the bat library works with .language("ARM Assembly"), while x86 has no name. Add name to sublime syntax file. --- assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax b/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax index 1d91df82..7d89eda1 100644 --- a/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax +++ b/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax @@ -1,5 +1,6 @@ %YAML 1.2 --- +name: x86_64 Assembly file_extensions: [yasm, nasm, asm, inc, mac] scope: source.asm.x86_64 @@ -1364,4 +1365,4 @@ contexts: scope: invalid.keyword.operator.word.mnemonic.sse5.packed-arithmetic - match: '(?i)\b(pcmov|permp[ds]|pperm|prot[bdqw]|psh[al][bdqw])\b' scope: invalid.keyword.operator.word.mnemonic.sse5.simd-integer -... \ No newline at end of file +... From 7fc3d6b58880d3b44554bb35a36c0a1a8c935500 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Wed, 13 Aug 2025 09:34:59 +0300 Subject: [PATCH 27/27] Update assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax --- assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax b/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax index 7d89eda1..6aa8150c 100644 --- a/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax +++ b/assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax @@ -1365,4 +1365,3 @@ contexts: scope: invalid.keyword.operator.word.mnemonic.sse5.packed-arithmetic - match: '(?i)\b(pcmov|permp[ds]|pperm|prot[bdqw]|psh[al][bdqw])\b' scope: invalid.keyword.operator.word.mnemonic.sse5.simd-integer -...