From e3bc41dbe67c964c1d35ab1c127b28991ae19772 Mon Sep 17 00:00:00 2001 From: Ethan P Date: Mon, 5 Oct 2020 15:28:23 -0700 Subject: [PATCH 01/35] Add option to specify bat target in run-benchmarks.sh --- tests/benchmarks/run-benchmarks.sh | 32 ++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/tests/benchmarks/run-benchmarks.sh b/tests/benchmarks/run-benchmarks.sh index c3a15509..3e0da33d 100755 --- a/tests/benchmarks/run-benchmarks.sh +++ b/tests/benchmarks/run-benchmarks.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - cd "$(dirname "${BASH_SOURCE[0]}")" if ! which hyperfine > /dev/null 2>&1; then @@ -8,21 +7,46 @@ if ! which hyperfine > /dev/null 2>&1; then exit 1 fi +BAT='' +for arg in "$@"; do + case "$arg" in + --system) BAT="bat" ;; + --debug) BAT="../../target/debug/bat" ;; + --release) BAT="../../target/release/bat" ;; + esac +done + +if [[ -z "$BAT" ]]; then + echo "A build of 'bat' must be specified for benchmarking." + echo "You can use '--system', '--debug', or '--release'." + exit 1 +fi + +if ! command -v "$BAT" &>/dev/null; then + echo "Could not find the build of bat to benchmark." + case "$BAT" in + "bat") echo "Make you sure to symlink 'batcat' as 'bat'." ;; + "../../target/debug/debug") echo "Make you sure to 'cargo build' first." ;; + "../../target/debug/release") echo "Make you sure to 'cargo build --release' first." ;; + esac + exit 1 +fi + echo "### Startup time" echo -hyperfine --warmup 3 bat +hyperfine --warmup 3 "$BAT" echo echo "### Plain text" echo -hyperfine --warmup 3 "bat --language txt --paging=never 'test-src/jquery-3.3.1.js'" +hyperfine --warmup 3 "$(printf "%q" "$BAT") --language txt --paging=never 'test-src/jquery-3.3.1.js'" echo echo "### Time to syntax-highlight large files" echo for SRC in test-src/*; do - hyperfine --warmup 3 "bat --style=full --color=always --paging=never '$SRC'" + hyperfine --warmup 3 "$(printf "%q" "$BAT") --style=full --color=always --paging=never $(printf "%q" "$SRC")" done From e26ec314638ffbdfdd66d43403f965a59e3ffc5d Mon Sep 17 00:00:00 2001 From: Ethan P Date: Mon, 5 Oct 2020 15:42:00 -0700 Subject: [PATCH 02/35] Add option to specify exact binary in run-benchmarks.sh --- tests/benchmarks/run-benchmarks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/benchmarks/run-benchmarks.sh b/tests/benchmarks/run-benchmarks.sh index 3e0da33d..d36571a5 100755 --- a/tests/benchmarks/run-benchmarks.sh +++ b/tests/benchmarks/run-benchmarks.sh @@ -13,6 +13,7 @@ for arg in "$@"; do --system) BAT="bat" ;; --debug) BAT="../../target/debug/bat" ;; --release) BAT="../../target/release/bat" ;; + --bat=*) BAT="${arg:6}" ;; esac done From 6d0e7650c3192b60a5f5bc90b67d652b8cd89842 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Tue, 29 Dec 2020 08:34:44 +0100 Subject: [PATCH 03/35] Add .resource extension for Robot Framework --- CHANGELOG.md | 2 ++ assets/syntaxes/02_Extra/Robot.sublime-syntax | 1 + doc/assets.md | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43ef8493..8cdcdd7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ ## Syntaxes +- Added `.resource` extension for Robot Framework files, see #1386 + ## New themes - `ansi` replaces `ansi-dark` and `ansi-light`, see #1104 and #1412 (@mk12) diff --git a/assets/syntaxes/02_Extra/Robot.sublime-syntax b/assets/syntaxes/02_Extra/Robot.sublime-syntax index 6805c2bb..1a554651 100644 --- a/assets/syntaxes/02_Extra/Robot.sublime-syntax +++ b/assets/syntaxes/02_Extra/Robot.sublime-syntax @@ -4,6 +4,7 @@ name: Robot Framework file_extensions: - robot + - resource scope: source.robot contexts: main: diff --git a/doc/assets.md b/doc/assets.md index 170bdc51..3d87ac00 100644 --- a/doc/assets.md +++ b/doc/assets.md @@ -44,7 +44,7 @@ The following files have been manually modified after converting from a `.tmLang * `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types and support for comments after section headers * `Org mode.sublime-syntax` => removed `task` file type. * `SML.sublime_syntax` => removed `ml` file type. -* `Robot.sublime_syntax` => changed name to "Robot Framework" +* `Robot.sublime_syntax` => changed name to "Robot Framework", added `.resource` extension ### Non-submodule additions From 3ed0081f1fb4b707af026fcf1789909114487975 Mon Sep 17 00:00:00 2001 From: Ethan P Date: Tue, 29 Dec 2020 15:07:22 -0800 Subject: [PATCH 04/35] Improve benchmark script to support cargo/config target-dir --- tests/benchmarks/run-benchmarks.sh | 33 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/tests/benchmarks/run-benchmarks.sh b/tests/benchmarks/run-benchmarks.sh index d36571a5..c7f96b4a 100755 --- a/tests/benchmarks/run-benchmarks.sh +++ b/tests/benchmarks/run-benchmarks.sh @@ -1,18 +1,35 @@ #!/usr/bin/env bash cd "$(dirname "${BASH_SOURCE[0]}")" +# Check that Hyperfine is installed. if ! which hyperfine > /dev/null 2>&1; then - echo "'hyperfine' does not seem to be installed." - echo "You can get it here: https://github.com/sharkdp/hyperfine" + echo "'hyperfine' does not seem to be installed." 1>&2 + echo "You can get it here: https://github.com/sharkdp/hyperfine" 1>&2 exit 1 fi +# Determine the target directories. +get_target_dir() { + if [[ -f "$HOME/.cargo/config" ]]; then + grep 'target-dir[[:space:]]*=' "$HOME/.cargo/config" \ + | sed 's/^[[:space:]]*target-dir[[:space:]]*=//; s/^[[:space:]]*"//; s/"[[:space:]]*$//' \ + && return 0 + fi + + echo "../../target" +} + +TARGET_DIR="$(get_target_dir)" +TARGET_DEBUG="${TARGET_DIR}/debug/bat" +TARGET_RELEASE="${TARGET_DIR}/release/bat" + +# Determine which target to benchmark. BAT='' for arg in "$@"; do case "$arg" in --system) BAT="bat" ;; - --debug) BAT="../../target/debug/bat" ;; - --release) BAT="../../target/release/bat" ;; + --debug) BAT="$TARGET_DEBUG" ;; + --release) BAT="$TARGET_RELEASE" ;; --bat=*) BAT="${arg:6}" ;; esac done @@ -23,16 +40,18 @@ if [[ -z "$BAT" ]]; then exit 1 fi +# Ensure that the target is built. if ! command -v "$BAT" &>/dev/null; then echo "Could not find the build of bat to benchmark." case "$BAT" in - "bat") echo "Make you sure to symlink 'batcat' as 'bat'." ;; - "../../target/debug/debug") echo "Make you sure to 'cargo build' first." ;; - "../../target/debug/release") echo "Make you sure to 'cargo build --release' first." ;; + "bat") echo "Make you sure to symlink 'batcat' as 'bat'." ;; + "$TARGET_DEBUG") echo "Make you sure to 'cargo build' first." ;; + "$TARGET_RELEASE") echo "Make you sure to 'cargo build --release' first." ;; esac exit 1 fi +# Run the benchmark. echo "### Startup time" echo From c0d945c0acbd6dd75971f6ee04a8b294471ead7f Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 28 Dec 2020 12:51:56 +0100 Subject: [PATCH 05/35] Allow clippy::style lints Turns out GitHub is clever enough to pick up clippy warnings from us just running it, and showing them in PRs under a "Unchanged files with check annotations (beta)" header. The only warnings currently shown are style warnings, and we agreed we don't want to risk putting off contributors over style issues. So explicitly allow (don't warn in the logs for) this category of clippy lints. This means that the only clippy categories left that prints warnings (Warn) are: clippy::complexity clippy::perf And the only category of lints that fails the CI build (Deny) remains to be: clippy::correctness See https://rust-lang.github.io/rust-clippy/master/index.html for a catalog of all lints. --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 7a141412..66fb7c76 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -27,7 +27,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --all-targets --all-features + args: --all-targets --all-features -- --allow clippy::style - name: Test uses: actions-rs/cargo@v1 with: From aab35e3faac53cc52a3783c11cec08a09fc92a35 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:33:25 +0000 Subject: [PATCH 06/35] Bump assets/themes/dracula-sublime from `26c57ec` to `c2de0ac` Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `26c57ec` to `c2de0ac`. - [Release notes](https://github.com/dracula/sublime/releases) - [Commits](https://github.com/dracula/sublime/compare/26c57ec282abcaa76e57e055f38432bd827ac34e...c2de0acf5af67042393cf70de68013153c043656) Signed-off-by: dependabot-preview[bot] --- assets/themes/dracula-sublime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/dracula-sublime b/assets/themes/dracula-sublime index 26c57ec2..c2de0acf 160000 --- a/assets/themes/dracula-sublime +++ b/assets/themes/dracula-sublime @@ -1 +1 @@ -Subproject commit 26c57ec282abcaa76e57e055f38432bd827ac34e +Subproject commit c2de0acf5af67042393cf70de68013153c043656 From 00ff54be4e0c853ef9591bc26da605e25f4ff951 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:33:49 +0000 Subject: [PATCH 07/35] Bump assets/syntaxes/02_Extra/SCSS_Sass from `bc6332c` to `4868322` Bumps [assets/syntaxes/02_Extra/SCSS_Sass](https://github.com/braver/SublimeSass) from `bc6332c` to `4868322`. - [Release notes](https://github.com/braver/SublimeSass/releases) - [Commits](https://github.com/braver/SublimeSass/compare/bc6332c1be2c5590d334a2a58d3b83a8d07ac7ef...4868322030c3644d6b8cfff68c85849789d9bdb2) Signed-off-by: dependabot-preview[bot] --- assets/syntaxes/02_Extra/SCSS_Sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/SCSS_Sass b/assets/syntaxes/02_Extra/SCSS_Sass index bc6332c1..48683220 160000 --- a/assets/syntaxes/02_Extra/SCSS_Sass +++ b/assets/syntaxes/02_Extra/SCSS_Sass @@ -1 +1 @@ -Subproject commit bc6332c1be2c5590d334a2a58d3b83a8d07ac7ef +Subproject commit 4868322030c3644d6b8cfff68c85849789d9bdb2 From 285ac7573857d54328c2af6232db68e17b4389e0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:34:06 +0000 Subject: [PATCH 08/35] Bump assets/syntaxes/02_Extra/Julia from `6c0d770` to `e2b1cb5` Bumps [assets/syntaxes/02_Extra/Julia](https://github.com/JuliaEditorSupport/Julia-sublime) from `6c0d770` to `e2b1cb5`. - [Release notes](https://github.com/JuliaEditorSupport/Julia-sublime/releases) - [Commits](https://github.com/JuliaEditorSupport/Julia-sublime/compare/6c0d770fc74e6bc037c70cae1f94fe113b60fd95...e2b1cb549d57368b7b22e79430a1d5f47555e802) Signed-off-by: dependabot-preview[bot] --- assets/syntaxes/02_Extra/Julia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/Julia b/assets/syntaxes/02_Extra/Julia index 6c0d770f..e2b1cb54 160000 --- a/assets/syntaxes/02_Extra/Julia +++ b/assets/syntaxes/02_Extra/Julia @@ -1 +1 @@ -Subproject commit 6c0d770fc74e6bc037c70cae1f94fe113b60fd95 +Subproject commit e2b1cb549d57368b7b22e79430a1d5f47555e802 From 7a1cd5226fd6311a63f040fcf1b7889e928cf304 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:36:14 +0000 Subject: [PATCH 09/35] Bump serde from 1.0.117 to 1.0.118 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.117 to 1.0.118. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.117...v1.0.118) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2475e202..728fe9b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -980,18 +980,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ "proc-macro2", "quote", From 5e7061b9f6eb3dbdcdd6a5f596856423a569ee82 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:35:52 +0000 Subject: [PATCH 10/35] Bump predicates from 1.0.5 to 1.0.6 Bumps [predicates](https://github.com/assert-rs/predicates-rs) from 1.0.5 to 1.0.6. - [Release notes](https://github.com/assert-rs/predicates-rs/releases) - [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/assert-rs/predicates-rs/compare/v1.0.5...v1.0.6) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 728fe9b6..d133305f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -800,9 +800,9 @@ dependencies = [ [[package]] name = "predicates" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" +checksum = "73dd9b7b200044694dfede9edf907c1ca19630908443e9447e624993700c6932" dependencies = [ "difference", "float-cmp", diff --git a/Cargo.toml b/Cargo.toml index dd4f61e3..c7db6f76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,7 @@ default-features = false [dev-dependencies] tempdir = "0.3" assert_cmd = "1.0.2" -predicates = "1.0.5" +predicates = "1.0.6" [build-dependencies] clap = { version = "2.33", optional = true } From 3f4638204f06069b805fc078df19c110dcec1236 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:35:09 +0000 Subject: [PATCH 11/35] Bump git2 from 0.13.12 to 0.13.15 Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.12 to 0.13.15. - [Release notes](https://github.com/rust-lang/git2-rs/releases) - [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.12...0.13.15) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d133305f..e3be4364 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -492,9 +492,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.13.12" +version = "0.13.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6f1a0238d7f8f8fd5ee642f4ebac4dbc03e03d1f78fbe7a3ede35dcf7e2224" +checksum = "44f267c9da8a4de3c615b59e23606c75f164f84896e97f4dd6c15a4294de4359" dependencies = [ "bitflags", "libc", @@ -593,9 +593,9 @@ checksum = "aa7087f49d294270db4e1928fc110c976cd4b9e5a16348e0a1df09afa99e6c98" [[package]] name = "libgit2-sys" -version = "0.12.14+1.1.0" +version = "0.12.17+1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f25af58e6495f7caf2919d08f212de550cfa3ed2f5e744988938ea292b9f549" +checksum = "f4ebdf65ca745126df8824688637aa0535a88900b83362d8ca63893bcf4e8841" dependencies = [ "cc", "libc", From 334590932af301f5319fb8f27544bdef88dc8aca Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:35:28 +0000 Subject: [PATCH 12/35] Bump syntect from 4.4.0 to 4.5.0 Bumps [syntect](https://github.com/trishume/syntect) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/trishume/syntect/releases) - [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md) - [Commits](https://github.com/trishume/syntect/compare/v4.4.0...v4.5.0) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3be4364..23fd607f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1064,9 +1064,9 @@ dependencies = [ [[package]] name = "syntect" -version = "4.4.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3978df05b5850c839a6b352d3c35ce0478944a4be689be826b53cf75363e88" +checksum = "2bfac2b23b4d049dc9a89353b4e06bbc85a8f42020cccbe5409a115cf19031e5" dependencies = [ "bincode", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index c7db6f76..5fd0272c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,7 @@ optional = true default-features = false [dependencies.syntect] -version = "4.4.0" +version = "4.5.0" default-features = false features = ["parsing", "yaml-load", "dump-load", "dump-create"] From 361b7aa0daca527ec56062fc061ecdd48494efc4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:36:33 +0000 Subject: [PATCH 13/35] Bump console from 0.13.0 to 0.14.0 Bumps [console](https://github.com/mitsuhiko/console) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/mitsuhiko/console/releases) - [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/console/compare/0.13.0...0.14.0) Signed-off-by: dependabot-preview[bot] --- Cargo.lock | 17 ++++++++--------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23fd607f..5d7eda7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,9 +246,9 @@ dependencies = [ [[package]] name = "console" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" +checksum = "7cc80946b3480f421c2f17ed1cb841753a371c7c5104f51d507e13f532c856aa" dependencies = [ "encode_unicode", "lazy_static", @@ -257,7 +257,6 @@ dependencies = [ "terminal_size", "unicode-width", "winapi", - "winapi-util", ] [[package]] @@ -901,9 +900,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.3.9" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" dependencies = [ "aho-corasick", "memchr", @@ -913,9 +912,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.18" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" [[package]] name = "remove_dir_all" @@ -1107,9 +1106,9 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14cd9f8c72704232f0bfc8455c0e861f0ad4eb60cc9ec8a170e231414c1e13" +checksum = "4bd2d183bd3fac5f5fe38ddbeb4dc9aec4a39a9d7d59e7491d900302da01cbe1" dependencies = [ "libc", "winapi", diff --git a/Cargo.toml b/Cargo.toml index 5fd0272c..6afe7523 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine atty = { version = "0.2.14", optional = true } ansi_term = "^0.12.1" ansi_colours = "^1.0" -console = "0.13.0" +console = "0.14.0" dirs = { version = "3.0", optional = true } lazy_static = { version = "1.4", optional = true } wild = { version = "2.0", optional = true } From a0225018e645d04823363c33aa5cf48fe6d839a9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:33:04 +0000 Subject: [PATCH 14/35] Bump assets/syntaxes/02_Extra/TypeScript from `603ebb4` to `a607ddf` Bumps [assets/syntaxes/02_Extra/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `603ebb4` to `a607ddf`. - [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases) - [Commits](https://github.com/Microsoft/TypeScript-Sublime-Plugin/compare/603ebb48b162bc453a0bb2cbb0192f3606819f6d...a607ddfec90648c1c2f33f8306733f6aec5d2b78) Signed-off-by: dependabot-preview[bot] --- assets/syntaxes/02_Extra/TypeScript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/TypeScript b/assets/syntaxes/02_Extra/TypeScript index 603ebb48..a607ddfe 160000 --- a/assets/syntaxes/02_Extra/TypeScript +++ b/assets/syntaxes/02_Extra/TypeScript @@ -1 +1 @@ -Subproject commit 603ebb48b162bc453a0bb2cbb0192f3606819f6d +Subproject commit a607ddfec90648c1c2f33f8306733f6aec5d2b78 From 17189fce9b384bfc971dc61bd335d197c9e65b6b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 03:32:47 +0000 Subject: [PATCH 15/35] Bump assets/themes/zenburn from `cb746f6` to `7f6fb86` Bumps [assets/themes/zenburn](https://github.com/colinta/zenburn) from `cb746f6` to `7f6fb86`. - [Release notes](https://github.com/colinta/zenburn/releases) - [Commits](https://github.com/colinta/zenburn/compare/cb746f69624e635f6f4d127fa9244658e690c34b...7f6fb86e0dcdd06d3c5181ad1cbe94c970834143) Signed-off-by: dependabot-preview[bot] --- assets/themes/zenburn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/zenburn b/assets/themes/zenburn index cb746f69..7f6fb86e 160000 --- a/assets/themes/zenburn +++ b/assets/themes/zenburn @@ -1 +1 @@ -Subproject commit cb746f69624e635f6f4d127fa9244658e690c34b +Subproject commit 7f6fb86e0dcdd06d3c5181ad1cbe94c970834143 From 2eae8b578edb21918b0417a8d4cc334dfd13fb48 Mon Sep 17 00:00:00 2001 From: David Peter Date: Fri, 1 Jan 2021 23:07:13 +0100 Subject: [PATCH 16/35] Fix repology badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbd83731..9a31db62 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat. ## Installation -[![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions) +[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions) ### On Ubuntu (using `apt`) *... and other Debian-based Linux distributions.* From 1a04dcf10f502798c7907cb1e1da37d5b8955eb8 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Mon, 21 Dec 2020 13:08:20 -0500 Subject: [PATCH 17/35] Add Lean.sublime-syntax. Covers syntax for Lean 3, an interactive theorem prover at https://leanprover-community.github.io/ whose users mostly use VSCode. --- assets/syntaxes/02_Extra/Lean.sublime-syntax | 125 +++++++++++++++++++ doc/assets.md | 1 + 2 files changed, 126 insertions(+) create mode 100644 assets/syntaxes/02_Extra/Lean.sublime-syntax diff --git a/assets/syntaxes/02_Extra/Lean.sublime-syntax b/assets/syntaxes/02_Extra/Lean.sublime-syntax new file mode 100644 index 00000000..55e47cdd --- /dev/null +++ b/assets/syntaxes/02_Extra/Lean.sublime-syntax @@ -0,0 +1,125 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: Lean +file_extensions: + - lean +scope: source.lean +contexts: + main: + - include: comments + - match: '\b(?])' + pop: true + - include: comments + - include: definitionName + - match: "," + - match: \b(Prop|Type|Sort)\b + scope: storage.type.lean + - match: '\battribute\b\s*\[[^\]]*\]' + scope: storage.modifier.lean + - match: '@\[[^\]]*\]' + scope: storage.modifier.lean + - match: \b(? Date: Mon, 28 Dec 2020 10:08:16 -0500 Subject: [PATCH 18/35] Add the Lean submodule. --- .gitmodules | 3 +++ assets/syntaxes/02_Extra/Lean | 1 + 2 files changed, 4 insertions(+) create mode 160000 assets/syntaxes/02_Extra/Lean diff --git a/.gitmodules b/.gitmodules index 09ccaed3..e5122a00 100644 --- a/.gitmodules +++ b/.gitmodules @@ -207,3 +207,6 @@ path = assets/themes/gruvbox url = https://github.com/subnut/gruvbox-tmTheme.git branch = bat-source +[submodule "assets/syntaxes/02_Extra/Lean"] + path = assets/syntaxes/02_Extra/Lean + url = https://github.com/leanprover/vscode-lean.git diff --git a/assets/syntaxes/02_Extra/Lean b/assets/syntaxes/02_Extra/Lean new file mode 160000 index 00000000..7e99440b --- /dev/null +++ b/assets/syntaxes/02_Extra/Lean @@ -0,0 +1 @@ +Subproject commit 7e99440b33c834b11deda67144a6a7ce5a666f0e From af8a8035e82dfd1e0c6a986d3d2bf5bfd7392e22 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Fri, 1 Jan 2021 18:03:43 -0500 Subject: [PATCH 19/35] Add a Lean highlighting test file. --- tests/syntax-tests/highlighted/Lean/test.lean | 68 +++++++++++++++++++ tests/syntax-tests/source/Lean/test.lean | 68 +++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 tests/syntax-tests/highlighted/Lean/test.lean create mode 100644 tests/syntax-tests/source/Lean/test.lean diff --git a/tests/syntax-tests/highlighted/Lean/test.lean b/tests/syntax-tests/highlighted/Lean/test.lean new file mode 100644 index 00000000..51918c6a --- /dev/null +++ b/tests/syntax-tests/highlighted/Lean/test.lean @@ -0,0 +1,68 @@ +import data.matrix.notation +import data.vector2 + +/-! + +Helpers that don't currently fit elsewhere... + +-/ + +lemma split_eq {m n : Type*} (x : m × n) (p p' : m × n) : + p = x ∨ p' = x ∨ (x ≠ p ∧ x ≠ p') := by tauto + +-- For `playfield`s, the piece type and/or piece index type. +variables (X : Type*) +variables [has_repr X] + +namespace chess.utils + +section repr + +/-- +An auxiliary wrapper for `option X` that allows for overriding the `has_repr` instance +for `option`, and rather, output just the value in the `some` and a custom provided +`string` for `none`. +-/ +structure option_wrapper := +(val : option X) +(none_s : string) + +instance wrapped_option_repr : has_repr (option_wrapper X) := +⟨λ ⟨val, s⟩, (option.map has_repr.repr val).get_or_else s⟩ + +variables {X} +/-- +Construct an `option_wrapper` term from a provided `option X` and the `string` +that will override the `has_repr.repr` for `none`. +-/ +def option_wrap (val : option X) (none_s : string) : option_wrapper X := ⟨val, none_s⟩ + +-- The size of the "vectors" for a `fin n' → X`, for `has_repr` definitions +variables {m' n' : ℕ} + +/-- +For a "vector" `X^n'` represented by the type `Π n' : ℕ, fin n' → X`, where +the `X` has a `has_repr` instance itself, we can provide a `has_repr` for the "vector". +This definition is used for displaying rows of the playfield, when it is defined +via a `matrix`, likely through notation. +-/ +def vec_repr : Π {n' : ℕ}, (fin n' → X) → string := +λ _ v, string.intercalate ", " ((vector.of_fn v).to_list.map repr) + +instance vec_repr_instance : has_repr (fin n' → X) := ⟨vec_repr⟩ + +/-- +For a `matrix` `X^(m' × n')` where the `X` has a `has_repr` instance itself, +we can provide a `has_repr` for the matrix, using `vec_repr` for each of the rows of the matrix. +This definition is used for displaying the playfield, when it is defined +via a `matrix`, likely through notation. +-/ +def matrix_repr : Π {m' n'}, matrix (fin m') (fin n') X → string := +λ _ _ M, string.intercalate ";\n" ((vector.of_fn M).to_list.map repr) + +instance matrix_repr_instance : + has_repr (matrix (fin n') (fin m') X) := ⟨matrix_repr⟩ + +end repr + +end chess.utils diff --git a/tests/syntax-tests/source/Lean/test.lean b/tests/syntax-tests/source/Lean/test.lean new file mode 100644 index 00000000..eddf316c --- /dev/null +++ b/tests/syntax-tests/source/Lean/test.lean @@ -0,0 +1,68 @@ +import data.matrix.notation +import data.vector2 + +/-! + +Helpers that don't currently fit elsewhere... + +-/ + +lemma split_eq {m n : Type*} (x : m × n) (p p' : m × n) : + p = x ∨ p' = x ∨ (x ≠ p ∧ x ≠ p') := by tauto + +-- For `playfield`s, the piece type and/or piece index type. +variables (X : Type*) +variables [has_repr X] + +namespace chess.utils + +section repr + +/-- +An auxiliary wrapper for `option X` that allows for overriding the `has_repr` instance +for `option`, and rather, output just the value in the `some` and a custom provided +`string` for `none`. +-/ +structure option_wrapper := +(val : option X) +(none_s : string) + +instance wrapped_option_repr : has_repr (option_wrapper X) := +⟨λ ⟨val, s⟩, (option.map has_repr.repr val).get_or_else s⟩ + +variables {X} +/-- +Construct an `option_wrapper` term from a provided `option X` and the `string` +that will override the `has_repr.repr` for `none`. +-/ +def option_wrap (val : option X) (none_s : string) : option_wrapper X := ⟨val, none_s⟩ + +-- The size of the "vectors" for a `fin n' → X`, for `has_repr` definitions +variables {m' n' : ℕ} + +/-- +For a "vector" `X^n'` represented by the type `Π n' : ℕ, fin n' → X`, where +the `X` has a `has_repr` instance itself, we can provide a `has_repr` for the "vector". +This definition is used for displaying rows of the playfield, when it is defined +via a `matrix`, likely through notation. +-/ +def vec_repr : Π {n' : ℕ}, (fin n' → X) → string := +λ _ v, string.intercalate ", " ((vector.of_fn v).to_list.map repr) + +instance vec_repr_instance : has_repr (fin n' → X) := ⟨vec_repr⟩ + +/-- +For a `matrix` `X^(m' × n')` where the `X` has a `has_repr` instance itself, +we can provide a `has_repr` for the matrix, using `vec_repr` for each of the rows of the matrix. +This definition is used for displaying the playfield, when it is defined +via a `matrix`, likely through notation. +-/ +def matrix_repr : Π {m' n'}, matrix (fin m') (fin n') X → string := +λ _ _ M, string.intercalate ";\n" ((vector.of_fn M).to_list.map repr) + +instance matrix_repr_instance : + has_repr (matrix (fin n') (fin m') X) := ⟨matrix_repr⟩ + +end repr + +end chess.utils From aa5b941ed5e7f34743e13dcc5e38082dde687d9f Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 09:46:58 +0100 Subject: [PATCH 20/35] Add ChangeLog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cdcdd7f..7681dec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ## Syntaxes +- Added Lean syntax, see #1446 (@Julian) - Added `.resource` extension for Robot Framework files, see #1386 ## New themes From 962b3a78c0891ede2cfb93c9e026d57684668a24 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 10:21:02 +0100 Subject: [PATCH 21/35] Add step-by-step guide to add syntax tests, see #1211 --- doc/assets.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/doc/assets.md b/doc/assets.md index a435a32f..2cf3d2d4 100644 --- a/doc/assets.md +++ b/doc/assets.md @@ -23,9 +23,43 @@ in the `.sublime-syntax` format. 5. Use `bat --list-languages` to check if the new languages are available. -6. If you send a pull request with your changes, please do *not* include the changed `syntaxes.bin` +6. Add a syntax test for the new language. See [#Syntax-tests](below) for details. + +7. If you send a pull request with your changes, please do *not* include the changed `syntaxes.bin` file. A new binary cache file will be created once before every new release of `bat`. +### Syntax tests + +`bat` has a set of syntax highlighting regression tests in `tests/syntax-tests`. The main idea is +make sure that we do not run into issues we had in the past where either (1) syntax highlighting +for some language is suddenly not working anymore or (2) `bat` suddenly crashes for some input (due +to `regex` incompatibilities between `syntect` and Sublime Text). + +In order to add a new test file, please follow these steps (let's take "Ruby" as an example): + +1. Make sure that you are running the **latest version of `bat`** and that `bat` is available on + the path. +2. Find an example Ruby source file or write one yourself. If possible, the file should aim to be + "comprehensive" (i.e. include a lot of the possible syntax), but this is not strictly necessary. + A simple file is better than none at all. Also, the files shouldn't be gigantic. +3. Save the file in `tests/syntax-tests/source/Ruby` (adapt for your language). The file name could + be `test.rb` (adapt extension) but can also be adapted if that is necessary in order for `bat` to + highlight it correctly (e.g. `Makefile`). +4. If you have copied the file from somewhere else, please make sure that the file *may* be copied + under the respective license and that the license is compatible with `bat`s license. If it + requires attribution, please add a `LICENSE.md` in the same folder with a text like this: + ``` + The `test.rb` file has been added from [enter source here] under the following license: + + [add license text here] + ``` +5. Go to `tests/syntax-tests` and run the `update.sh` Bash script. A new file should be generated + in the `highlighted` folder (e.g. `highlighted/Ruby/test.rb`). +6. Use `cat` or `bat --language=txt` to display the content of this file and make sure that the + syntax highlighting looks correct. +7. `git add` the new files in the `source` folder as well as the autogenerated files in the + `highlighted` folder. + ### Troubleshooting Make sure that the local cache does not interfere with the internally stored syntaxes and From 8c0dcf3b57b2c656e869dfe88a9b4137fe67f9e5 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 21:21:28 +0100 Subject: [PATCH 22/35] Update syntax test instructions --- doc/assets.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/assets.md b/doc/assets.md index 2cf3d2d4..9aa2a87c 100644 --- a/doc/assets.md +++ b/doc/assets.md @@ -16,7 +16,7 @@ in the `.sublime-syntax` format. *New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder. 3. Run the `assets/create.sh` script. It calls `bat cache --build` to parse all available - `.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder). + `.sublime-syntax` files and serialize them to a `syntaxes.bin` file. 4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the `bat` binary. @@ -38,7 +38,8 @@ to `regex` incompatibilities between `syntect` and Sublime Text). In order to add a new test file, please follow these steps (let's take "Ruby" as an example): 1. Make sure that you are running the **latest version of `bat`** and that `bat` is available on - the path. + the path. If you are creating a syntax test for a new builtin syntax (see above), make sure that + your version of `bat` already has the new syntax builtin. 2. Find an example Ruby source file or write one yourself. If possible, the file should aim to be "comprehensive" (i.e. include a lot of the possible syntax), but this is not strictly necessary. A simple file is better than none at all. Also, the files shouldn't be gigantic. From c76e27851cfea1563ed8ff4b55b989706f433f35 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 2 Jan 2021 13:22:31 -0600 Subject: [PATCH 23/35] Add support for Zig Adds syntax support for source code for the Zig programming language. https://ziglang.org/ --- .gitmodules | 3 + assets/syntaxes/02_Extra/Zig | 1 + assets/syntaxes/02_Extra/Zig.sublime-syntax | 265 ++++++++++++++++++ .../syntax-tests/highlighted/Zig/example.zig | 107 +++++++ tests/syntax-tests/source/Zig/example.zig | 107 +++++++ 5 files changed, 483 insertions(+) create mode 160000 assets/syntaxes/02_Extra/Zig create mode 100644 assets/syntaxes/02_Extra/Zig.sublime-syntax create mode 100644 tests/syntax-tests/highlighted/Zig/example.zig create mode 100644 tests/syntax-tests/source/Zig/example.zig diff --git a/.gitmodules b/.gitmodules index e5122a00..99364ba6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -210,3 +210,6 @@ [submodule "assets/syntaxes/02_Extra/Lean"] path = assets/syntaxes/02_Extra/Lean url = https://github.com/leanprover/vscode-lean.git +[submodule "assets/syntaxes/02_Extra/Zig"] + path = assets/syntaxes/02_Extra/Zig + url = https://github.com/ziglang/sublime-zig-language.git diff --git a/assets/syntaxes/02_Extra/Zig b/assets/syntaxes/02_Extra/Zig new file mode 160000 index 00000000..87ecbcae --- /dev/null +++ b/assets/syntaxes/02_Extra/Zig @@ -0,0 +1 @@ +Subproject commit 87ecbcae6fb5718369ce3bb3472ca0b2634e78e6 diff --git a/assets/syntaxes/02_Extra/Zig.sublime-syntax b/assets/syntaxes/02_Extra/Zig.sublime-syntax new file mode 100644 index 00000000..4fbcfc71 --- /dev/null +++ b/assets/syntaxes/02_Extra/Zig.sublime-syntax @@ -0,0 +1,265 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: Zig +file_extensions: + - zig +scope: source.zig +contexts: + main: + - include: dummy_main + block: + - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(\{)' + captures: + 1: storage.type.zig + 2: punctuation.section.braces.begin.zig + push: + - match: '(\})' + captures: + 1: punctuation.section.braces.end.zig + pop: true + - include: dummy_main + character_escapes: + - match: \\n + scope: constant.character.escape.newline.zig + - match: \\r + scope: constant.character.escape.carrigereturn.zig + - match: \\t + scope: constant.character.escape.tabulator.zig + - match: \\\\ + scope: constant.character.escape.backslash.zig + - match: \\' + scope: constant.character.escape.single-quote.zig + - match: \\\" + scope: constant.character.escape.double-quote.zig + - match: '\\x[a-fA-F\d]{2}' + scope: constant.character.escape.hexidecimal.zig + - match: '\\u\{[a-fA-F\d]{1,6}\}' + scope: constant.character.escape.hexidecimal.zig + comments: + - match: /// + push: + - meta_scope: comment.line.documentation.zig + - match: $\n? + pop: true + - match: '//[^/]\s*TODO' + push: + - meta_scope: comment.line.todo.zig + - match: $\n? + pop: true + - match: "//[^/]*" + push: + - meta_scope: comment.line.zig + - match: $\n? + pop: true + constants: + - match: \b(null|undefined|true|false)\b + scope: constant.language.zig + - match: '\b(?])' + scope: constant.language.enum + field_decl: + - match: '([a-zA-Z_]\w*|@\".+\")\s*(:)\s*' + captures: + 1: variable.other.member.zig + 2: punctuation.separator.zig + push: + - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(=)|$)' + captures: + 1: storage.type.zig + 2: punctuation.separator.zig + 3: keyword.operator.assignment.zig + pop: true + - include: dummy_main + function_call: + - match: '(?|<)=?) + scope: keyword.operator.logical.zig + - match: \b(and|or)\b + scope: keyword.operator.word.zig + - match: '((?:(?:\+|-|\*)\%?|/|%|<<|>>|&|\|(?=[^\|])|\^)?=)' + scope: keyword.operator.assignment.zig + - match: ((?:\+|-|\*)\%?|/(?!/)|%) + scope: keyword.operator.arithmetic.zig + - match: '(<<|>>|&(?=[a-zA-Z_]|@\")|\|(?=[^\|])|\^|~)' + scope: keyword.operator.bitwise.zig + - match: '(\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3})' + scope: keyword.operator.other.zig + param_list: + - match: '([a-zA-Z_]\w*|@\".+\")\s*(:)\s*' + captures: + 1: variable.parameter.zig + 2: punctuation.separator.zig + push: + - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(\)))' + captures: + 1: storage.type.zig + 2: punctuation.separator.zig + 3: punctuation.section.parens.end.zig + pop: true + - include: dummy_main + - match: '([a-zA-Z_][\w.]*|@\".+\")' + scope: storage.type.zig + punctuation: + - match: "," + scope: punctuation.separator.zig + - match: ; + scope: punctuation.terminator.zig + - match: (\() + scope: punctuation.section.parens.begin.zig + - match: (\)) + scope: punctuation.section.parens.end.zig + storage: + - match: \b(bool|void|noreturn|type|anyerror|anytype)\b + scope: storage.type.zig + - match: '\b(?)?\s*(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())?' + captures: + 1: storage.type.zig + 2: keyword.operator.zig + 3: storage.type.zig + - match: \bfn\b + scope: storage.type.function.zig + - match: \btest\b + scope: storage.type.test.zig + - match: \bstruct\b + scope: storage.type.struct.zig + - match: \benum\b + scope: storage.type.enum.zig + - match: \bunion\b + scope: storage.type.union.zig + - match: \berror\b + scope: storage.type.error.zig + storage_modifier: + - match: \b(const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\b + scope: storage.modifier.zig + strings: + - match: \' + push: + - meta_scope: string.quoted.single.zig + - match: \' + pop: true + - include: character_escapes + - match: '\\[^\''][^\'']*?' + scope: invalid.illegal.character.zig + - match: c?\" + push: + - meta_scope: string.quoted.double.zig + - match: \" + pop: true + - include: character_escapes + - match: '\\[^\''][^\'']*?' + scope: invalid.illegal.character.zig + - match: c?\\\\ + push: + - meta_scope: string.quoted.other.zig + - match: $\n? + pop: true + support: + - match: '(? "Linux", + else => "not Linux", +}; + +const Book = enum { + paperback, + hardcover, + ebook, + pdf, +}; + +const TokenType = union(enum) { + int: isize, + float: f64, + string: []const u8, +}; + +const array_lit: [4]u8 = .{ 11, 22, 33, 44 }; +const sentinal_lit = [_:0]u8{ 1, 2, 3, 4 }; + +test "address of syntax" { + // Get the address of a variable: + const x: i32 = 1234; + const x_ptr = &x; + + // Dereference a pointer: + expect(x_ptr.* == 1234); + + // When you get the address of a const variable, you get a const pointer to a single item. + expect(@TypeOf(x_ptr) == *const i32); + + // If you want to mutate the value, you'd need an address of a mutable variable: + var y: i32 = 5678; + const y_ptr = &y; + expect(@TypeOf(y_ptr) == *i32); + y_ptr.* += 1; + expect(y_ptr.* == 5679); +} + +// integer literals +const decimal_int = 98222; +const hex_int = 0xff; +const another_hex_int = 0xFF; +const octal_int = 0o755; +const binary_int = 0b11110000; + +// underscores may be placed between two digits as a visual separator +const one_billion = 1_000_000_000; +const binary_mask = 0b1_1111_1111; +const permissions = 0o7_5_5; +const big_address = 0xFF80_0000_0000_0000; + +// float literals +const floating_point = 123.0E+77; +const another_float = 123.0; +const yet_another = 123.0e+77; + +const hex_floating_point = 0x103.70p-5; +const another_hex_float = 0x103.70; +const yet_another_hex_float = 0x103.70P-5; + +// underscores may be placed between two digits as a visual separator +const lightspeed = 299_792_458.000_000; +const nanosecond = 0.000_000_001; +const more_hex = 0x1234_5678.9ABC_CDEFp-10; + +fn max(comptime T: type, a: T, b: T) T { + return if (a > b) a else b; +} diff --git a/tests/syntax-tests/source/Zig/example.zig b/tests/syntax-tests/source/Zig/example.zig new file mode 100644 index 00000000..a128f25c --- /dev/null +++ b/tests/syntax-tests/source/Zig/example.zig @@ -0,0 +1,107 @@ +//! this is a top level doc, starts with "//!" + +const std = @import("std"); + +pub fn main() anyerror!void { + const stdout = std.io.getStdOut().writer(); + try stdout.print("Hello, {}!\n", .{"world"}); +} + +const expect = std.testing.expect; + +test "comments" { + // comments start with "//" until newline + // foo bar baz + const x = true; // another comment + expect(x); +} + +/// a doc comment starts with "///" +/// multiple lines are merged together +const Timestamp = struct { + /// number of seconds since epoch + seconds: i64, + + /// number of nanoseconds past the second + nano: u32, + + const Self = @This(); + + pub fn unixEpoch() Self { + return Self{ + .seconds = 0, + .nanos = 0, + }; + } +}; + +const my_val = switch (std.Target.current.os.tag) { + .linux => "Linux", + else => "not Linux", +}; + +const Book = enum { + paperback, + hardcover, + ebook, + pdf, +}; + +const TokenType = union(enum) { + int: isize, + float: f64, + string: []const u8, +}; + +const array_lit: [4]u8 = .{ 11, 22, 33, 44 }; +const sentinal_lit = [_:0]u8{ 1, 2, 3, 4 }; + +test "address of syntax" { + // Get the address of a variable: + const x: i32 = 1234; + const x_ptr = &x; + + // Dereference a pointer: + expect(x_ptr.* == 1234); + + // When you get the address of a const variable, you get a const pointer to a single item. + expect(@TypeOf(x_ptr) == *const i32); + + // If you want to mutate the value, you'd need an address of a mutable variable: + var y: i32 = 5678; + const y_ptr = &y; + expect(@TypeOf(y_ptr) == *i32); + y_ptr.* += 1; + expect(y_ptr.* == 5679); +} + +// integer literals +const decimal_int = 98222; +const hex_int = 0xff; +const another_hex_int = 0xFF; +const octal_int = 0o755; +const binary_int = 0b11110000; + +// underscores may be placed between two digits as a visual separator +const one_billion = 1_000_000_000; +const binary_mask = 0b1_1111_1111; +const permissions = 0o7_5_5; +const big_address = 0xFF80_0000_0000_0000; + +// float literals +const floating_point = 123.0E+77; +const another_float = 123.0; +const yet_another = 123.0e+77; + +const hex_floating_point = 0x103.70p-5; +const another_hex_float = 0x103.70; +const yet_another_hex_float = 0x103.70P-5; + +// underscores may be placed between two digits as a visual separator +const lightspeed = 299_792_458.000_000; +const nanosecond = 0.000_000_001; +const more_hex = 0x1234_5678.9ABC_CDEFp-10; + +fn max(comptime T: type, a: T, b: T) T { + return if (a > b) a else b; +} From d388d07e9fa4b919905b706f5b56b9cacbdcc675 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 2 Jan 2021 13:56:38 -0600 Subject: [PATCH 24/35] Delete erroneously added Sublime file --- assets/syntaxes/02_Extra/Zig.sublime-syntax | 265 -------------------- 1 file changed, 265 deletions(-) delete mode 100644 assets/syntaxes/02_Extra/Zig.sublime-syntax diff --git a/assets/syntaxes/02_Extra/Zig.sublime-syntax b/assets/syntaxes/02_Extra/Zig.sublime-syntax deleted file mode 100644 index 4fbcfc71..00000000 --- a/assets/syntaxes/02_Extra/Zig.sublime-syntax +++ /dev/null @@ -1,265 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: Zig -file_extensions: - - zig -scope: source.zig -contexts: - main: - - include: dummy_main - block: - - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(\{)' - captures: - 1: storage.type.zig - 2: punctuation.section.braces.begin.zig - push: - - match: '(\})' - captures: - 1: punctuation.section.braces.end.zig - pop: true - - include: dummy_main - character_escapes: - - match: \\n - scope: constant.character.escape.newline.zig - - match: \\r - scope: constant.character.escape.carrigereturn.zig - - match: \\t - scope: constant.character.escape.tabulator.zig - - match: \\\\ - scope: constant.character.escape.backslash.zig - - match: \\' - scope: constant.character.escape.single-quote.zig - - match: \\\" - scope: constant.character.escape.double-quote.zig - - match: '\\x[a-fA-F\d]{2}' - scope: constant.character.escape.hexidecimal.zig - - match: '\\u\{[a-fA-F\d]{1,6}\}' - scope: constant.character.escape.hexidecimal.zig - comments: - - match: /// - push: - - meta_scope: comment.line.documentation.zig - - match: $\n? - pop: true - - match: '//[^/]\s*TODO' - push: - - meta_scope: comment.line.todo.zig - - match: $\n? - pop: true - - match: "//[^/]*" - push: - - meta_scope: comment.line.zig - - match: $\n? - pop: true - constants: - - match: \b(null|undefined|true|false)\b - scope: constant.language.zig - - match: '\b(?])' - scope: constant.language.enum - field_decl: - - match: '([a-zA-Z_]\w*|@\".+\")\s*(:)\s*' - captures: - 1: variable.other.member.zig - 2: punctuation.separator.zig - push: - - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(=)|$)' - captures: - 1: storage.type.zig - 2: punctuation.separator.zig - 3: keyword.operator.assignment.zig - pop: true - - include: dummy_main - function_call: - - match: '(?|<)=?) - scope: keyword.operator.logical.zig - - match: \b(and|or)\b - scope: keyword.operator.word.zig - - match: '((?:(?:\+|-|\*)\%?|/|%|<<|>>|&|\|(?=[^\|])|\^)?=)' - scope: keyword.operator.assignment.zig - - match: ((?:\+|-|\*)\%?|/(?!/)|%) - scope: keyword.operator.arithmetic.zig - - match: '(<<|>>|&(?=[a-zA-Z_]|@\")|\|(?=[^\|])|\^|~)' - scope: keyword.operator.bitwise.zig - - match: '(\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3})' - scope: keyword.operator.other.zig - param_list: - - match: '([a-zA-Z_]\w*|@\".+\")\s*(:)\s*' - captures: - 1: variable.parameter.zig - 2: punctuation.separator.zig - push: - - match: '([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(\)))' - captures: - 1: storage.type.zig - 2: punctuation.separator.zig - 3: punctuation.section.parens.end.zig - pop: true - - include: dummy_main - - match: '([a-zA-Z_][\w.]*|@\".+\")' - scope: storage.type.zig - punctuation: - - match: "," - scope: punctuation.separator.zig - - match: ; - scope: punctuation.terminator.zig - - match: (\() - scope: punctuation.section.parens.begin.zig - - match: (\)) - scope: punctuation.section.parens.end.zig - storage: - - match: \b(bool|void|noreturn|type|anyerror|anytype)\b - scope: storage.type.zig - - match: '\b(?)?\s*(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())?' - captures: - 1: storage.type.zig - 2: keyword.operator.zig - 3: storage.type.zig - - match: \bfn\b - scope: storage.type.function.zig - - match: \btest\b - scope: storage.type.test.zig - - match: \bstruct\b - scope: storage.type.struct.zig - - match: \benum\b - scope: storage.type.enum.zig - - match: \bunion\b - scope: storage.type.union.zig - - match: \berror\b - scope: storage.type.error.zig - storage_modifier: - - match: \b(const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\b - scope: storage.modifier.zig - strings: - - match: \' - push: - - meta_scope: string.quoted.single.zig - - match: \' - pop: true - - include: character_escapes - - match: '\\[^\''][^\'']*?' - scope: invalid.illegal.character.zig - - match: c?\" - push: - - meta_scope: string.quoted.double.zig - - match: \" - pop: true - - include: character_escapes - - match: '\\[^\''][^\'']*?' - scope: invalid.illegal.character.zig - - match: c?\\\\ - push: - - meta_scope: string.quoted.other.zig - - match: $\n? - pop: true - support: - - match: '(? Date: Sat, 2 Jan 2021 21:17:25 +0100 Subject: [PATCH 25/35] Update Zig syntax test output --- .../syntax-tests/highlighted/Zig/example.zig | 162 +++++++++--------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/tests/syntax-tests/highlighted/Zig/example.zig b/tests/syntax-tests/highlighted/Zig/example.zig index d88eaf91..7153dbfc 100644 --- a/tests/syntax-tests/highlighted/Zig/example.zig +++ b/tests/syntax-tests/highlighted/Zig/example.zig @@ -1,107 +1,107 @@ -//! this is a top level doc, starts with "//!" +//! this is a top level doc, starts with "//!" -const std = @import("std"); +const std = @import("std"); -pub fn main() anyerror!void { - const stdout = std.io.getStdOut().writer(); - try stdout.print("Hello, {}!\n", .{"world"}); +pub fn main() anyerror!void { + const stdout = std.io.getStdOut().writer(); + try stdout.print("Hello, {}!\n", .{"world"}); } -const expect = std.testing.expect; +const expect = std.testing.expect; -test "comments" { - // comments start with "//" until newline - // foo bar baz - const x = true; // another comment - expect(x); +test "comments" { + // comments start with "//" until newline + // foo bar baz + const x = true; // another comment + expect(x); } -/// a doc comment starts with "///" -/// multiple lines are merged together -const Timestamp = struct { - /// number of seconds since epoch - seconds: i64, +/// a doc comment starts with "///" +/// multiple lines are merged together +const Timestamp = struct { + /// number of seconds since epoch + seconds: i64, - /// number of nanoseconds past the second - nano: u32, + /// number of nanoseconds past the second + nano: u32, - const Self = @This(); + const Self = @This(); - pub fn unixEpoch() Self { - return Self{ - .seconds = 0, - .nanos = 0, - }; - } -}; + pub fn unixEpoch() Self { + return Self{ + .seconds = 0, + .nanos = 0, + }; + } +}; -const my_val = switch (std.Target.current.os.tag) { - .linux => "Linux", - else => "not Linux", -}; +const my_val = switch (std.Target.current.os.tag) { + .linux => "Linux", + else => "not Linux", +}; -const Book = enum { - paperback, - hardcover, - ebook, - pdf, -}; +const Book = enum { + paperback, + hardcover, + ebook, + pdf, +}; -const TokenType = union(enum) { - int: isize, - float: f64, - string: []const u8, -}; +const TokenType = union(enum) { + int: isize, + float: f64, + string: []const u8, +}; -const array_lit: [4]u8 = .{ 11, 22, 33, 44 }; -const sentinal_lit = [_:0]u8{ 1, 2, 3, 4 }; +const array_lit: [4]u8 = .{ 11, 22, 33, 44 }; +const sentinal_lit = [_:0]u8{ 1, 2, 3, 4 }; -test "address of syntax" { - // Get the address of a variable: - const x: i32 = 1234; - const x_ptr = &x; +test "address of syntax" { + // Get the address of a variable: + const x: i32 = 1234; + const x_ptr = &x; - // Dereference a pointer: - expect(x_ptr.* == 1234); + // Dereference a pointer: + expect(x_ptr.* == 1234); - // When you get the address of a const variable, you get a const pointer to a single item. - expect(@TypeOf(x_ptr) == *const i32); + // When you get the address of a const variable, you get a const pointer to a single item. + expect(@TypeOf(x_ptr) == *const i32); - // If you want to mutate the value, you'd need an address of a mutable variable: - var y: i32 = 5678; - const y_ptr = &y; - expect(@TypeOf(y_ptr) == *i32); - y_ptr.* += 1; - expect(y_ptr.* == 5679); + // If you want to mutate the value, you'd need an address of a mutable variable: + var y: i32 = 5678; + const y_ptr = &y; + expect(@TypeOf(y_ptr) == *i32); + y_ptr.* += 1; + expect(y_ptr.* == 5679); } -// integer literals -const decimal_int = 98222; -const hex_int = 0xff; -const another_hex_int = 0xFF; -const octal_int = 0o755; -const binary_int = 0b11110000; +// integer literals +const decimal_int = 98222; +const hex_int = 0xff; +const another_hex_int = 0xFF; +const octal_int = 0o755; +const binary_int = 0b11110000; -// underscores may be placed between two digits as a visual separator -const one_billion = 1_000_000_000; -const binary_mask = 0b1_1111_1111; -const permissions = 0o7_5_5; -const big_address = 0xFF80_0000_0000_0000; +// underscores may be placed between two digits as a visual separator +const one_billion = 1_000_000_000; +const binary_mask = 0b1_1111_1111; +const permissions = 0o7_5_5; +const big_address = 0xFF80_0000_0000_0000; -// float literals -const floating_point = 123.0E+77; -const another_float = 123.0; -const yet_another = 123.0e+77; +// float literals +const floating_point = 123.0E+77; +const another_float = 123.0; +const yet_another = 123.0e+77; -const hex_floating_point = 0x103.70p-5; -const another_hex_float = 0x103.70; -const yet_another_hex_float = 0x103.70P-5; +const hex_floating_point = 0x103.70p-5; +const another_hex_float = 0x103.70; +const yet_another_hex_float = 0x103.70P-5; -// underscores may be placed between two digits as a visual separator -const lightspeed = 299_792_458.000_000; -const nanosecond = 0.000_000_001; -const more_hex = 0x1234_5678.9ABC_CDEFp-10; +// underscores may be placed between two digits as a visual separator +const lightspeed = 299_792_458.000_000; +const nanosecond = 0.000_000_001; +const more_hex = 0x1234_5678.9ABC_CDEFp-10; -fn max(comptime T: type, a: T, b: T) T { - return if (a > b) a else b; +fn max(comptime T: type, a: T, b: T) T { + return if (a > b) a else b; } From 7fbb3a53523dc92d71040fa836a2a4948f392573 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 21:37:11 +0100 Subject: [PATCH 26/35] Add Zig entry in ChangeLog, see #1470 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7681dec8..c04f8e97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ## Syntaxes +- Added Zig syntax, see #1470 (@paulsmith) - Added Lean syntax, see #1446 (@Julian) - Added `.resource` extension for Robot Framework files, see #1386 From 522c97f5ad68349316f4380a43d37b229eba07a0 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 21:26:00 +0100 Subject: [PATCH 27/35] DotEnv syntax test: add missing newline --- tests/syntax-tests/source/DotENV/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/syntax-tests/source/DotENV/.env b/tests/syntax-tests/source/DotENV/.env index 474f6f14..42a024ab 100644 --- a/tests/syntax-tests/source/DotENV/.env +++ b/tests/syntax-tests/source/DotENV/.env @@ -54,4 +54,4 @@ TEST_ESCAPE="escaped characters \n \t \r \" \' \$ or maybe a backslash \\..." TEST_DOUBLE="Lorem {$VAR1} ${VAR2} $VAR3 ipsum dolor sit amet\n\r\t\\" # Single Quotes -TEST_SINGLE='Lorem {$VAR1} ${VAR2} $VAR3 ipsum dolor sit amet\n\r\t\\' \ No newline at end of file +TEST_SINGLE='Lorem {$VAR1} ${VAR2} $VAR3 ipsum dolor sit amet\n\r\t\\' From b5bdba8b16666939f16d3e33372db88193bcd269 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 2 Jan 2021 21:26:30 +0100 Subject: [PATCH 28/35] Svelte syntax test: rename license file --- tests/syntax-tests/source/Svelte/{LICENSE => LICENSE.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/syntax-tests/source/Svelte/{LICENSE => LICENSE.md} (100%) diff --git a/tests/syntax-tests/source/Svelte/LICENSE b/tests/syntax-tests/source/Svelte/LICENSE.md similarity index 100% rename from tests/syntax-tests/source/Svelte/LICENSE rename to tests/syntax-tests/source/Svelte/LICENSE.md From 54229822079ca681a382dd8dc577ba88d9989258 Mon Sep 17 00:00:00 2001 From: Janek <27jf@pm.me> Date: Sat, 7 Nov 2020 16:00:56 +0100 Subject: [PATCH 29/35] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fa156757..c4982b8c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,22 +8,12 @@ assignees: '' --- **What version of `bat` are you using?** -[paste the output of `bat --version` here] + **Describe the bug you encountered:** ... @@ -32,8 +22,15 @@ If you're on Windows: ... **How did you install `bat`?** - + --- -[paste the output of `info.sh` here] +**Please tell us about the environment in which you are running `bat`:** + From e94980bfd0d6eaff577b8e0a0cae42354e846c99 Mon Sep 17 00:00:00 2001 From: Janek <27jf@pm.me> Date: Fri, 27 Nov 2020 11:57:45 +0100 Subject: [PATCH 30/35] bug_report.md: move environment prompt back up --- .github/ISSUE_TEMPLATE/bug_report.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c4982b8c..a24e0b10 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,7 +9,14 @@ assignees: '' **What version of `bat` are you using?** @@ -26,11 +33,5 @@ Please make sure to fill out these few questions so we can help you as fast as p --- -**Please tell us about the environment in which you are running `bat`:** - +**Evironment** + From 3573c48e98e1698005cbf8ad5eeb58b3dcdaf994 Mon Sep 17 00:00:00 2001 From: Janek <27jf@pm.me> Date: Tue, 29 Dec 2020 15:20:11 +0100 Subject: [PATCH 31/35] bug_report.md: improve wording --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a24e0b10..ca7e2092 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ assignees: '' **What version of `bat` are you using?** From 0c302f088a35179dd488fc39e28e23f49aa01051 Mon Sep 17 00:00:00 2001 From: Janek <27jf@pm.me> Date: Wed, 30 Dec 2020 13:58:14 +0100 Subject: [PATCH 33/35] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 81c3ce9c..98f22bbc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,8 @@ assignees: '' + --- From 2046b47739b661efaa10f1a7a2c674990fb3bb55 Mon Sep 17 00:00:00 2001 From: David Peter Date: Sun, 3 Jan 2021 21:15:50 +0100 Subject: [PATCH 34/35] Move "diagnostics" part to the bottom of the bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 32 +++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 98f22bbc..f88c9071 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,32 +7,38 @@ assignees: '' --- - + **What version of `bat` are you using?** + + **Describe the bug you encountered:** + ... **What did you expect to happen instead?** + ... + **How did you install `bat`?** + --- **Evironment** - + + From 8381945cb59aac45e4a60c597f114dbf0102cfcf Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 3 Jan 2021 21:18:54 +0100 Subject: [PATCH 35/35] Update formatting --- .github/ISSUE_TEMPLATE/bug_report.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f88c9071..23c0b4e6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -36,8 +36,11 @@ In order to reproduce your issue, please add some information about the environm in which you're running bat. Linux and MacOS: - Please run the script at https://github.com/sharkdp/bat/blob/master/diagnostics/info.sh (Click "Raw" to - get the actual source code) and paste the Markdown output here. + Please run the script at + + https://github.com/sharkdp/bat/blob/master/diagnostics/info.sh + + (click "Raw" to get the actual source code) and paste the Markdown output here. Windows: Please add your Windows Version (e.g. "Windows 10 1908")