mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-03 16:41:56 +00:00 
			
		
		
		
	Merge branch 'master' into fix/multibyte-chars
This commit is contained in:
		@@ -7,6 +7,7 @@
 | 
			
		||||
- Fix `BAT_THEME_DARK` and `BAT_THEME_LIGHT` being ignored, see issue #3171 and PR #3168 (@bash)
 | 
			
		||||
- Prevent `--list-themes` from outputting default theme info to stdout when it is piped, see #3189 (@einfachIrgendwer0815)
 | 
			
		||||
- Rename some submodules to fix Dependabot submodule updates, see issue #3198 and PR #3201 (@victor-gp)
 | 
			
		||||
- Make highlight tests fail when new syntaxes don't have fixtures PR #3255 (@dan-hipschman)
 | 
			
		||||
- Fix crash for multibyte characters in file path, see issue #3230 and PR #3245 (@HSM95)
 | 
			
		||||
 | 
			
		||||
## Other
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										112
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										112
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@@ -77,9 +77,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "anyhow"
 | 
			
		||||
version = "1.0.95"
 | 
			
		||||
version = "1.0.97"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
 | 
			
		||||
checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "assert_cmd"
 | 
			
		||||
@@ -484,13 +484,13 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "etcetera"
 | 
			
		||||
version = "0.8.0"
 | 
			
		||||
version = "0.10.0"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943"
 | 
			
		||||
checksum = "26c7b13d0780cb82722fd59f6f57f925e143427e4a75313a6c77243bf5326ae6"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "cfg-if",
 | 
			
		||||
 "home",
 | 
			
		||||
 "windows-sys 0.48.0",
 | 
			
		||||
 "windows-sys 0.59.0",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -608,7 +608,7 @@ dependencies = [
 | 
			
		||||
 "cfg-if",
 | 
			
		||||
 "libc",
 | 
			
		||||
 "wasi 0.13.3+wasi-0.2.2",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -845,9 +845,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "indexmap"
 | 
			
		||||
version = "2.7.0"
 | 
			
		||||
version = "2.8.0"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
 | 
			
		||||
checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "equivalent",
 | 
			
		||||
 "hashbrown 0.15.2",
 | 
			
		||||
@@ -1079,7 +1079,7 @@ dependencies = [
 | 
			
		||||
 "libc",
 | 
			
		||||
 "redox_syscall",
 | 
			
		||||
 "smallvec",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1819,7 +1819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-core 0.56.0",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1829,7 +1829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-core 0.57.0",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1841,7 +1841,7 @@ dependencies = [
 | 
			
		||||
 "windows-implement 0.56.0",
 | 
			
		||||
 "windows-interface 0.56.0",
 | 
			
		||||
 "windows-result",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1853,7 +1853,7 @@ dependencies = [
 | 
			
		||||
 "windows-implement 0.57.0",
 | 
			
		||||
 "windows-interface 0.57.0",
 | 
			
		||||
 "windows-result",
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1906,16 +1906,7 @@ version = "0.1.2"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows-sys"
 | 
			
		||||
version = "0.48.0"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-targets 0.48.5",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1924,7 +1915,7 @@ version = "0.52.0"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1933,22 +1924,7 @@ version = "0.59.0"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows-targets 0.52.6",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows-targets"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows_aarch64_gnullvm 0.48.5",
 | 
			
		||||
 "windows_aarch64_msvc 0.48.5",
 | 
			
		||||
 "windows_i686_gnu 0.48.5",
 | 
			
		||||
 "windows_i686_msvc 0.48.5",
 | 
			
		||||
 "windows_x86_64_gnu 0.48.5",
 | 
			
		||||
 "windows_x86_64_gnullvm 0.48.5",
 | 
			
		||||
 "windows_x86_64_msvc 0.48.5",
 | 
			
		||||
 "windows-targets",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
@@ -1957,46 +1933,28 @@ version = "0.52.6"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "windows_aarch64_gnullvm 0.52.6",
 | 
			
		||||
 "windows_aarch64_msvc 0.52.6",
 | 
			
		||||
 "windows_i686_gnu 0.52.6",
 | 
			
		||||
 "windows_aarch64_gnullvm",
 | 
			
		||||
 "windows_aarch64_msvc",
 | 
			
		||||
 "windows_i686_gnu",
 | 
			
		||||
 "windows_i686_gnullvm",
 | 
			
		||||
 "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",
 | 
			
		||||
 "windows_i686_msvc",
 | 
			
		||||
 "windows_x86_64_gnu",
 | 
			
		||||
 "windows_x86_64_gnullvm",
 | 
			
		||||
 "windows_x86_64_msvc",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_aarch64_gnullvm"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_aarch64_gnullvm"
 | 
			
		||||
version = "0.52.6"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_aarch64_msvc"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_aarch64_msvc"
 | 
			
		||||
version = "0.52.6"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_i686_gnu"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_i686_gnu"
 | 
			
		||||
version = "0.52.6"
 | 
			
		||||
@@ -2009,48 +1967,24 @@ version = "0.52.6"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_i686_msvc"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_i686_msvc"
 | 
			
		||||
version = "0.52.6"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_x86_64_gnu"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
 | 
			
		||||
 | 
			
		||||
[[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_gnullvm"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
 | 
			
		||||
 | 
			
		||||
[[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_msvc"
 | 
			
		||||
version = "0.48.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "windows_x86_64_msvc"
 | 
			
		||||
version = "0.52.6"
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,7 @@ semver = "1.0"
 | 
			
		||||
path_abs = { version = "0.5", default-features = false }
 | 
			
		||||
clircle = { version = "0.6.1", default-features = false }
 | 
			
		||||
bugreport = { version = "0.5.0", optional = true }
 | 
			
		||||
etcetera = { version = "0.8.0", optional = true }
 | 
			
		||||
etcetera = { version = "0.10.0", optional = true }
 | 
			
		||||
grep-cli = { version = "0.1.11", optional = true }
 | 
			
		||||
regex = { version = "1.10.6", optional = true }
 | 
			
		||||
walkdir = { version = "2.5", optional = true }
 | 
			
		||||
@@ -102,8 +102,8 @@ serde = { version = "1.0", features = ["derive"] }
 | 
			
		||||
nix = { version = "0.29", default-features = false, features = ["term"] }
 | 
			
		||||
 | 
			
		||||
[build-dependencies]
 | 
			
		||||
anyhow = "1.0.86"
 | 
			
		||||
indexmap = { version = "2.3.0", features = ["serde"] }
 | 
			
		||||
anyhow = "1.0.97"
 | 
			
		||||
indexmap = { version = "2.8.0", features = ["serde"] }
 | 
			
		||||
itertools = "0.14.0"
 | 
			
		||||
once_cell = "1.20"
 | 
			
		||||
regex = "1.10.6"
 | 
			
		||||
 
 | 
			
		||||
@@ -12,13 +12,15 @@ def compare_highlighted_versions(root_old, root_new):
 | 
			
		||||
    print(" -", root_old)
 | 
			
		||||
    print(" -", root_new)
 | 
			
		||||
    has_changes = False
 | 
			
		||||
    # Used to check for newly added files that don't have a test
 | 
			
		||||
    unknown_files = {strip_root(p) for p in glob.glob(path.join(root_new, "*", "*"))}
 | 
			
		||||
 | 
			
		||||
    for path_old in glob.glob(path.join(root_old, "*", "*")):
 | 
			
		||||
        filename = path.basename(path_old)
 | 
			
		||||
        dirname = path.basename(path.dirname(path_old))
 | 
			
		||||
        rel_path = strip_root(path_old)
 | 
			
		||||
        unknown_files.discard(rel_path)
 | 
			
		||||
        path_new = path.join(root_new, rel_path)
 | 
			
		||||
 | 
			
		||||
        path_new = path.join(root_new, dirname, filename)
 | 
			
		||||
 | 
			
		||||
        print("\n========== {}/{}".format(dirname, filename))
 | 
			
		||||
        print("\n========== {}".format(rel_path))
 | 
			
		||||
 | 
			
		||||
        with open(path_old) as file_old:
 | 
			
		||||
            lines_old = file_old.readlines()
 | 
			
		||||
@@ -39,11 +41,21 @@ def compare_highlighted_versions(root_old, root_new):
 | 
			
		||||
            has_changes = True
 | 
			
		||||
        else:
 | 
			
		||||
            print("No changes")
 | 
			
		||||
    print()
 | 
			
		||||
 | 
			
		||||
    for f in unknown_files:
 | 
			
		||||
        print("\n========== {}: No fixture for this language, run update.sh".format(f))
 | 
			
		||||
        has_changes = True
 | 
			
		||||
 | 
			
		||||
    print()
 | 
			
		||||
    return has_changes
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def strip_root(p: str) -> str:
 | 
			
		||||
    filename = path.basename(p)
 | 
			
		||||
    dirname = path.basename(path.dirname(p))
 | 
			
		||||
    return path.join(dirname, filename)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    parser = argparse.ArgumentParser(
 | 
			
		||||
        description="This script compares two directories that were created "
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user