mirror of
https://github.com/sharkdp/bat
synced 2026-08-04 19:01:44 +00:00
Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e09499b3df | |||
| cff01d81fa | |||
| 31608c9a03 | |||
| 357ce84c56 | |||
| 3a5c52641b | |||
| 6e8fca5bb2 | |||
| 63c77383ce | |||
| 4df22e617f | |||
| 6473e8c1be | |||
| 972a764a74 | |||
| 54143d1403 | |||
| 6523bbf62f | |||
| 05e2c2c66b | |||
| 69227222b5 | |||
| 49af3e854b | |||
| 6a8e4757b7 | |||
| 91deef8b13 | |||
| 61e888de7f | |||
| f3f9f10f05 | |||
| 29ffa2a832 | |||
| 42a873fdb8 | |||
| 82f048aedb | |||
| ae08785ec8 | |||
| a500629359 | |||
| 724a5fac99 | |||
| c483e49b92 | |||
| 94c9b40694 | |||
| 0c9dc3b257 | |||
| 3b5174bb1d | |||
| 3324505383 | |||
| de7872f8a8 | |||
| abf0229741 | |||
| e04bccd12d | |||
| 668c8a6703 | |||
| bd68684537 | |||
| c2847f6a9f | |||
| cf7ed042c1 | |||
| 6b92814ea0 | |||
| a236a9b195 | |||
| b68c5d8576 | |||
| fee57d71d9 | |||
| 5d3205acc0 | |||
| 4e6816abd6 | |||
| 72e8036edc | |||
| 397def1320 | |||
| d2d29180a7 | |||
| 2f263c9fbf | |||
| 4ff360669f | |||
| 549e5d7355 | |||
| dd48d29c28 | |||
| 98ee5f7400 | |||
| 638c04c13e | |||
| b1c865acaa | |||
| d3d795ffb2 | |||
| 0571c51487 | |||
| 348c9f3562 | |||
| 6b6a8f8e16 | |||
| 6aa002850c | |||
| 49c22c8d39 | |||
| 673caf6b59 | |||
| e6ffab3cb4 | |||
| 4e43f8fa74 | |||
| bac1b16885 | |||
| 778a4929a8 | |||
| 5c22dd4248 | |||
| 214cd0f8ea | |||
| 9fd61fcb6d | |||
| edf1d3b256 | |||
| eca47b2a28 | |||
| 62424e70d7 | |||
| 4791f15222 | |||
| 159f234b78 | |||
| 3ec96127f2 | |||
| a9acb2711b | |||
| a3182e68e4 | |||
| 0691b18231 | |||
| c711cd1b2e | |||
| 14e6b41a5f | |||
| 532af6556d | |||
| 26717b0cd2 | |||
| 1f177f0a1c | |||
| 54c81fa543 | |||
| 34dee9e3aa | |||
| c073d4a118 | |||
| e79c5516bf | |||
| 4776c2a575 | |||
| f98a96c1ed | |||
| 8a3446d219 | |||
| 5d5bf616ca | |||
| b68c038db8 | |||
| 1117d2f9cb | |||
| d0ba5bcb32 | |||
| f8d39d5624 | |||
| 9998e2eac6 | |||
| 7cac07d845 | |||
| 148caa1381 | |||
| ab27cac0cc | |||
| 01fcbf2183 | |||
| 8a0c30b385 | |||
| bc21c4d0e0 | |||
| 0800562ba2 | |||
| 1f9befbcd1 | |||
| a5c779c518 | |||
| f37f100352 | |||
| 18d1a3b973 | |||
| dc10246bd2 | |||
| 44bdae0212 | |||
| 1ece38a4c4 | |||
| e90308e1f8 | |||
| d702d6740c | |||
| c6a526f99c | |||
| 278d841408 | |||
| 5f576f1ecf | |||
| 48c6ea6b25 | |||
| 558134f6c8 | |||
| 1dd57e6d7e | |||
| 20ba84d1fa | |||
| e81f9b23e6 | |||
| 50dc4a79b0 | |||
| 8fa8f44706 | |||
| ecd862d9ff | |||
| cbed338c3a | |||
| 4492d99556 | |||
| d96ee2261f | |||
| dda27b253b | |||
| 78f26d0caf | |||
| abcd09f869 | |||
| 41a5ff039b | |||
| 155bad3862 | |||
| 7c98a1c901 | |||
| c1246fcd53 | |||
| 9f401ea122 | |||
| 9c782fb692 | |||
| 154186a58d | |||
| b22a9f8fe3 | |||
| 5219c40ed8 | |||
| a25ee0e6fd | |||
| 496e0bc046 | |||
| 7082fd09f0 | |||
| 857cc215b4 | |||
| 481268f018 | |||
| f7d9f49503 | |||
| 88fcfd76aa | |||
| 76e34b29ec | |||
| 01984e1d02 | |||
| 536390509f | |||
| 58198d0700 | |||
| afc5aacb28 | |||
| cea05e9f22 | |||
| 2a7851530d | |||
| 1a6709c2cb |
+30
-1
@@ -6,7 +6,7 @@
|
|||||||
url = https://github.com/sublimehq/Packages/
|
url = https://github.com/sublimehq/Packages/
|
||||||
[submodule "assets/syntaxes/TOML"]
|
[submodule "assets/syntaxes/TOML"]
|
||||||
path = assets/syntaxes/TOML
|
path = assets/syntaxes/TOML
|
||||||
url = https://github.com/sharkdp/sublime_toml_highlighting
|
url = https://github.com/jasonwilliams/sublime_toml_highlighting
|
||||||
[submodule "assets/syntaxes/Julia"]
|
[submodule "assets/syntaxes/Julia"]
|
||||||
path = assets/syntaxes/Julia
|
path = assets/syntaxes/Julia
|
||||||
url = https://github.com/JuliaEditorSupport/Julia-sublime
|
url = https://github.com/JuliaEditorSupport/Julia-sublime
|
||||||
@@ -94,3 +94,32 @@
|
|||||||
[submodule "assets/syntaxes/Robot"]
|
[submodule "assets/syntaxes/Robot"]
|
||||||
path = assets/syntaxes/Robot
|
path = assets/syntaxes/Robot
|
||||||
url = https://github.com/andriyko/sublime-robot-framework-assistant.git
|
url = https://github.com/andriyko/sublime-robot-framework-assistant.git
|
||||||
|
[submodule "assets/themes/sublime-snazzy"]
|
||||||
|
path = assets/themes/sublime-snazzy
|
||||||
|
url = https://github.com/greggb/sublime-snazzy
|
||||||
|
[submodule "assets/syntaxes/HTML (Twig)"]
|
||||||
|
path = assets/syntaxes/HTML (Twig)
|
||||||
|
url = https://github.com/Anomareh/PHP-Twig.tmbundle.git
|
||||||
|
[submodule "assets/syntaxes/AsciiDoc"]
|
||||||
|
path = assets/syntaxes/AsciiDoc
|
||||||
|
url = https://github.com/SublimeText/AsciiDoc.git
|
||||||
|
[submodule "assets/syntaxes/Assembly (ARM)"]
|
||||||
|
path = assets/syntaxes/Assembly (ARM)
|
||||||
|
url = https://github.com/tvi/Sublime-ARM-Assembly
|
||||||
|
[submodule "assets/syntaxes/syslog-syntax"]
|
||||||
|
path = assets/syntaxes/Syslog
|
||||||
|
url = https://github.com/caos21/syslog-syntax.git
|
||||||
|
branch = master
|
||||||
|
[submodule "assets/syntaxes/protobuf-syntax-highlighting"]
|
||||||
|
path = assets/syntaxes/Protobuf
|
||||||
|
url = https://github.com/VcamX/protobuf-syntax-highlighting.git
|
||||||
|
branch = master
|
||||||
|
[submodule "assets/syntaxes/Terraform"]
|
||||||
|
path = assets/syntaxes/Terraform
|
||||||
|
url = https://github.com/alexlouden/Terraform.tmLanguage.git
|
||||||
|
[submodule "assets/syntaxes/Jsonnet"]
|
||||||
|
path = assets/syntaxes/Jsonnet
|
||||||
|
url = https://github.com/gburiola/sublime-jsonnet-syntax.git
|
||||||
|
[submodule "assets/syntaxes/varlink"]
|
||||||
|
path = assets/syntaxes/varlink
|
||||||
|
url = https://github.com/varlink/syntax-highlight-varlink.git
|
||||||
|
|||||||
+11
-4
@@ -1,5 +1,5 @@
|
|||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Stable channel.
|
# Stable channel.
|
||||||
@@ -32,15 +32,15 @@ matrix:
|
|||||||
|
|
||||||
# Minimum Rust supported channel.
|
# Minimum Rust supported channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: 1.29.0
|
rust: 1.30.0
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: 1.29.0
|
rust: 1.30.0
|
||||||
env:
|
env:
|
||||||
- TARGET=x86_64-unknown-linux-musl
|
- TARGET=x86_64-unknown-linux-musl
|
||||||
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
||||||
- os: osx
|
- os: osx
|
||||||
rust: 1.29.0
|
rust: 1.30.0
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
# Code formatting check
|
# Code formatting check
|
||||||
@@ -103,3 +103,10 @@ deploy:
|
|||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
on_success: never
|
on_success: never
|
||||||
|
|
||||||
|
# Caching
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- /home/travis/.cargo
|
||||||
|
before_cache:
|
||||||
|
- rm -rf /home/travis/.cargo/registry
|
||||||
|
|||||||
Generated
+300
-133
@@ -1,9 +1,14 @@
|
|||||||
|
[[package]]
|
||||||
|
name = "adler32"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
version = "0.6.8"
|
version = "0.6.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -23,11 +28,28 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "assert_cmd"
|
name = "argon2rs"
|
||||||
version = "0.10.1"
|
version = "0.2.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arrayvec"
|
||||||
|
version = "0.4.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "assert_cmd"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"escargot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -43,33 +65,55 @@ dependencies = [
|
|||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "backtrace"
|
||||||
|
version = "0.3.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "backtrace-sys"
|
||||||
|
version = "0.1.28"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.9.3"
|
version = "0.9.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bat"
|
name = "bat"
|
||||||
version = "0.8.0"
|
version = "0.10.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_colours 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_colours 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"assert_cmd 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_cmd 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"console 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"console 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"content_inspector 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"content_inspector 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"directories 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"escargot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"syntect 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syntect 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -79,8 +123,8 @@ name = "bincode"
|
|||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -88,9 +132,23 @@ name = "bitflags"
|
|||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "blake2-rfc"
|
||||||
|
version = "0.2.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "build_const"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
version = "1.2.6"
|
version = "1.2.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -100,7 +158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -120,11 +178,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clicolors-control"
|
name = "clicolors-control"
|
||||||
version = "0.2.0"
|
version = "1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -139,26 +197,40 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "console"
|
name = "console"
|
||||||
version = "0.6.2"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clicolors-control 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clicolors-control 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "constant_time_eq"
|
||||||
|
version = "0.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "content_inspector"
|
name = "content_inspector"
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crc"
|
||||||
|
version = "1.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -167,14 +239,20 @@ version = "2.0.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "directories"
|
name = "dirs"
|
||||||
version = "1.0.2"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "encode_unicode"
|
||||||
|
version = "0.3.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding"
|
name = "encoding"
|
||||||
version = "0.2.33"
|
version = "0.2.33"
|
||||||
@@ -239,20 +317,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "escargot"
|
name = "escargot"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "failure"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"backtrace 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "failure_derive"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"syn 0.15.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flate2"
|
name = "flate2"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -276,14 +377,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "git2"
|
name = "git2"
|
||||||
version = "0.7.5"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libgit2-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -325,17 +426,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "0.2.11"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lazy_static"
|
|
||||||
version = "1.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazycell"
|
name = "lazycell"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
@@ -348,18 +441,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libgit2-sys"
|
name = "libgit2-sys"
|
||||||
version = "0.7.10"
|
version = "0.7.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libz-sys 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.0.23"
|
version = "1.0.25"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -384,10 +477,10 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -397,30 +490,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.1.0"
|
version = "2.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz-sys"
|
name = "miniz-sys"
|
||||||
version = "0.1.10"
|
version = "0.1.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miniz_oxide"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miniz_oxide_c_api"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nodrop"
|
||||||
|
version = "0.1.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "onig"
|
name = "onig"
|
||||||
version = "4.2.0"
|
version = "4.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -480,9 +597,9 @@ version = "0.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -511,7 +628,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "0.4.20"
|
version = "0.4.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -524,10 +641,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "0.6.8"
|
version = "0.6.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -579,23 +696,34 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "redox_users"
|
||||||
version = "1.0.5"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "1.0.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -606,6 +734,11 @@ dependencies = [
|
|||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-demangle"
|
||||||
|
version = "0.1.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
@@ -616,7 +749,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "0.2.6"
|
version = "0.2.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -626,12 +759,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "same-file"
|
name = "same-file"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scoped_threadpool"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scopeguard"
|
name = "scopeguard"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
@@ -652,30 +790,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.79"
|
version = "1.0.80"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.79"
|
version = "1.0.80"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"syn 0.15.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syn 0.15.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.32"
|
version = "1.0.33"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -703,32 +841,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "0.15.9"
|
version = "0.15.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "synstructure"
|
||||||
|
version = "0.10.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"syn 0.15.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syntect"
|
name = "syntect"
|
||||||
version = "3.0.1"
|
version = "3.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"flate2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"onig 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"onig 4.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"plist 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"plist 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -783,7 +932,7 @@ name = "thread_local"
|
|||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -793,7 +942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ucd-util"
|
name = "ucd-util"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -829,7 +978,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "1.7.1"
|
version = "1.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -839,7 +988,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "utf8-ranges"
|
name = "utf8-ranges"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -864,10 +1013,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "walkdir"
|
name = "walkdir"
|
||||||
version = "2.2.5"
|
version = "2.2.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -934,24 +1083,34 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a"
|
"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c"
|
||||||
|
"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"
|
||||||
"checksum ansi_colours 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0f302a81afc6a7f4350c04f0ba7cfab529cc009bca3324b3fb5764e6add8b6"
|
"checksum ansi_colours 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0f302a81afc6a7f4350c04f0ba7cfab529cc009bca3324b3fb5764e6add8b6"
|
||||||
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||||
"checksum assert_cmd 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5db841dcfb4f172f34ec968f71c4a88e69f5421fb33e0daac6bfe4372317526"
|
"checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392"
|
||||||
|
"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
|
||||||
|
"checksum assert_cmd 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7eaef71d143e8053e28166ea984712b71a5e5d7f26a885809eb829e0c8e4f051"
|
||||||
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
||||||
|
"checksum backtrace 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "18b65ea1161bfb2dd6da6fade5edd4dbd08fba85012123dd333d2fd1b90b2782"
|
||||||
|
"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
|
||||||
"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643"
|
"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643"
|
||||||
"checksum bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2fb9e29e72fd6bc12071533d5dc7664cb01480c59406f656d7ac25c7bd8ff7"
|
"checksum bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2fb9e29e72fd6bc12071533d5dc7664cb01480c59406f656d7ac25c7bd8ff7"
|
||||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||||
"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781"
|
"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
|
||||||
|
"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39"
|
||||||
|
"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d"
|
||||||
"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16"
|
"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16"
|
||||||
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
|
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
|
||||||
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
||||||
"checksum clicolors-control 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f84dec9bc083ce2503908cd305af98bd363da6f54bf8d4bf0ac14ee749ad5d1"
|
"checksum clicolors-control 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73abfd4c73d003a674ce5d2933fca6ce6c42480ea84a5ffe0a2dc39ed56300f9"
|
||||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||||
"checksum console 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd48adf136733979b49e15bc3b4c43cc0d3c85ece7bd08e6daa414c6fcb13e6"
|
"checksum console 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf3720d3f3fc30b721ef1ae54e13af3264af4af39dc476a8de56a6ee1e2184b"
|
||||||
"checksum content_inspector 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f15b971ded7c58a746a1c7441c358800337e08f869f75ddd825672984563fafc"
|
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
|
||||||
|
"checksum content_inspector 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38"
|
||||||
|
"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
|
||||||
"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
|
"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
|
||||||
"checksum directories 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72d337a64190607d4fcca2cb78982c5dd57f4916e19696b48a575fa746b6cb0f"
|
"checksum dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a"
|
||||||
|
"checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd"
|
||||||
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
||||||
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
|
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
|
||||||
"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
|
"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
|
||||||
@@ -960,30 +1119,34 @@ dependencies = [
|
|||||||
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
|
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
|
||||||
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
|
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
|
||||||
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
|
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
|
||||||
"checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5"
|
"checksum escargot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ceb9adbf9874d5d028b5e4c5739d22b71988252b25c9c98fe7cf9738bee84597"
|
||||||
"checksum flate2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4af030962d89d62aa52cd9492083b1cd9b2d1a77764878102a6c0f86b4d5444d"
|
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
|
||||||
|
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
|
||||||
|
"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901"
|
||||||
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
||||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||||
"checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71"
|
"checksum git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7339329bfa14a00223244311560d11f8f489b453fb90092af97f267a6090ab0"
|
||||||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||||
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
|
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
|
||||||
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
|
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
|
||||||
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
||||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||||
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
|
"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
|
||||||
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
|
|
||||||
"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0"
|
"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0"
|
||||||
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
||||||
"checksum libgit2-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4916b5addc78ec36cc309acfcdf0b9f9d97ab7b84083118b248709c5b7029356"
|
"checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1"
|
||||||
"checksum libz-sys 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)" = "c7bdca442aa002a930e6eb2a71916cabe46d91ffec8df66db0abfb1bc83469ab"
|
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
|
||||||
"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
|
"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
|
||||||
"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a"
|
"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a"
|
||||||
"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
|
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
|
||||||
"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
|
"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
|
||||||
"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b"
|
"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"
|
||||||
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
|
"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649"
|
||||||
"checksum onig 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f0d9dac9b8a5211103d75f3ce8d0c799e6f4f3f22608eeaefb4419786e4b258"
|
"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c"
|
||||||
|
"checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e"
|
||||||
|
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||||
|
"checksum onig 4.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3febe8cb22362af9e662c9c35e4d8a675de50b1b119823aa556892ac967fb776"
|
||||||
"checksum onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78c04019a39ebac42dfd8c7822af0a009043720845a812ddbb95e403298b0183"
|
"checksum onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78c04019a39ebac42dfd8c7822af0a009043720845a812ddbb95e403298b0183"
|
||||||
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
||||||
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
|
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
|
||||||
@@ -994,34 +1157,38 @@ dependencies = [
|
|||||||
"checksum predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa984b7cd021a0bf5315bcce4c4ae61d2a535db2a8d288fc7578638690a7b7c3"
|
"checksum predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa984b7cd021a0bf5315bcce4c4ae61d2a535db2a8d288fc7578638690a7b7c3"
|
||||||
"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178"
|
"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178"
|
||||||
"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124"
|
"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124"
|
||||||
"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee"
|
"checksum proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "ab2fc21ba78ac73e4ff6b3818ece00be4e175ffbef4d0a717d978b48b24150c4"
|
||||||
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
|
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
|
||||||
"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5"
|
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
|
||||||
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
||||||
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
|
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
|
||||||
"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372"
|
"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372"
|
||||||
"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db"
|
"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db"
|
||||||
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
||||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||||
"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341"
|
"checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26"
|
||||||
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
"checksum regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ee84f70c8c08744ea9641a731c7fadb475bf2ecc52d7f627feb833e0b3990467"
|
||||||
|
"checksum regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fbc557aac2b708fe84121caf261346cc2eed71978024337e42eb46b8a252ac6e"
|
||||||
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
||||||
|
"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619"
|
||||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||||
"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7"
|
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
|
||||||
"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9"
|
"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9"
|
||||||
"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c"
|
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
|
||||||
|
"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
|
||||||
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
||||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||||
"checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9"
|
"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef"
|
||||||
"checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe"
|
"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c"
|
||||||
"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce"
|
"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811"
|
||||||
"checksum shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39acde55a154c4cd3ae048ac78cc21c25f3a0145e44111b523279113dce0d94a"
|
"checksum shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39acde55a154c4cd3ae048ac78cc21c25f3a0145e44111b523279113dce0d94a"
|
||||||
"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
|
"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
|
||||||
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||||
"checksum syn 0.15.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b10ee269228fb723234fce98e9aac0eaed2bd5f1ad2f6930e8d5b93f04445a1a"
|
"checksum syn 0.15.19 (registry+https://github.com/rust-lang/crates.io-index)" = "39054bb43f2c5e4f3aef47718a391bf397c1b820fefc86f467d4d354f67bf7ef"
|
||||||
"checksum syntect 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b76ed0acb8b4012c8ed2d3df01f018ac25c3fd916914768b4f4a8b8bebe106ff"
|
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
||||||
|
"checksum syntect 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e02dd9df97a68a2d005ace28ff24c610abfc3ce17afcfdb22a077645dabb599a"
|
||||||
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
||||||
"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327"
|
"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327"
|
||||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||||
@@ -1029,19 +1196,19 @@ dependencies = [
|
|||||||
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
|
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
|
||||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||||
"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
|
"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
|
||||||
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
|
"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444"
|
||||||
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
|
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
|
||||||
"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25"
|
"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25"
|
||||||
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
|
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
|
||||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||||
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
||||||
"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6"
|
"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
|
||||||
"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4"
|
"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
|
||||||
"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d"
|
"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d"
|
||||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||||
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
||||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||||
"checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35"
|
"checksum walkdir 2.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0ffb549f212c31e19f3667c55a7f515b983a84aef10fd0a4d1f9c125425115f3"
|
||||||
"checksum wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "690e5dbd46cfaf2f3bd09875ad94e92cc56459fce505807d6ce5332671aa93ae"
|
"checksum wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "690e5dbd46cfaf2f3bd09875ad94e92cc56459fce505807d6ce5332671aa93ae"
|
||||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||||
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
|
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
|
||||||
|
|||||||
+9
-8
@@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
|
|||||||
name = "bat"
|
name = "bat"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/sharkdp/bat"
|
repository = "https://github.com/sharkdp/bat"
|
||||||
version = "0.8.0"
|
version = "0.10.0"
|
||||||
exclude = [
|
exclude = [
|
||||||
"assets/syntaxes/*",
|
"assets/syntaxes/*",
|
||||||
"assets/themes/*",
|
"assets/themes/*",
|
||||||
@@ -18,21 +18,21 @@ build = "build.rs"
|
|||||||
atty = "0.2.2"
|
atty = "0.2.2"
|
||||||
ansi_term = "0.11"
|
ansi_term = "0.11"
|
||||||
ansi_colours = "^1.0"
|
ansi_colours = "^1.0"
|
||||||
console = "0.6"
|
console = "0.7"
|
||||||
directories = "1.0"
|
dirs = "1.0"
|
||||||
lazy_static = "1.0"
|
lazy_static = "1.2"
|
||||||
wild = "2.0"
|
wild = "2.0"
|
||||||
content_inspector = "0.2.3"
|
content_inspector = "0.2.4"
|
||||||
encoding = "0.2"
|
encoding = "0.2"
|
||||||
shell-words = "0.1.0"
|
shell-words = "0.1.0"
|
||||||
|
|
||||||
[dependencies.git2]
|
[dependencies.git2]
|
||||||
version = "0.7"
|
version = "0.8"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = []
|
features = []
|
||||||
|
|
||||||
[dependencies.syntect]
|
[dependencies.syntect]
|
||||||
version = "3.0.1"
|
version = "3.0.2"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["parsing", "yaml-load", "dump-load", "dump-create"]
|
features = ["parsing", "yaml-load", "dump-load", "dump-create"]
|
||||||
|
|
||||||
@@ -48,7 +48,8 @@ features = []
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir = "0.3"
|
tempdir = "0.3"
|
||||||
assert_cmd = "0.10.1"
|
assert_cmd = "0.11.0"
|
||||||
|
escargot = "0.4.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
clap = "2.32"
|
clap = "2.32"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
Copyright (c) 2018 bat-developers (https://github.com/sharkdp/bat).
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
<a href="#how-to-use">How To Use</a> •
|
<a href="#how-to-use">How To Use</a> •
|
||||||
<a href="#installation">Installation</a> •
|
<a href="#installation">Installation</a> •
|
||||||
<a href="#customization">Customization</a> •
|
<a href="#customization">Customization</a> •
|
||||||
<a href="#project-goals-and-alternatives">Project goals, alternatives</a>
|
<a href="#project-goals-and-alternatives">Project goals, alternatives</a> •
|
||||||
|
Translation [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="doc/README-ja.md">日本文</a>]
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### Syntax highlighting
|
### Syntax highlighting
|
||||||
@@ -29,6 +30,13 @@ languages:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Show non-printable characters
|
||||||
|
|
||||||
|
You can use the `-A`/`--show-all` option to show and highlight non-printable
|
||||||
|
characters:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Automatic paging
|
### Automatic paging
|
||||||
|
|
||||||
`bat` can pipe its own output to `less` if the output is too large for one screen.
|
`bat` can pipe its own output to `less` if the output is too large for one screen.
|
||||||
@@ -36,8 +44,9 @@ languages:
|
|||||||
### File concatenation
|
### File concatenation
|
||||||
|
|
||||||
Oh.. you can also use it to concatenate files :wink:. Whenever
|
Oh.. you can also use it to concatenate files :wink:. Whenever
|
||||||
`bat` detects a non-interactive terminal, it will fall back to printing
|
`bat` detects a non-interactive terminal (i.e. when you pipe into another process
|
||||||
the plain file contents.
|
or into a file), `bat` will act as a drop-in replacement for `cat` and
|
||||||
|
fall back to printing the plain file contents.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
@@ -65,8 +74,12 @@ Read from stdin, specify the language explicitly
|
|||||||
> yaml2json .travis.yml | json_pp | bat -l json
|
> yaml2json .travis.yml | json_pp | bat -l json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Show and highlight non-printable characters:
|
||||||
|
```bash
|
||||||
|
> bat -A /etc/hosts
|
||||||
|
```
|
||||||
|
|
||||||
As a replacement for `cat`:
|
Use it as a `cat` replacement:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bat > note.md # quickly create a new file
|
bat > note.md # quickly create a new file
|
||||||
@@ -86,7 +99,7 @@ bat f - g # output 'f', then stdin, then 'g'.
|
|||||||
Download the latest `.deb` package from the [release page](https://github.com/sharkdp/bat/releases)
|
Download the latest `.deb` package from the [release page](https://github.com/sharkdp/bat/releases)
|
||||||
and install it via:
|
and install it via:
|
||||||
``` bash
|
``` bash
|
||||||
sudo dpkg -i bat_0.8.0_amd64.deb # adapt version number and architecture
|
sudo dpkg -i bat_0.10.0_amd64.deb # adapt version number and architecture
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Arch Linux
|
### On Arch Linux
|
||||||
@@ -98,6 +111,14 @@ from the official sources:
|
|||||||
pacman -S bat
|
pacman -S bat
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### On Fedora
|
||||||
|
|
||||||
|
You can install `bat` from the [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/) repository. On Fedora 29 and higher, it is enabled by default. Otherwise, run `dnf install fedora-repos-modular` to set up, and make sure that the `fedora-modular` and `fedora-updates-modular` repos are enabled in `/etc/yum.repos.d`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dnf module install bat
|
||||||
|
```
|
||||||
|
|
||||||
### On Void Linux
|
### On Void Linux
|
||||||
|
|
||||||
You can install `bat` via xbps-install:
|
You can install `bat` via xbps-install:
|
||||||
@@ -128,6 +149,14 @@ You can install `bat` using the [nix package manager](https://nixos.org/nix):
|
|||||||
nix-env -i bat
|
nix-env -i bat
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### On openSUSE
|
||||||
|
|
||||||
|
You can install `bat` with zypper:
|
||||||
|
|
||||||
|
```
|
||||||
|
zypper install bat
|
||||||
|
```
|
||||||
|
|
||||||
### On macOS
|
### On macOS
|
||||||
|
|
||||||
You can install `bat` with [Homebrew](http://braumeister.org/formula/bat):
|
You can install `bat` with [Homebrew](http://braumeister.org/formula/bat):
|
||||||
@@ -187,12 +216,11 @@ This should work with the following distributions:
|
|||||||
|
|
||||||
Check out the [Release page](https://github.com/sharkdp/bat/releases) for
|
Check out the [Release page](https://github.com/sharkdp/bat/releases) for
|
||||||
prebuilt versions of `bat` for many different architectures. Statically-linked
|
prebuilt versions of `bat` for many different architectures. Statically-linked
|
||||||
binaries are available, just look for releases with `musl` in the name on the
|
binaries are also available: look for archives with `musl` in the file name.
|
||||||
releases page.
|
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
If you want to build `bat` from source, you need Rust 1.29 or
|
If you want to build `bat` from source, you need Rust 1.30 or
|
||||||
higher. You can then use `cargo` to build everything:
|
higher. You can then use `cargo` to build everything:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -210,7 +238,8 @@ Use `bat --list-themes` to get a list of all available themes for syntax
|
|||||||
highlighting. To select the `TwoDark` theme, call `bat` with the
|
highlighting. To select the `TwoDark` theme, call `bat` with the
|
||||||
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
|
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
|
||||||
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
|
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
|
||||||
make the change permanent.
|
make the change permanent. Alternatively, use `bat`s
|
||||||
|
[configuration file](https://github.com/sharkdp/bat#configuration-file).
|
||||||
|
|
||||||
If you want to preview the different themes on a custom file, you can use
|
If you want to preview the different themes on a custom file, you can use
|
||||||
the following command (you need [`fzf`](https://github.com/junegunn/fzf) for this):
|
the following command (you need [`fzf`](https://github.com/junegunn/fzf) for this):
|
||||||
@@ -219,16 +248,17 @@ bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
|
|||||||
```
|
```
|
||||||
|
|
||||||
`bat` looks good on a dark background by default. However, if your terminal uses a
|
`bat` looks good on a dark background by default. However, if your terminal uses a
|
||||||
light background, some themes will work better for you. For example, the `GitHub`
|
light background, some themes like `GitHub` or `OneHalfLight` will work better for you.
|
||||||
theme is made for light backgrounds. You can also make your own theme by following the
|
You can also use a custom theme by following the
|
||||||
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
|
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
|
||||||
|
|
||||||
### Output style
|
### Output style
|
||||||
|
|
||||||
You can use the `--style` option to control the appearance of `bat`s output.
|
You can use the `--style` option to control the appearance of `bat`s output.
|
||||||
You can use `--style=numbers,changes`, for example, to show only Git changes
|
You can use `--style=numbers,changes`, for example, to show only Git changes
|
||||||
and line numbers but no grid and no file header. Use the `BAT_STYLE` environment
|
and line numbers but no grid and no file header. Set the `BAT_STYLE` environment
|
||||||
variable to make these changes permanent.
|
variable to make these changes permanent or use `bat`s
|
||||||
|
[configuration file](https://github.com/sharkdp/bat#configuration-file).
|
||||||
|
|
||||||
### Adding new syntaxes / language definitions
|
### Adding new syntaxes / language definitions
|
||||||
|
|
||||||
@@ -240,10 +270,8 @@ and theme. To add new syntax definitions, do the following.
|
|||||||
Create a folder with syntax definition files:
|
Create a folder with syntax definition files:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
BAT_CONFIG_DIR="$(bat cache --config-dir)"
|
mkdir -p "$(bat --config-dir)/syntaxes"
|
||||||
|
cd "$(bat --config-dir)/syntaxes"
|
||||||
mkdir -p "$BAT_CONFIG_DIR/syntaxes"
|
|
||||||
cd "$BAT_CONFIG_DIR/syntaxes"
|
|
||||||
|
|
||||||
# Put new '.sublime-syntax' language definition files
|
# Put new '.sublime-syntax' language definition files
|
||||||
# in this folder (or its subdirectories), for example:
|
# in this folder (or its subdirectories), for example:
|
||||||
@@ -253,7 +281,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
|
|||||||
Now use the following command to parse these files into a binary cache:
|
Now use the following command to parse these files into a binary cache:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bat cache --init
|
bat cache --build
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, use `bat --list-languages` to check if the new languages are available.
|
Finally, use `bat --list-languages` to check if the new languages are available.
|
||||||
@@ -270,16 +298,14 @@ This works very similar to how we add new syntax definitions.
|
|||||||
|
|
||||||
First, create a folder with the new syntax highlighting themes:
|
First, create a folder with the new syntax highlighting themes:
|
||||||
```bash
|
```bash
|
||||||
BAT_CONFIG_DIR="$(bat cache --config-dir)"
|
mkdir -p "$(bat --config-dir)/themes"
|
||||||
|
cd "$(bat --config-dir)/themes"
|
||||||
mkdir -p "$BAT_CONFIG_DIR/themes"
|
|
||||||
cd "$BAT_CONFIG_DIR/themes"
|
|
||||||
|
|
||||||
# Download a theme in '.tmTheme' format, for example:
|
# Download a theme in '.tmTheme' format, for example:
|
||||||
git clone https://github.com/greggb/sublime-snazzy
|
git clone https://github.com/greggb/sublime-snazzy
|
||||||
|
|
||||||
# Update the binary cache
|
# Update the binary cache
|
||||||
bat cache --init
|
bat cache --build
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, use `bat --list-themes` to check if the new themes are available.
|
Finally, use `bat --list-themes` to check if the new themes are available.
|
||||||
@@ -291,18 +317,17 @@ set, `less` is used by default. If you want to use a different pager, you can ei
|
|||||||
`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
|
`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
|
||||||
`PAGER`.
|
`PAGER`.
|
||||||
|
|
||||||
If you want to pass command-line arguments to the pager, you need to create a small shell
|
If you want to pass command-line arguments to the pager, you can also set them via the
|
||||||
script as a wrapper, for example
|
`PAGER`/`BAT_PAGER` variables:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
export BAT_PAGER="less -RF"
|
||||||
|
|
||||||
less --tabs 4 -R "$@"
|
|
||||||
```
|
```
|
||||||
(put this in a file `~/.bat-pager.sh`, make it executable `chmod +x ~/.bat-pager.sh` and use
|
|
||||||
`export BAT_PAGER="$HOME/.bat-pager.sh"` in your shells `rc` file)
|
|
||||||
|
|
||||||
**Note**: By default, if the pager is set to `less`, `bat` will pass the following command line
|
Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
|
||||||
|
|
||||||
|
**Note**: By default, if the pager is set to `less` (and no command-line options are specified),
|
||||||
|
`bat` will pass the following command line
|
||||||
options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`.
|
options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`.
|
||||||
The first (`-R`) is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
|
The first (`-R`) is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
|
||||||
less to exit immediately if the output size is smaller than the vertical size of the terminal.
|
less to exit immediately if the output size is smaller than the vertical size of the terminal.
|
||||||
@@ -315,6 +340,46 @@ will hopefully enable both quit-if-one-screen and mouse-wheel scrolling.
|
|||||||
|
|
||||||
If scrolling still doesn't work for you, you can try to pass the `-S` option in addition.
|
If scrolling still doesn't work for you, you can try to pass the `-S` option in addition.
|
||||||
|
|
||||||
|
## Configuration file
|
||||||
|
|
||||||
|
`bat` can also be customized with a configuration file. The location of the file is dependent
|
||||||
|
on your operating system. To get the default path for your system, call
|
||||||
|
```
|
||||||
|
bat --config-file
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can use the `BAT_CONFIG_PATH` environment variable to point `bat` to a
|
||||||
|
non-default location of the configuration file:
|
||||||
|
```bash
|
||||||
|
export BAT_CONFIG_PATH="/path/to/bat.conf"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Format
|
||||||
|
|
||||||
|
The configuration file is a simple list of command line arguments. Use `bat --help` to see a full list of possible options and values. In addition, you can add comments by prepending a line with the `#` character.
|
||||||
|
|
||||||
|
Example configuration file:
|
||||||
|
```bash
|
||||||
|
# Set the theme to "TwoDark"
|
||||||
|
--theme="TwoDark"
|
||||||
|
|
||||||
|
# Show line numbers, Git modifications and file header (but no grid)
|
||||||
|
--style="numbers,changes,header"
|
||||||
|
|
||||||
|
# Use italic text on the terminal (not supported on all terminals)
|
||||||
|
--italic-text=always
|
||||||
|
|
||||||
|
# Add mouse scrolling support in less (does not work with older
|
||||||
|
# versions of "less")
|
||||||
|
--pager="less -FR"
|
||||||
|
|
||||||
|
# Use C++ syntax (instead of C) for .h header files
|
||||||
|
--map-syntax h:cpp
|
||||||
|
|
||||||
|
# Use "gitignore" highlighting for ".ignore" files
|
||||||
|
--map-syntax .ignore:.gitignore
|
||||||
|
```
|
||||||
|
|
||||||
## Using `bat` on Windows
|
## Using `bat` on Windows
|
||||||
|
|
||||||
`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.
|
`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.
|
||||||
@@ -326,14 +391,14 @@ for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.ht
|
|||||||
Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
|
Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
|
||||||
your `PATH` or [define an environment variable](#using-a-different-pager).
|
your `PATH` or [define an environment variable](#using-a-different-pager).
|
||||||
|
|
||||||
### Colours
|
### Colors
|
||||||
|
|
||||||
Windows 10 natively supports colours in both `conhost.exe` (Command Prompt) and PowerShell since
|
Windows 10 natively supports colors in both `conhost.exe` (Command Prompt) and PowerShell since
|
||||||
[v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as
|
[v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as
|
||||||
well as in newer versions of bash. On earlier versions of Windows, you can use
|
well as in newer versions of bash. On earlier versions of Windows, you can use
|
||||||
[Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/).
|
[Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/).
|
||||||
|
|
||||||
**Note:** The Git and MSYS versions of `less` do not correctly interpret colours on Windows. If you
|
**Note:** The Git and MSYS versions of `less` do not correctly interpret colors on Windows. If you
|
||||||
don’t have any other pagers installed, you can disable paging entirely by passing `--paging=never`
|
don’t have any other pagers installed, you can disable paging entirely by passing `--paging=never`
|
||||||
or by setting `BAT_PAGER` to an empty string.
|
or by setting `BAT_PAGER` to an empty string.
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
* linguist-vendored
|
||||||
Vendored
+9
-2
@@ -13,12 +13,15 @@ In order to add new syntaxes to `bat`, follow these steps:
|
|||||||
Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
|
Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
|
||||||
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
|
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
|
||||||
|
|
||||||
3. Run the `create.sh` script. It calls `bat cache --init` to parse all available
|
3. Run the `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 (in this folder).
|
||||||
|
|
||||||
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
|
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
|
||||||
`bat` binary.
|
`bat` binary.
|
||||||
|
|
||||||
|
5. 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`.
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
Make sure that the local cache does not interfere with the internally stored syntaxes and
|
Make sure that the local cache does not interfere with the internally stored syntaxes and
|
||||||
@@ -29,4 +32,8 @@ themes (`bat cache --clear`).
|
|||||||
The following files have been manually modified after converting from a `.tmLanguage` file:
|
The following files have been manually modified after converting from a `.tmLanguage` file:
|
||||||
|
|
||||||
* `Dart.sublime-syntax` => removed `#regex.dart` include.
|
* `Dart.sublime-syntax` => removed `#regex.dart` include.
|
||||||
* `INI.sublime-syntax` => added `.hgrc` and `hgrc` file types.
|
* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
|
||||||
|
|
||||||
|
### Non-submodule additions
|
||||||
|
|
||||||
|
* `Assembly (x86_64)` has been manually added from https://github.com/13xforever/x86-assembly-textmate-bundle due to `git clone` recursion problems
|
||||||
|
|||||||
Vendored
+2
-2
@@ -6,11 +6,11 @@ ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
bat cache --clear
|
bat cache --clear
|
||||||
|
|
||||||
# TODO: Remove this (and the reverse part below) when
|
# TODO: Remove this (and the reverse part below) when
|
||||||
# https://github.com/trishume/syntect/issues/160 has been fixed
|
# https://github.com/trishume/syntect/issues/222 has been fixed
|
||||||
JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
|
JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
|
||||||
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
|
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
|
||||||
patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
|
patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
|
||||||
|
|
||||||
bat cache --init --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
|
bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
|
||||||
|
|
||||||
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"
|
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
Submodule assets/syntaxes/AsciiDoc added at d0089991e5
+283
@@ -0,0 +1,283 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: AsciiDoc
|
||||||
|
comment: |
|
||||||
|
A very early hack. Mostly ripped from other syntaxes.
|
||||||
|
Only the very basic stuff is working.
|
||||||
|
file_extensions:
|
||||||
|
- adoc
|
||||||
|
- asciidoc
|
||||||
|
- asc
|
||||||
|
scope: text.html.asciidoc
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: heading_inline
|
||||||
|
- include: heading-block
|
||||||
|
- include: heading-blockattr
|
||||||
|
- match: \$\$(?!\$)
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.passthrough.macro.doubledollar.asciidoc
|
||||||
|
- match: \$\$(?!\$)
|
||||||
|
pop: true
|
||||||
|
- match: \+\+\+(?!\+)
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.passthrough.macro.tripeplus.asciidoc
|
||||||
|
- match: \+\+\+(?!\+)
|
||||||
|
pop: true
|
||||||
|
- match: (//).*$\n?
|
||||||
|
scope: comment.line.double-slash.asciidoc
|
||||||
|
- match: |-
|
||||||
|
(?x)^
|
||||||
|
(?= ([/+-.*_=]{4,})\s*$
|
||||||
|
| ([ \t]{1,})
|
||||||
|
| [=]{1,6}\s*+
|
||||||
|
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
|
||||||
|
)
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block-level.asciidoc
|
||||||
|
- match: |-
|
||||||
|
(?x)^
|
||||||
|
(?! \1
|
||||||
|
| ([ \t]{1,})
|
||||||
|
| [=]{1,6}\s*+
|
||||||
|
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
|
||||||
|
)
|
||||||
|
pop: true
|
||||||
|
- include: block_quote
|
||||||
|
- include: block_raw
|
||||||
|
- include: heading_inline
|
||||||
|
- include: heading-block
|
||||||
|
- include: separator
|
||||||
|
- match: '^[ ]{0,3}([*+-])(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.list.unnumbered.asciidoc
|
||||||
|
- match: ^(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: list-paragraph
|
||||||
|
- match: '^[ ]{0,3}[0-9]+(\.)(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.list.numbered.asciidoc
|
||||||
|
- match: ^(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: list-paragraph
|
||||||
|
- match: '^([/+-.*_=]){4,}\s*$'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.asciidoc
|
||||||
|
- match: '^\1{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
- match: '^([/+.]){4,}\s*$'
|
||||||
|
comment: asciidoc formatting is disabled inside certain blocks.
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.disable-asciidoc
|
||||||
|
- match: '^[/+.]{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
- match: '^(?=\S)(?![=-]{3,}(?=$))(?!\.\S+)'
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.paragraph.asciidoc
|
||||||
|
- match: '^(?:\s*$|(?=[ ]{,3}>.))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n'
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
- include: scope:text.html.basic
|
||||||
|
- match: '^(={3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.0.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(-{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.1.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(~{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.2.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(\^{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.3.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(\+{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.4.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
attribute-entry:
|
||||||
|
- match: '^:[-_. A-Za-z0-9]+:\s*(.*)\s*$'
|
||||||
|
scope: variable.other
|
||||||
|
attribute-reference:
|
||||||
|
- match: "{[-_. A-Za-z0-9]+}"
|
||||||
|
scope: variable.other
|
||||||
|
attribute-reference-predefined:
|
||||||
|
- match: "{(?i:amp|asciidoc-dir|asciidoc-file|asciidoc-version|author|authored|authorinitials|backend-docbook|backend-xhtml11|backend-html4|docbook-article|xhtml11-article|html4-article|docbook-book|xhtml11-book|html4-book|docbook-manpage|xhtml11-manpage|html4-manpage|backend|backslash|basebackend|brvbar|date|docdate|doctime|docname|docfile|docdir|doctitle|doctype-article|doctype-book|doctype-manpage|doctype|email|empty|encoding|filetype|firstname|gt|id|indir|infile|lastname|level|listindex|localdate|localtime|lt|manname|manpurpose|mantitle|manvolnum|middlename|nbsp|outdir|outfile|reftext|revision|sectnum|showcomments|title|two_colons|two_semicolons|user-dir|verbose)}"
|
||||||
|
scope: support.variable
|
||||||
|
block_quote:
|
||||||
|
- match: '^([/+-.*_=]){4,}\s*$'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.asciidoc
|
||||||
|
- match: '^\1{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
block_raw:
|
||||||
|
- match: '\G([ ]{4}|\t).*$\n?'
|
||||||
|
scope: markup.raw.block.asciidoc
|
||||||
|
bracket:
|
||||||
|
- match: '<(?![a-z/?\$!])'
|
||||||
|
comment: |
|
||||||
|
asciidoc will convert this for us. We match it so that the
|
||||||
|
HTML grammar will not mark it up as invalid.
|
||||||
|
scope: meta.other.valid-bracket.asciidoc
|
||||||
|
character-replacements:
|
||||||
|
- match: \(C\)|\(R\)|\(TM\)|--(?!-)|\.\.\.(?!\.)|->|<-|=>|<=
|
||||||
|
scope: constant.character.asciidoc
|
||||||
|
escape:
|
||||||
|
- match: '\\[-`*_#+.!(){}\[\]\\>:]'
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
heading:
|
||||||
|
- match: '(?m)^(\S+)$([=-~^+])+\s*$'
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading-block:
|
||||||
|
- match: ^\.(\w.*)$
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading-blockattr:
|
||||||
|
- match: '^\[\[?(\w.*)\]$'
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading_inline:
|
||||||
|
- match: '\G(={1,6})(?!=)\s*(?=\S)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.heading.asciidoc
|
||||||
|
- meta_content_scope: entity.name.section.asciidoc
|
||||||
|
- match: \s*(=*)$\n?
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
inline:
|
||||||
|
- include: line-break
|
||||||
|
- include: line-page-break
|
||||||
|
- include: line-ruler
|
||||||
|
- include: escape
|
||||||
|
- include: passthrough-macro-trippleplus-inline
|
||||||
|
- include: passthrough-macro-doubledollar-inline
|
||||||
|
- include: character-replacements
|
||||||
|
- include: bracket
|
||||||
|
- include: raw
|
||||||
|
- include: text-quote-single
|
||||||
|
- include: text-quote-double
|
||||||
|
- include: text-quote-other
|
||||||
|
- include: text-bold-unconstrained
|
||||||
|
- include: text-italic-unconstrained
|
||||||
|
- include: text-monospace-unconstrained
|
||||||
|
- include: text-unquoted-unconstrained
|
||||||
|
- include: text-bold
|
||||||
|
- include: text-italic
|
||||||
|
- include: text-monospace
|
||||||
|
- include: text-unquoted
|
||||||
|
- include: attribute-entry
|
||||||
|
- include: attribute-reference-predefined
|
||||||
|
- include: attribute-reference
|
||||||
|
line-break:
|
||||||
|
- match: (?<=\S)\s+\+$
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
line-page-break:
|
||||||
|
- match: "^<{3,}$"
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
line-ruler:
|
||||||
|
- match: "^'{3,}$"
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
list-paragraph:
|
||||||
|
- match: \G\s+(?=\S)
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.paragraph.list.asciidoc
|
||||||
|
- match: ^\s*$
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
passthrough-macro-doubledollar-inline:
|
||||||
|
- match: '(?:\[.*\])?\$\$(?!\$).+\$\$(?!\$)'
|
||||||
|
scope: comment.block.passthrough.asciidoc
|
||||||
|
passthrough-macro-trippleplus-inline:
|
||||||
|
- match: '(?:\[.*\])?\+\+\+(?!\+).+\+\+\+(?!\+)'
|
||||||
|
scope: comment.block.passthrough.asciidoc
|
||||||
|
raw:
|
||||||
|
- match: '(`+)(?:[^`]|(?!(?<!`)\1(?!`))`)*+(\1)'
|
||||||
|
scope: markup.raw.inline.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.raw.asciidoc
|
||||||
|
2: punctuation.definition.raw.asciidoc
|
||||||
|
separator:
|
||||||
|
- match: '\G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n?'
|
||||||
|
scope: meta.separator.asciidoc
|
||||||
|
text-bold:
|
||||||
|
- match: (?<!\w)(\*)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.bold.asciidoc
|
||||||
|
- match: (?<=\S)(\1)(?!\w)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-bold-unconstrained:
|
||||||
|
- match: (\*\*)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.bold.asciidoc
|
||||||
|
- match: (?<=\S)(\1)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-italic:
|
||||||
|
- match: (?<!\w)('|_)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.asciidoc
|
||||||
|
- match: (?<=\S)(\1)((?!\1)|(?=\1\1))(?!\w)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-italic-unconstrained:
|
||||||
|
- match: (__)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.asciidoc
|
||||||
|
- match: (?<=\S)(\1)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-monospace:
|
||||||
|
- match: '(?<!\w)([\+`])[^\+]*(\1)(?!\w)'
|
||||||
|
scope: string.interpolated.asciidoc
|
||||||
|
text-monospace-unconstrained:
|
||||||
|
- match: (\+\+).*(\1)
|
||||||
|
scope: string.interpolated.asciidoc
|
||||||
|
text-quote-double:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?``(?!`).*''''(?!'')(?!\w)'
|
||||||
|
scope: string.quoted.double.asciidoc
|
||||||
|
text-quote-other:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?([~^]).*(\1)(?!\w)'
|
||||||
|
scope: string.quoted.single.asciidoc
|
||||||
|
text-quote-single:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?`(?!`).*''(?!'')(?!\w)'
|
||||||
|
comment: "TODO: Sub- and Superscript are really unconstrained"
|
||||||
|
scope: string.quoted.single.asciidoc
|
||||||
|
text-unquoted:
|
||||||
|
- match: (?<!\w)(#).*(\1)(?!\w)
|
||||||
|
scope: string.unquoted.asciidoc
|
||||||
|
text-unquoted-unconstrained:
|
||||||
|
- match: (##).*(\1)
|
||||||
|
scope: string.unquoted.asciidoc
|
||||||
+1
Submodule assets/syntaxes/Assembly (ARM) added at 08f33d80de
+172
@@ -0,0 +1,172 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: ARM Assembly
|
||||||
|
file_extensions:
|
||||||
|
- s
|
||||||
|
- S
|
||||||
|
scope: source.asm.arm
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: "@.*$"
|
||||||
|
scope: comment.line
|
||||||
|
- match: //.*$
|
||||||
|
scope: comment.line
|
||||||
|
- match: ;.*$
|
||||||
|
scope: comment.line
|
||||||
|
- match: ^\s*\#\s*if\s+0\b
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.preprocessor
|
||||||
|
- match: ^\s*\#\s*endif\b
|
||||||
|
pop: true
|
||||||
|
- match: /\*
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block
|
||||||
|
- match: \*/
|
||||||
|
pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
^\s*\#\s*(define)\s+ # define
|
||||||
|
((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name
|
||||||
|
(?: # and optionally:
|
||||||
|
(\() # an open parenthesis
|
||||||
|
(
|
||||||
|
\s* \g<id> \s* # first argument
|
||||||
|
((,) \s* \g<id> \s*)* # additional arguments
|
||||||
|
(?:\.\.\.)? # varargs ellipsis?
|
||||||
|
)
|
||||||
|
(\)) # a close parenthesis
|
||||||
|
)?
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.define.c
|
||||||
|
2: entity.name.function.preprocessor.c
|
||||||
|
4: punctuation.definition.parameters.c
|
||||||
|
5: variable.parameter.preprocessor.c
|
||||||
|
7: punctuation.separator.parameters.c
|
||||||
|
8: punctuation.definition.parameters.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.macro.c
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- include: $top_level_main
|
||||||
|
- match: ^\s*#\s*(error|warning)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.error.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.diagnostic.c
|
||||||
|
- match: $
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.error.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: ^\s*#\s*(include|import)\b\s+
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.include.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.c.include
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.include.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.c
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.include.c
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.c
|
||||||
|
pop: true
|
||||||
|
- match: <
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.c
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.other.lt-gt.include.c
|
||||||
|
- match: ">"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.c
|
||||||
|
pop: true
|
||||||
|
- match: '((?i)([xw][0-9]|[xw]1[0-9]||[xw]2[0-9]|[wx]30|wzr|xzr|wsp|fpsr|fpcr|[rcp]1[0-5]|[rcp][0-9]|a[1-4]|v[1-8]|sl|sb|fp|ip|sp|lr|(c|s)psr(_c)?|pc|[sd]3[0-1]|[sd][12][0-9]|[sd][0-9]|fpsid|fpscr|fpexc|q3[0-1]|q2[0-9]|q1[0-9]|q[0-9]|APSR_nzcv|sy)!?(?-i))?\b'
|
||||||
|
scope: storage.other.register
|
||||||
|
- match: \.(?i)(globl|global|macro|endm|purgem|if|elseif|else|endif|section|text|arm|align|balign|irp|rept|endr|req|unreq|error|short|func|endfunc|hidden|type|fpu|arch|code|altmacro|object_arch|word|int|string)(?-i)\b
|
||||||
|
scope: keyword.control.directive
|
||||||
|
- match: armv(2a?|3m?|4t?|5t?e?6(j|t2|zk?|-m)?|7v?e?(-(a|r|m))?|8-a(\+crc)?)
|
||||||
|
scope: keyword.control.arch.arm
|
||||||
|
- match: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef|endif)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.c
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: |-
|
||||||
|
(?x)\b((?i)
|
||||||
|
(
|
||||||
|
(bf(c|i)|(u|s)bfx|(u|s)xta?(h|b)?) |
|
||||||
|
(v(add|cvt|sub|mov|trn|cmp|div|qdmulh|mrs|mul|ld1|qadd|qshrun|st[1234]|addw|mull|mlal|rshrn|swp|qmovun)|qmovun)(\.([isup]?8|[isupf]?16|[isuf]?32|[isu]?64))* |
|
||||||
|
(and|m(rs|sr)|eor|sub|rsb|add|adc|sbc|rsc|tst|teq|cmp|cmn|orr|mov|bic|mvn |
|
||||||
|
(neg) |
|
||||||
|
(lsr|lsl|ror|asr) # shift ops either pseudo ops or actual shifts
|
||||||
|
)s? |
|
||||||
|
(mul|mla|mull|smlabb) |
|
||||||
|
(mov(w|t)) |
|
||||||
|
rev(8|16)? |
|
||||||
|
(pld|adr|adrl|vswp)
|
||||||
|
)
|
||||||
|
(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
|
||||||
|
scope: support.function.mnemonic.arithmetic
|
||||||
|
- match: |-
|
||||||
|
(?x)\b((?i)(
|
||||||
|
swi|svc|wfi|
|
||||||
|
dmb | clrex | dsb | isb |
|
||||||
|
v(ldr|str|push|pop) |
|
||||||
|
(push|pop) |
|
||||||
|
(st|ld)(
|
||||||
|
p |
|
||||||
|
r(ex|s?(h|b)|d)? |
|
||||||
|
m(
|
||||||
|
(f|e)(d|a) |
|
||||||
|
(d|i)(b|a)
|
||||||
|
)?
|
||||||
|
) |
|
||||||
|
b(l|x|lx|lr|r)? |
|
||||||
|
(i|e)?ret|
|
||||||
|
b\.(eq|ne|hs|cs|lo|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|nv)+ |
|
||||||
|
(c|t)?bn?z|
|
||||||
|
)+(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))\b
|
||||||
|
scope: support.function.mnemonic.memory
|
||||||
|
- match: '\b((?i)(def(b|w|s)|equ|(include|get)(\s+([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*?)\.s)?)?(?-i))\b'
|
||||||
|
scope: meta.preprocessor.c.include
|
||||||
|
- match: \b((?i)(align)(?-i))?\b
|
||||||
|
scope: storage.type.c.memaccess
|
||||||
|
- match: \s+\".+\"
|
||||||
|
scope: string
|
||||||
|
- match: \b((?i)nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
|
||||||
|
scope: comment.nop
|
||||||
|
- match: '\s\['
|
||||||
|
push:
|
||||||
|
- meta_scope: storage.type.c.memaccess
|
||||||
|
- match: '\]'
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- include: $top_level_main
|
||||||
|
- match: (\b|\s+)\=\b
|
||||||
|
scope: keyword.control.evaluation
|
||||||
|
- match: '(\b|\s+)(\#)?-?(0x|&)[0-9a-fA-F_]+\b'
|
||||||
|
scope: constant.numeric.hex
|
||||||
|
- match: '(\b|\s+)\#-?[0-9a-zA-Z_]+\b'
|
||||||
|
scope: constant.numeric.literal
|
||||||
|
- match: '(\b|\s+)[0-9]+\b'
|
||||||
|
scope: constant.numeric.dec
|
||||||
|
- match: '\b([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*)\b'
|
||||||
|
scope: meta.function.source.arm.label
|
||||||
+1367
File diff suppressed because it is too large
Load Diff
+662
@@ -0,0 +1,662 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: HTML (Twig)
|
||||||
|
file_extensions:
|
||||||
|
- twig
|
||||||
|
- html.twig
|
||||||
|
scope: text.html.twig
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '(<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.any.html
|
||||||
|
- match: (>(<)/)(\2)(>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: meta.scope.between-tag-pair.html
|
||||||
|
3: entity.name.tag.html
|
||||||
|
4: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (<\?)(xml)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.xml.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.preprocessor.xml.html
|
||||||
|
- match: (\?>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.xml.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-generic-attribute
|
||||||
|
- include: string-double-quoted
|
||||||
|
- include: string-single-quoted
|
||||||
|
- match: <!--
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.html
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.html
|
||||||
|
- match: '--\s*>'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.html
|
||||||
|
pop: true
|
||||||
|
- match: "--"
|
||||||
|
scope: invalid.illegal.bad-comments-or-CDATA.html
|
||||||
|
- include: embedded-code
|
||||||
|
- match: <!
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.sgml.html
|
||||||
|
- match: ">"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- match: (?i:DOCTYPE)
|
||||||
|
captures:
|
||||||
|
1: entity.name.tag.doctype.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.sgml.doctype.html
|
||||||
|
- match: (?=>)
|
||||||
|
captures:
|
||||||
|
1: entity.name.tag.doctype.html
|
||||||
|
pop: true
|
||||||
|
- match: '"[^">]*"'
|
||||||
|
scope: string.quoted.double.doctype.identifiers-and-DTDs.html
|
||||||
|
- match: '\[CDATA\['
|
||||||
|
push:
|
||||||
|
- meta_scope: constant.other.inline-data.html
|
||||||
|
- match: "]](?=>)"
|
||||||
|
pop: true
|
||||||
|
- match: (\s*)(?!--|>)\S(\s*)
|
||||||
|
scope: invalid.illegal.bad-comments-or-CDATA.html
|
||||||
|
- include: embedded-code
|
||||||
|
- match: '(?:^\s+)?(<)((?i:style))\b(?![^>]*/>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.style.html
|
||||||
|
3: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: source.css.embedded.html
|
||||||
|
- match: (</)((?i:style))(>)(?:\s*\n)?
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.style.html
|
||||||
|
3: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- match: (?=</(?i:style))
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: scope:source.css
|
||||||
|
- match: '(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
push:
|
||||||
|
- meta_scope: source.js.embedded.html
|
||||||
|
- match: (?<=</(script|SCRIPT))(>)(?:\s*\n)?
|
||||||
|
captures:
|
||||||
|
2: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (?<!</(?:script|SCRIPT))(>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
push:
|
||||||
|
- match: (</)((?i:script))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
pop: true
|
||||||
|
- match: (//).*?((?=</script)|$\n?)
|
||||||
|
scope: comment.line.double-slash.js
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.js
|
||||||
|
- match: /\*
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.js
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.js
|
||||||
|
- match: \*/|(?=</script)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.js
|
||||||
|
pop: true
|
||||||
|
- include: php
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
- include: scope:source.js
|
||||||
|
- match: (</?)((?i:body|head|html)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.structure.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.structure.any.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.structure.any.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.block.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.block.any.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.inline.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.inline.any.html
|
||||||
|
- match: "((?: ?/)?>)"
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: "(</?)([a-zA-Z0-9:]+)"
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.other.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.other.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- include: entities
|
||||||
|
- match: <>
|
||||||
|
scope: invalid.illegal.incomplete.html
|
||||||
|
- match: <
|
||||||
|
scope: invalid.illegal.bad-angle-bracket.html
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
embedded-code:
|
||||||
|
- include: ruby
|
||||||
|
- include: php
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
- include: python
|
||||||
|
entities:
|
||||||
|
- match: "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"
|
||||||
|
scope: constant.character.entity.html
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.entity.html
|
||||||
|
3: punctuation.definition.entity.html
|
||||||
|
- match: "&"
|
||||||
|
scope: invalid.illegal.bad-ampersand.html
|
||||||
|
php:
|
||||||
|
- match: (?=(^\s*)?<\?)
|
||||||
|
push:
|
||||||
|
- match: (?!(^\s*)?<\?)
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.html.php
|
||||||
|
python:
|
||||||
|
- match: (?:^\s*)<\?python(?!.*\?>)
|
||||||
|
push:
|
||||||
|
- meta_scope: source.python.embedded.html
|
||||||
|
- match: \?>(?:\s*$\n)?
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.python
|
||||||
|
ruby:
|
||||||
|
- match: "<%+#"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.erb
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.erb
|
||||||
|
- match: "%>"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.erb
|
||||||
|
pop: true
|
||||||
|
- match: <%+(?!>)=?
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby
|
||||||
|
push:
|
||||||
|
- meta_scope: source.ruby.embedded.html
|
||||||
|
- match: "-?%>"
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby
|
||||||
|
pop: true
|
||||||
|
- match: (#).*?(?=-?%>)
|
||||||
|
scope: comment.line.number-sign.ruby
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.ruby
|
||||||
|
- include: scope:source.ruby
|
||||||
|
- match: <\?r(?!>)=?
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby.nitro
|
||||||
|
push:
|
||||||
|
- meta_scope: source.ruby.nitro.embedded.html
|
||||||
|
- match: '-?\?>'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby.nitro
|
||||||
|
pop: true
|
||||||
|
- match: (#).*?(?=-?\?>)
|
||||||
|
scope: comment.line.number-sign.ruby.nitro
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.ruby.nitro
|
||||||
|
- include: scope:source.ruby
|
||||||
|
string-double-quoted:
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.html
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
string-single-quoted:
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.html
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
tag-generic-attribute:
|
||||||
|
- match: '\b([a-zA-Z\-:]+)'
|
||||||
|
scope: entity.other.attribute-name.html
|
||||||
|
tag-id-attribute:
|
||||||
|
- match: \b(id)\b\s*(=)
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.id.html
|
||||||
|
2: punctuation.separator.key-value.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.attribute-with-value.id.html
|
||||||
|
- match: (?<='|")
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.id.html
|
||||||
|
2: punctuation.separator.key-value.html
|
||||||
|
pop: true
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.html
|
||||||
|
- meta_content_scope: meta.toc-list.id.html
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.html
|
||||||
|
- meta_content_scope: meta.toc-list.id.html
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
tag-stuff:
|
||||||
|
- include: tag-id-attribute
|
||||||
|
- include: tag-generic-attribute
|
||||||
|
- include: string-double-quoted
|
||||||
|
- include: string-single-quoted
|
||||||
|
- include: embedded-code
|
||||||
|
twig-arrays:
|
||||||
|
- match: '(?<=[\s\(\{\[:,])\['
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.array.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.array.twig
|
||||||
|
- match: '\]'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.array.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- match: ","
|
||||||
|
scope: punctuation.separator.object.twig
|
||||||
|
twig-comment-tag:
|
||||||
|
- match: '\{#-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.twig
|
||||||
|
- match: '-?#\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.end.twig
|
||||||
|
pop: true
|
||||||
|
twig-constants:
|
||||||
|
- match: '(?i)(?<=[\s\[\(\{:,])(?:true|false|null|none)(?=[\s\)\]\}\,])'
|
||||||
|
scope: constant.language.twig
|
||||||
|
- match: '(?<=[\s\[\(\{:,]|\.\.|\*\*)[0-9]+(?:\.[0-9]+)?(?=[\s\)\]\}\,]|\.\.|\*\*)'
|
||||||
|
scope: constant.numeric.twig
|
||||||
|
twig-filters:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\s\|\]\}\):,]|\.\.|\*\*)'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
twig-filters-ud:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)'
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.other.twig
|
||||||
|
twig-filters-warg:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\()'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-filters-warg-ud:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\()'
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.other.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-functions:
|
||||||
|
- match: (?<=is\s)(defined|empty|even|iterable|odd)
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
twig-functions-warg:
|
||||||
|
- match: '(?<=[\s\(\[\{:,])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\()'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
twig-hashes:
|
||||||
|
- match: '(?<=[\s\(\{\[:,])\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.hash.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.hash.twig
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.hash.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-hashes
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- match: ":"
|
||||||
|
scope: punctuation.separator.key-value.twig
|
||||||
|
- match: ","
|
||||||
|
scope: punctuation.separator.object.twig
|
||||||
|
twig-keywords:
|
||||||
|
- match: (?<=\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\s)
|
||||||
|
scope: keyword.control.twig
|
||||||
|
twig-macros:
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[\s\(\[\{:,])
|
||||||
|
([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(?:
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
)?
|
||||||
|
(\()
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.twig
|
||||||
|
2: punctuation.separator.property.twig
|
||||||
|
3: variable.other.property.twig
|
||||||
|
4: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-objects:
|
||||||
|
- match: '(?<=[\s\{\[\(:,])([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?=[\s\}\[\]\(\)\.\|,:])'
|
||||||
|
captures:
|
||||||
|
1: variable.other.twig
|
||||||
|
twig-operators:
|
||||||
|
- match: (?<=\s)(\+|-|//?|%|\*\*?)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.arithmetic.twig
|
||||||
|
- match: (?<=\s)(=|~)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.twig
|
||||||
|
- match: (?<=\s)(b-(?:and|or|xor))(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.bitwise.twig
|
||||||
|
- match: '(?<=\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.comparison.twig
|
||||||
|
- match: (?<=\s)(\?|:|and|not|or)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.logical.twig
|
||||||
|
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\)''"])\.\.(?=[a-zA-Z0-9_\x{7f}-\x{ff}''"])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.other.twig
|
||||||
|
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\}\)''"])\|(?=[a-zA-Z_\x{7f}-\x{ff}])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.other.twig
|
||||||
|
twig-print-tag:
|
||||||
|
- match: '\{\{-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.template.value.twig
|
||||||
|
- match: '-?\}\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-properties:
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(?=[\.\s\|\[\)\]\}:,])
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.property.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(\()
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.property.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
3: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]])
|
||||||
|
(?:
|
||||||
|
(\[)('[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*')(\])
|
||||||
|
|(\[)("[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*")(\])
|
||||||
|
|(\[)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\])
|
||||||
|
)
|
||||||
|
captures:
|
||||||
|
1: punctuation.section.array.begin.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
3: punctuation.section.array.end.twig
|
||||||
|
4: punctuation.section.array.begin.twig
|
||||||
|
5: variable.other.property.twig
|
||||||
|
6: punctuation.section.array.end.twig
|
||||||
|
7: punctuation.section.array.begin.twig
|
||||||
|
8: variable.other.property.twig
|
||||||
|
9: punctuation.section.array.end.twig
|
||||||
|
twig-statement-tag:
|
||||||
|
- match: '\{%-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.template.block.twig
|
||||||
|
- match: '-?%\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-keywords
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-strings:
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.twig
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.twig
|
||||||
|
pop: true
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.twig
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.twig
|
||||||
|
pop: true
|
||||||
Vendored
+1
@@ -12,6 +12,7 @@ file_extensions:
|
|||||||
- lng
|
- lng
|
||||||
- cfg
|
- cfg
|
||||||
- CFG
|
- CFG
|
||||||
|
- desktop
|
||||||
- url
|
- url
|
||||||
- URL
|
- URL
|
||||||
- .editorconfig
|
- .editorconfig
|
||||||
|
|||||||
+1
Submodule assets/syntaxes/Jsonnet added at 80775c616e
Vendored
+1
-1
Submodule assets/syntaxes/Packages updated: 289782ff2e...c1a7427015
+1
Submodule assets/syntaxes/Protobuf added at 5115c1c59a
+1
Submodule assets/syntaxes/Syslog added at 7628d4e0b8
Vendored
+1
-1
Submodule assets/syntaxes/TOML updated: b5e3064e99...4e74b2b41b
+1
Submodule assets/syntaxes/Terraform added at 3227a2d2a2
@@ -0,0 +1,27 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Highlight non-printables
|
||||||
|
file_extensions:
|
||||||
|
- show-nonprintable
|
||||||
|
scope: whitespace
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: "•"
|
||||||
|
scope: support.function.show-nonprintable.space
|
||||||
|
- match: "├─*┤"
|
||||||
|
scope: constant.character.escape.show-nonprintable.tab
|
||||||
|
- match: "↹"
|
||||||
|
scope: constant.character.escape.show-nonprintable.tab
|
||||||
|
- match: "␊"
|
||||||
|
scope: keyword.operator.show-nonprintable.line-feed
|
||||||
|
- match: "␍"
|
||||||
|
scope: string.show-nonprintable.carriage-return
|
||||||
|
- match: "␀"
|
||||||
|
scope: entity.other.attribute-name.show-nonprintable.null
|
||||||
|
- match: "␇"
|
||||||
|
scope: entity.other.attribute-name.show-nonprintable.bell
|
||||||
|
- match: "␛"
|
||||||
|
scope: entity.other.attribute-name.show-nonprintable.escape
|
||||||
|
- match: "␈"
|
||||||
|
scope: entity.other.attribute-name.show-nonprintable.backspace
|
||||||
+1
Submodule assets/syntaxes/varlink added at 04f30d4b83
Vendored
BIN
Binary file not shown.
+1
Submodule assets/themes/sublime-snazzy added at 70343201f1
@@ -1,26 +1,31 @@
|
|||||||
#[macro_use]
|
// TODO: Re-enable generation of shell completion files (below) when clap 3 is out.
|
||||||
extern crate clap;
|
// For more details, see https://github.com/sharkdp/bat/issues/372
|
||||||
|
|
||||||
use clap::Shell;
|
fn main() {}
|
||||||
use std::fs;
|
|
||||||
|
|
||||||
include!("src/clap_app.rs");
|
// #[macro_use]
|
||||||
|
// extern crate clap;
|
||||||
|
|
||||||
const BIN_NAME: &str = "bat";
|
// use clap::Shell;
|
||||||
|
// use std::fs;
|
||||||
|
|
||||||
fn main() {
|
// include!("src/clap_app.rs");
|
||||||
let outdir = std::env::var_os("SHELL_COMPLETIONS_DIR").or(std::env::var_os("OUT_DIR"));
|
|
||||||
|
|
||||||
let outdir = match outdir {
|
// const BIN_NAME: &str = "bat";
|
||||||
None => return,
|
|
||||||
Some(outdir) => outdir,
|
|
||||||
};
|
|
||||||
|
|
||||||
fs::create_dir_all(&outdir).unwrap();
|
// fn main() {
|
||||||
|
// let outdir = std::env::var_os("SHELL_COMPLETIONS_DIR").or(std::env::var_os("OUT_DIR"));
|
||||||
|
|
||||||
let mut app = build_app(true);
|
// let outdir = match outdir {
|
||||||
app.gen_completions(BIN_NAME, Shell::Bash, &outdir);
|
// None => return,
|
||||||
app.gen_completions(BIN_NAME, Shell::Fish, &outdir);
|
// Some(outdir) => outdir,
|
||||||
app.gen_completions(BIN_NAME, Shell::Zsh, &outdir);
|
// };
|
||||||
app.gen_completions(BIN_NAME, Shell::PowerShell, &outdir);
|
|
||||||
}
|
// fs::create_dir_all(&outdir).unwrap();
|
||||||
|
|
||||||
|
// let mut app = build_app(true);
|
||||||
|
// app.gen_completions(BIN_NAME, Shell::Bash, &outdir);
|
||||||
|
// app.gen_completions(BIN_NAME, Shell::Fish, &outdir);
|
||||||
|
// app.gen_completions(BIN_NAME, Shell::Zsh, &outdir);
|
||||||
|
// app.gen_completions(BIN_NAME, Shell::PowerShell, &outdir);
|
||||||
|
// }
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
* linguist-vendored
|
||||||
Vendored
+4
-3
@@ -40,9 +40,10 @@ pack() {
|
|||||||
cp LICENSE-APACHE "$tempdir/$package_name"
|
cp LICENSE-APACHE "$tempdir/$package_name"
|
||||||
|
|
||||||
# various autocomplete
|
# various autocomplete
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
# TODO: disabled for now, see issue #372
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
||||||
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
||||||
|
|
||||||
# archiving
|
# archiving
|
||||||
pushd "$tempdir"
|
pushd "$tempdir"
|
||||||
|
|||||||
Vendored
+2
-1
@@ -11,7 +11,8 @@ Set-Location $STAGE
|
|||||||
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
|
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
|
||||||
|
|
||||||
Copy-Item "$SRC_DIR\target\release\bat.exe" '.\'
|
Copy-Item "$SRC_DIR\target\release\bat.exe" '.\'
|
||||||
Copy-Item $SRC_DIR\target\release\build\bat-*\out\_bat.ps1 '.\'
|
# TODO: disabled for now, see issue #372
|
||||||
|
# Copy-Item $SRC_DIR\target\release\build\bat-*\out\_bat.ps1 '.\'
|
||||||
|
|
||||||
# readme and license
|
# readme and license
|
||||||
Copy-Item $SRC_DIR\README.md '.\'
|
Copy-Item $SRC_DIR\README.md '.\'
|
||||||
|
|||||||
@@ -0,0 +1,447 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
|
||||||
|
<a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
|
||||||
|
<a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf?svg=true"></a>
|
||||||
|
<img src="https://img.shields.io/crates/l/bat.svg" alt="license">
|
||||||
|
<a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
|
||||||
|
A <i>cat(1)</i> clone with syntax highlighting and Git integration.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="#syntax-highlighting">特徴</a> •
|
||||||
|
<a href="#how-to-use">使い方</a> •
|
||||||
|
<a href="#installation">インストール</a> •
|
||||||
|
<a href="#customization">カスタマイズ</a> •
|
||||||
|
<a href="#project-goals-and-alternatives">プロジェクトの目標と既存の類似したOSS</a> •
|
||||||
|
翻訳 [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="README-ja">日本文</a>]
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### シンタックスハイライト
|
||||||
|
|
||||||
|
`bat` は多くのプログラミング言語やマークアップ言語のシンタックスハイライトに対応しています。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Gitの統合
|
||||||
|
|
||||||
|
|
||||||
|
`bat` は `git` とも連携しており、差分を表現する記号が表示されます(図の左端):
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 空白文字の可視化
|
||||||
|
|
||||||
|
`-A`/`--show-all` オプションをつけることで、空白文字を可視化できます:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 自動呼び出し
|
||||||
|
|
||||||
|
出力が1つの画面に対して大きすぎる場合、`bat` は自身の出力を `less` にパイプで繋げることが可能です。
|
||||||
|
|
||||||
|
### ファイルの連結
|
||||||
|
|
||||||
|
あなたはさらにファイルを連結させるに使うことも可能です:wink:。
|
||||||
|
`bat` は非対話型のターミナルを検出すると、いつでも `cat` の完全互換として振る舞い、
|
||||||
|
プレーンなファイルを表示します。
|
||||||
|
|
||||||
|
## 使い方
|
||||||
|
|
||||||
|
単一のファイルを表示させたい
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> bat README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
複数のファイルを一度に表示させたい場合
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> bat src/*.rs
|
||||||
|
```
|
||||||
|
|
||||||
|
標準入力から自動的に構文を決定させたい場合
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> curl -s https://sh.rustup.rs | bat
|
||||||
|
```
|
||||||
|
|
||||||
|
Read from stdin, specify the language explicitly
|
||||||
|
標準入力から明示的に言語を指定したい場合
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> yaml2json .travis.yml | json_pp | bat -l json
|
||||||
|
```
|
||||||
|
|
||||||
|
空白文字を可視化させたい場合:
|
||||||
|
```bash
|
||||||
|
> bat -A /etc/hosts
|
||||||
|
```
|
||||||
|
|
||||||
|
`cat` の代わりに `bat` を使用する際の例:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat > note.md # quickly create a new file
|
||||||
|
|
||||||
|
bat header.md content.md footer.md > document.md
|
||||||
|
|
||||||
|
bat -n main.rs # show line numbers (only)
|
||||||
|
|
||||||
|
bat f - g # output 'f', then stdin, then 'g'.
|
||||||
|
```
|
||||||
|
|
||||||
|
## インストール
|
||||||
|
|
||||||
|
### Ubuntu
|
||||||
|
*... や他のDebianベースのLinuxディストリビューション*
|
||||||
|
|
||||||
|
最新の `.deb` パッケージを[こちら](https://github.com/sharkdp/bat/releases)からダウンロードして、インストールしてください:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo dpkg -i bat_0.10.0_amd64.deb # adapt version number and architecture
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arch Linux
|
||||||
|
|
||||||
|
[Arch Linuxの公式リソース](https://www.archlinux.org/packages/community/x86_64/bat/)からインストールできます。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman -S bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### Void Linux
|
||||||
|
|
||||||
|
xbps-ininstall経由で `bat` をインストールできます。
|
||||||
|
|
||||||
|
```
|
||||||
|
xbps-install -S bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fedora
|
||||||
|
|
||||||
|
[Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/)経由で `bat` をインストールできます。これはFedora 29以上ではデフォルトで有効化されています。 もしそうでなければ、 `dnf install fedora-repos-modular` を実行してセットアップし、 `fedora-modular` と `fedora-updates-modular` が `/etc/yum.repos.d` で有効化されていることを確認してください。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dnf module install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### FreeBSD
|
||||||
|
|
||||||
|
事前にコンパイル済みである[pkg](https://www.freshports.org/textproc/bat)をインストールできます:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pkg install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
または、FreeBSDのportsから自身でビルドすることも可能です:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /usr/ports/textproc/bat
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
### nix
|
||||||
|
|
||||||
|
`bat` を[nix package manager](https://nixos.org/nix)経由でインストールすることができます:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix-env -i bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### openSUSE
|
||||||
|
|
||||||
|
You can install `bat` with zypper:
|
||||||
|
|
||||||
|
`bat` をzypperでインストールすることができます:
|
||||||
|
|
||||||
|
```
|
||||||
|
zypper install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
[Homebrew](http://braumeister.org/formula/bat)でインストールすることができます:
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
You can download prebuilt binaries from the [Release page],
|
||||||
|
or install it with :
|
||||||
|
|
||||||
|
事前にビルド済みのバイナリを[リリースページ](https://github.com/sharkdp/bat/releases)からダウンロードすることができます。または、[scoop](https://scoop.sh/)でインストールすることも可能です。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scoop install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
[See below](#using-bat-on-windows) for notes.
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
|
||||||
|
コンテナ内で`bat` を使いたい方のために[Docker image](https://hub.docker.com/r/danlynn/bat/)が用意されています。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull danlynn/bat
|
||||||
|
alias bat='docker run -it --rm -e BAT_THEME -e BAT_STYLE -e BAT_TABS -v "$(pwd):/myapp" danlynn/bat'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ansible
|
||||||
|
|
||||||
|
[Ansible](https://www.ansible.com/)でインストールすることができます:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install role on local machine
|
||||||
|
ansible-galaxy install aeimer.install_bat
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
# Playbook to install bat
|
||||||
|
- host: all
|
||||||
|
roles:
|
||||||
|
- aeimer.install_bat
|
||||||
|
```
|
||||||
|
|
||||||
|
- [Ansible Galaxy](https://galaxy.ansible.com/aeimer/install_bat)
|
||||||
|
- [GitHub](https://github.com/aeimer/ansible-install-bat)
|
||||||
|
|
||||||
|
これは以下のディストリビューションで動作するはずです:
|
||||||
|
- Debian/Ubuntu
|
||||||
|
- ARM (eg. Raspberry PI)
|
||||||
|
- Arch Linux
|
||||||
|
- Void Linux
|
||||||
|
- FreeBSD
|
||||||
|
- MacOS
|
||||||
|
|
||||||
|
### From binaries
|
||||||
|
|
||||||
|
|
||||||
|
多くの異なるアーキテクチャのためのプレビルドバージョンを[リリースページ](https://github.com/sharkdp/bat/releases)からチェックしてみてください。静的にリンクされている多くのバイナリも利用できます: ファイル名に `musl` を含むアーカイブを探します。
|
||||||
|
|
||||||
|
### From source
|
||||||
|
|
||||||
|
|
||||||
|
`bat` をソースからビルドしたいならば、Rust 1.29 以上の環境が必要です。そして、 `cargo` をビルドに対して使用します:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
`cmake` と `libz` 開発パッケージ(`libz-dev` または `libz-devel`)が正しくビルドをするためにインストールする必要があるかもしれません。
|
||||||
|
|
||||||
|
## カスタマイズ
|
||||||
|
|
||||||
|
### ハイライト テーマ
|
||||||
|
|
||||||
|
`bat --list-themes` を使うと現在利用可能なシンタックスハイライトのテーマを入手できます。 `TwoDark` テーマを選ぶためには `--theme=TwoDark` オプションをつけるか `BAT_THEME` という環境変数に `TwoDark` を代入する必要があります。 シェルの起動ファイルに `export BAT_THEME="TwoDark"` と定義すればその設定が変わることはないでしょう。あるいは、 `bat` の[設定ファイル](https://github.com/sharkdp/bat#configuration-file)を利用してください。
|
||||||
|
|
||||||
|
|
||||||
|
もし、ファイルにより異なるテーマを利用したい場合は、以下の[`fzf`](https://github.com/junegunn/fzf)を利用した以下のコマンドを使うことができます:
|
||||||
|
``` bash
|
||||||
|
bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
|
||||||
|
```
|
||||||
|
|
||||||
|
`bat` はデフォルトだと黒い背景色のターミナルに適しています。しかし、`GitHub` や `OneHalfLight` のような白い背景色のテーマでもいい感じにすることができます。
|
||||||
|
以下のカスタムテーマを参考にしてみてください。
|
||||||
|
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes)
|
||||||
|
|
||||||
|
### 出力のスタイル
|
||||||
|
|
||||||
|
`--style` を使うことで `bat` の表示の見た目を変更することができます。例えば、 `--style=numbers,changes` と入力します。すると、Gitの差分と行番号だけが表示され、グリッド線とファイルヘッダーは表示されません。
|
||||||
|
環境変数に `BAT_STYLE` を定義するとこれらの設定を永続的に使用することができます。
|
||||||
|
[設定ファイル](https://github.com/sharkdp/bat#configuration-file)を参考にしても良いでしょう。
|
||||||
|
|
||||||
|
### 新しい構文の追加 / 言語の定義
|
||||||
|
|
||||||
|
`bat` はシンタックスハイライトのための[`syntext`](https://github.com/trishume/syntect/)という最高にイケてるライブラリを使用しています。`syntect` はSublime Textのために作られた[`.sublime-syntax` file](https://www.sublimetext.com/docs/3/syntax.html)テーマです。新しい構文を定義するために以下の手順を行います。
|
||||||
|
|
||||||
|
構文定義ファイルを入れておくためのフォルダを作る:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p "$(bat --config-dir)/syntaxes"
|
||||||
|
cd "$(bat --config-dir)/syntaxes"
|
||||||
|
|
||||||
|
# Put new '.sublime-syntax' language definition files
|
||||||
|
# in this folder (or its subdirectories), for example:
|
||||||
|
git clone https://github.com/tellnobody1/sublime-purescript-syntax
|
||||||
|
```
|
||||||
|
|
||||||
|
次のコマンドを使用して、これらのファイルをバイナリキャッシュに解析します:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat cache --build
|
||||||
|
```
|
||||||
|
|
||||||
|
最後に `bat --list-languages` と入力すると新しい言語が利用可能かどうかチェックします。
|
||||||
|
デフォルトの設定に戻したいときは以下のコマンドを実行します:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat cache --clear
|
||||||
|
```
|
||||||
|
|
||||||
|
### 新しいテーマの追加
|
||||||
|
|
||||||
|
これは構文を新しく定義するやり方と非常に似ています。
|
||||||
|
|
||||||
|
まず、新しいシンタックスハイライトのテーマのフォルダを作ります:
|
||||||
|
```bash
|
||||||
|
mkdir -p "$(bat --config-dir)/themes"
|
||||||
|
cd "$(bat --config-dir)/themes"
|
||||||
|
|
||||||
|
# Download a theme in '.tmTheme' format, for example:
|
||||||
|
git clone https://github.com/greggb/sublime-snazzy
|
||||||
|
|
||||||
|
# Update the binary cache
|
||||||
|
bat cache --build
|
||||||
|
```
|
||||||
|
|
||||||
|
最後に、 `bat --list-themes` で新しいテーマが利用可能がチェックします
|
||||||
|
|
||||||
|
### 異なるページャーの使用
|
||||||
|
|
||||||
|
`bat` は環境変数 `PAGER` に使用するページャーを明記します。
|
||||||
|
この環境変数が定義されていない場合、デフォルトで `less` が使用されます。もし、異なるページャーが使用したい場合は、`PAGER` を修正してください。または、`PAGER` を上書きする環境変数として `BAT_PAGER` を定義することも可能です。
|
||||||
|
|
||||||
|
もし、ページャーにコマンドライン引数を渡したい場合は、 `PAGER`/`BAT_PAGER` 環境変数を定義してください:
|
||||||
|
```bash
|
||||||
|
export BAT_PAGER="less -RF"
|
||||||
|
```
|
||||||
|
|
||||||
|
環境変数を利用する代わりに、 `bat` の[設定ファイル](https://github.com/sharkdp/bat#configuration-file)の `--pager` オプションを使用することも可能です。
|
||||||
|
|
||||||
|
**注意**: デフォルトにより、ページャーが `less` にセットされているならば `bat` は以下のコマンドラインを受け付けるでしょう。
|
||||||
|
ページャーのオプション: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` , `-X`/`--no-init`
|
||||||
|
最初の `-R` はANSIカラーを正しく解釈するために必要です。2番目の `-F` は出力サイズがターミナルの縦のサイズよりも小さいならば `less` に即座に終了するように命令します。したがって、少量のファイルのためにページャーを終了する `q` を押す必要がありません。3番目のオプションの `-X` は `less` の古いバージョンの機能である `--quit-if-one-screen` でバグを修正するために必要です。運の悪いことに、これは `less` のマウス-ホイールのサポートを無効にします。もし、マウス-ホイール スクローリングを有効にしたいなら、`-R` だけをオプションとしてつけてください(ただし、これは `--quit-if-one-screen` を無効にするでしょう)。または、 `less` の最近バージョンを利用し、 `-RF` をつけてください。 これは望ましいことに `--quit-if-one-screen` と マウス-ホイールスクローリングの両方を有効にするでしょう。
|
||||||
|
|
||||||
|
スクロールが未だ動作しないのであれば、加えて `-S` オプションを追加してみてください。
|
||||||
|
|
||||||
|
## 設定ファイル
|
||||||
|
|
||||||
|
|
||||||
|
`bat` は設定ファイルでカスタマイズすることが可能です。ファイルの場所はOSに依存します。使用しているOSのデフォルトパスを調べるには以下のコマンドを実行してください:
|
||||||
|
```
|
||||||
|
bat --config-file
|
||||||
|
```
|
||||||
|
|
||||||
|
また、環境変数 `BAT_CONFIG_PATH` に設定ファイルの場所を明記することもできます:
|
||||||
|
```bash
|
||||||
|
export BAT_CONFIG_PATH="/path/to/bat.conf"
|
||||||
|
```
|
||||||
|
|
||||||
|
### フォーマット
|
||||||
|
|
||||||
|
|
||||||
|
この設定ファイルはコマンドライン引数の単純なリストです。 `bat --help` を利用すると、利用可能なオプションとその値を閲覧することができます。さらに、`#` でコメント文を加えることができます。
|
||||||
|
|
||||||
|
設定ファイルの例:
|
||||||
|
```bash
|
||||||
|
# Set the theme to "TwoDark"
|
||||||
|
--theme="TwoDark"
|
||||||
|
|
||||||
|
# Show line numbers, Git modifications and file header (but no grid)
|
||||||
|
--style="numbers,changes,header"
|
||||||
|
|
||||||
|
# Use italic text on the terminal (not supported on all terminals)
|
||||||
|
--italic-text=always
|
||||||
|
|
||||||
|
# Add mouse scrolling support in less (does not work with older
|
||||||
|
# versions of "less")
|
||||||
|
--pager="less -FR"
|
||||||
|
|
||||||
|
# Use C++ syntax (instead of C) for .h header files
|
||||||
|
--map-syntax h:cpp
|
||||||
|
|
||||||
|
# Use "gitignore" highlighting for ".ignore" files
|
||||||
|
--map-syntax .ignore:.gitignore
|
||||||
|
```
|
||||||
|
|
||||||
|
## Windows での `bat` の利用
|
||||||
|
|
||||||
|
Windows 上で `bat` はほとんど動作しますが、いくつかの機能は設定を必要をする場合があります。
|
||||||
|
|
||||||
|
### ページング
|
||||||
|
|
||||||
|
Windows only includes a very limited pager in the form of `more`. You can download a Windows binary
|
||||||
|
for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.html) or [through
|
||||||
|
Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
|
||||||
|
your `PATH` or [define an environment variable](#using-a-different-pager).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 色
|
||||||
|
|
||||||
|
Windows 10 は[v1151](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update))からbashの新しいバージョンと同様に `conhost.exe`(コマンドプロンプト)と PowerShell の色をネイティブサポートしていません。Windows の新しいバージョンでは、[Cmder](http://cmder.net/)を使うことができます。これは[ConEmu](https://conemu.github.io/)を含んでいます。
|
||||||
|
|
||||||
|
**注意:** Git と MSYS の `less` はWindows上で色を正しく解釈しません。もし、あなたが他のページャーをインストールしていないのであれば、 `--paging=never` オプションを付け加えるまたは `BAT_PAGER` に空文字を設定することでページングを完全に無効にできます。
|
||||||
|
|
||||||
|
### Cygwin
|
||||||
|
|
||||||
|
Windows上の `bat` は Cygwin のunix風のpath(`/cygdrive/*`)をネイティブサポートしていません。
|
||||||
|
絶対的なcygwinパスを引数として受けたときに、 `bat` は以下のエラーを返すでしょう: `The system cannot find the path specified. (os error 3)`
|
||||||
|
|
||||||
|
wrapperを作成するまたは以下の関数を `.bash_profile` に追記することでこの問題を解決することができます:
|
||||||
|
```shell
|
||||||
|
bat() {
|
||||||
|
local index
|
||||||
|
local args=("$@")
|
||||||
|
for index in $(seq 0 ${#args[@]}) ; do
|
||||||
|
case "${args[index]}" in
|
||||||
|
-*) continue;;
|
||||||
|
*) [ -e "${args[index]}" ] && args[index]="$(cygpath --windows "${args[index]}")";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
command bat "${args[@]}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## トラブルシューティング
|
||||||
|
|
||||||
|
### ターミナルと色
|
||||||
|
|
||||||
|
`bat` はターミナルがトゥルーカラーをサポートしている/していない関係なくサポートします。しかし、シンタックスハイライトのテーマの色が8-bitカラーに最適化されていない場合、24-bitであるトゥルーカラーをサポートしているターミナルを使用することを強く推奨します(`terminator`, `konsole`, `iTerm2`, ...)。
|
||||||
|
この[記事](https://gist.github.com/XVilka/8346728)には24-bitカラーがサポートされているターミナルの一覧が掲載されています。
|
||||||
|
|
||||||
|
本当の色をターミナルにセットするために、環境変数 `COLORTERM` に `truecolor` か `24bit` のどちらかを代入してください。さもなければ、 `bat` はどの色を使うのか決定することができません。または、24-bit エスケープシーケンスがサポートされません(そして、8-bit colorに戻ります)。
|
||||||
|
|
||||||
|
### 行番号とグリッド線がほとんど見えない
|
||||||
|
|
||||||
|
異なるテーマを試してみてください(`bat --list-themes` でテーマを閲覧できます)。 `OneHalfDark` と `OneHalfLight` テーマはグリッド線と線の色を明るくします。
|
||||||
|
|
||||||
|
|
||||||
|
## 開発
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Recursive clone to retrieve all submodules
|
||||||
|
git clone --recursive https://github.com/sharkdp/bat
|
||||||
|
|
||||||
|
# Build (debug version)
|
||||||
|
cd bat
|
||||||
|
cargo build
|
||||||
|
|
||||||
|
# Run unit tests and integration tests
|
||||||
|
cargo test
|
||||||
|
|
||||||
|
# Install (release version)
|
||||||
|
cargo install
|
||||||
|
|
||||||
|
# Build a bat binary with modified syntaxes and themes
|
||||||
|
bash assets/create.sh
|
||||||
|
cargo install -f
|
||||||
|
```
|
||||||
|
|
||||||
|
## プロジェクトの目標と既存の類似したOSS
|
||||||
|
|
||||||
|
`bat` は以下の目標を達成しようと試みています:
|
||||||
|
|
||||||
|
- 美しい高度なシンタックスハイライトの提供
|
||||||
|
- ファイルの差分を表示するためのGitとの連携
|
||||||
|
- (POSIX) `cat` との完全互換
|
||||||
|
- ユーザーフレンドリーがコマンドラインインターフェースの提供
|
||||||
|
|
||||||
|
既存の類似したOSSはたくさんあります。
|
||||||
|
`bat` とこれらを比較した表が[こちら](alternatives.md)にあります。
|
||||||
@@ -21,3 +21,4 @@ request.
|
|||||||
|
|
||||||
Some other alternatives that are also related, but not yet included in the table:
|
Some other alternatives that are also related, but not yet included in the table:
|
||||||
- [lesspipe](https://github.com/wofr06/lesspipe)
|
- [lesspipe](https://github.com/wofr06/lesspipe)
|
||||||
|
- [vimpager](https://github.com/rkitover/vimpager)
|
||||||
|
|||||||
@@ -12,10 +12,9 @@ bat <SUBCOMMAND>
|
|||||||
.HP
|
.HP
|
||||||
\fB\-l\fR, \fB\-\-language\fR <language>
|
\fB\-l\fR, \fB\-\-language\fR <language>
|
||||||
.IP
|
.IP
|
||||||
Explicitly set the language for syntax highlighting. The language can be
|
Explicitly set the language for syntax highlighting. The language can be specified as a
|
||||||
specified as a name (like 'C++' or 'LaTeX') or possible file extension (like
|
name (like 'C++' or 'LaTeX') or possible file extension (like 'cpp', 'hpp' or 'md'). Use
|
||||||
\&'cpp', 'hpp' or 'md'). Use '\-\-list\-languages' to show all supported language
|
\&'\-\-list\-languages' to show all supported language names and file extensions.
|
||||||
names and file extensions.
|
|
||||||
.HP
|
.HP
|
||||||
\fB\-\-list\-languages\fR
|
\fB\-\-list\-languages\fR
|
||||||
.IP
|
.IP
|
||||||
@@ -29,9 +28,9 @@ Map a file extension or file name to an existing syntax. For example, to highlig
|
|||||||
.HP
|
.HP
|
||||||
\fB\-\-theme\fR <theme>
|
\fB\-\-theme\fR <theme>
|
||||||
.IP
|
.IP
|
||||||
Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all
|
Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all available themes.
|
||||||
available themes. To set a default theme, export the BAT_THEME environment
|
To set a default theme, add the '\-\-theme="..."' option to the configuration file or
|
||||||
variable (e.g.: export BAT_THEME="TwoDark").
|
export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
|
||||||
.HP
|
.HP
|
||||||
\fB\-\-list\-themes\fR
|
\fB\-\-list\-themes\fR
|
||||||
.IP
|
.IP
|
||||||
@@ -39,13 +38,12 @@ Display a list of supported themes for syntax highlighting.
|
|||||||
.HP
|
.HP
|
||||||
\fB\-\-style\fR <style\-components>
|
\fB\-\-style\fR <style\-components>
|
||||||
.IP
|
.IP
|
||||||
Configure which elements (line numbers, file headers, grid borders, Git
|
Configure which elements (line numbers, file headers, grid borders, Git modifications,
|
||||||
modifications, ..) to display in addition to the file contents. The argument
|
\&..) to display in addition to the file contents. The argument is a comma\-separated list
|
||||||
is a comma\-separated list of components to display (e.g.
|
of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
|
||||||
\&'numbers,changes,grid') or a pre\-defined style ('full'). To set a default
|
To set a default style, add the '\-\-style=".."' option to the configuration file or
|
||||||
theme, export the BAT_STYLE environment variable (e.g.: export
|
export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
|
||||||
BAT_STYLE="numbers"). [possible values: auto, full, plain, changes, header,
|
values: *auto*, full, plain, changes, header, grid, numbers.
|
||||||
grid, numbers]
|
|
||||||
.HP
|
.HP
|
||||||
\fB\-p\fR, \fB\-\-plain\fR
|
\fB\-p\fR, \fB\-\-plain\fR
|
||||||
.IP
|
.IP
|
||||||
@@ -53,10 +51,14 @@ Only show plain style, no decorations. This is an alias for '\-\-style=plain'
|
|||||||
.HP
|
.HP
|
||||||
\fB\-n\fR, \fB\-\-number\fR
|
\fB\-n\fR, \fB\-\-number\fR
|
||||||
.IP
|
.IP
|
||||||
Only show line numbers, no other decorations. This is an alias for
|
Only show line numbers, no other decorations. This is an alias for '\-\-style=numbers'
|
||||||
\&'\-\-style=numbers'
|
|
||||||
.HP
|
.HP
|
||||||
\fB\-\-line\-range\fR <N:M>
|
\fB\-A\fR, \fB\-\-show\-all\fR
|
||||||
|
.IP
|
||||||
|
Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to control the
|
||||||
|
width of the tab\-placeholders.
|
||||||
|
.HP
|
||||||
|
\fB\-\-line\-range\fR <N:M>...
|
||||||
.IP
|
.IP
|
||||||
Only print the specified range of lines for each file. For example:
|
Only print the specified range of lines for each file. For example:
|
||||||
.RS
|
.RS
|
||||||
@@ -73,6 +75,11 @@ prints lines 40 to the end of the file
|
|||||||
Specify when to use colored output. The automatic mode only enables colors if an
|
Specify when to use colored output. The automatic mode only enables colors if an
|
||||||
interactive terminal is detected. Possible values: *auto*, never, always.
|
interactive terminal is detected. Possible values: *auto*, never, always.
|
||||||
.HP
|
.HP
|
||||||
|
\fB\-\-italic\-text\fR <when>
|
||||||
|
.IP
|
||||||
|
Specify when to use ANSI sequences for italic text in the output. Possible values:
|
||||||
|
always, *never*.
|
||||||
|
.HP
|
||||||
\fB\-\-decorations\fR <when>
|
\fB\-\-decorations\fR <when>
|
||||||
.IP
|
.IP
|
||||||
Specify when to use the decorations that have been specified via '\-\-style'. The
|
Specify when to use the decorations that have been specified via '\-\-style'. The
|
||||||
@@ -82,9 +89,15 @@ values: *auto*, never, always.
|
|||||||
\fB\-\-paging\fR <when>
|
\fB\-\-paging\fR <when>
|
||||||
.IP
|
.IP
|
||||||
Specify when to use the pager. To control which pager is used, set the PAGER or
|
Specify when to use the pager. To control which pager is used, set the PAGER or
|
||||||
BAT_PAGER environment variables (the latter takes precedence). The default pager is
|
BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
|
||||||
\&'less'. To disable the pager permanently, set BAT_PAGER to an empty string. Possible
|
option. To disable the pager permanently, set BAT_PAGER to an empty string or set
|
||||||
values: *auto*, never, always.
|
\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
|
||||||
|
.HP
|
||||||
|
\fB\-\-pager\fR <command>
|
||||||
|
.IP
|
||||||
|
Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
|
||||||
|
environment variables. The default pager is 'less'. To disable the pager completely, use
|
||||||
|
the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
|
||||||
.HP
|
.HP
|
||||||
\fB\-\-wrap\fR <mode>
|
\fB\-\-wrap\fR <mode>
|
||||||
.IP
|
.IP
|
||||||
@@ -99,6 +112,12 @@ Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
|
|||||||
This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
|
This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
|
||||||
always unbuffered \- this option is simply ignored.
|
always unbuffered \- this option is simply ignored.
|
||||||
.HP
|
.HP
|
||||||
|
\fB\-\-terminal\-width\fR <width>
|
||||||
|
.IP
|
||||||
|
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.
|
||||||
|
.HP
|
||||||
\fB\-h\fR, \fB\-\-help\fR
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
.IP
|
.IP
|
||||||
Print this help message.
|
Print this help message.
|
||||||
@@ -115,5 +134,4 @@ from standard input.
|
|||||||
.SH "SUBCOMMANDS"
|
.SH "SUBCOMMANDS"
|
||||||
.IP
|
.IP
|
||||||
cache
|
cache
|
||||||
.IP
|
Modify the syntax\-definition and theme cache
|
||||||
Modify the syntax\-definition and theme cache. See "bat cache --help" for more information
|
|
||||||
|
|||||||
+69
-10
@@ -17,7 +17,7 @@ use assets::BAT_THEME_DEFAULT;
|
|||||||
use config::{get_args_from_config_file, get_args_from_env_var};
|
use config::{get_args_from_config_file, get_args_from_env_var};
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use inputfile::InputFile;
|
use inputfile::InputFile;
|
||||||
use line_range::LineRange;
|
use line_range::{LineRange, LineRanges};
|
||||||
use style::{OutputComponent, OutputComponents, OutputWrap};
|
use style::{OutputComponent, OutputComponents, OutputWrap};
|
||||||
use syntax_mapping::SyntaxMapping;
|
use syntax_mapping::SyntaxMapping;
|
||||||
use util::transpose;
|
use util::transpose;
|
||||||
@@ -37,6 +37,9 @@ pub struct Config<'a> {
|
|||||||
/// The explicitly configured language, if any
|
/// The explicitly configured language, if any
|
||||||
pub language: Option<&'a str>,
|
pub language: Option<&'a str>,
|
||||||
|
|
||||||
|
/// Whether or not to show/replace non-printable characters like space, tab and newline.
|
||||||
|
pub show_nonprintable: bool,
|
||||||
|
|
||||||
/// The character width of the terminal
|
/// The character width of the terminal
|
||||||
pub term_width: usize,
|
pub term_width: usize,
|
||||||
|
|
||||||
@@ -62,14 +65,23 @@ pub struct Config<'a> {
|
|||||||
/// Pager or STDOUT
|
/// Pager or STDOUT
|
||||||
pub paging_mode: PagingMode,
|
pub paging_mode: PagingMode,
|
||||||
|
|
||||||
/// The range lines that should be printed, if specified
|
/// Specifies the lines that should be printed
|
||||||
pub line_range: Option<LineRange>,
|
pub line_ranges: LineRanges,
|
||||||
|
|
||||||
/// The syntax highlighting theme
|
/// The syntax highlighting theme
|
||||||
pub theme: String,
|
pub theme: String,
|
||||||
|
|
||||||
/// File extension/name mappings
|
/// File extension/name mappings
|
||||||
pub syntax_mapping: SyntaxMapping,
|
pub syntax_mapping: SyntaxMapping,
|
||||||
|
|
||||||
|
/// Command to start the pager
|
||||||
|
pub pager: Option<&'a str>,
|
||||||
|
|
||||||
|
/// Whether or not to use ANSI italics
|
||||||
|
pub use_italic_text: bool,
|
||||||
|
|
||||||
|
/// Lines to highlight
|
||||||
|
pub highlight_lines: Vec<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_truecolor_terminal() -> bool {
|
fn is_truecolor_terminal() -> bool {
|
||||||
@@ -160,13 +172,20 @@ impl App {
|
|||||||
return Err("Invalid syntax mapping. The format of the -m/--map-syntax option is 'from:to'.".into());
|
return Err("Invalid syntax mapping. The format of the -m/--map-syntax option is 'from:to'.".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
syntax_mapping.insert(parts[0].into(), parts[1].into());
|
syntax_mapping.insert(parts[0], parts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Config {
|
Ok(Config {
|
||||||
true_color: is_truecolor_terminal(),
|
true_color: is_truecolor_terminal(),
|
||||||
language: self.matches.value_of("language"),
|
language: self.matches.value_of("language").or_else(|| {
|
||||||
|
if self.matches.is_present("show-all") {
|
||||||
|
Some("show-nonprintable")
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
show_nonprintable: self.matches.is_present("show-all"),
|
||||||
output_wrap: if !self.interactive_output {
|
output_wrap: if !self.interactive_output {
|
||||||
// We don't have the tty width when piping to another program.
|
// We don't have the tty width when piping to another program.
|
||||||
// There's no point in wrapping when this is the case.
|
// There's no point in wrapping when this is the case.
|
||||||
@@ -193,7 +212,23 @@ impl App {
|
|||||||
term_width: self
|
term_width: self
|
||||||
.matches
|
.matches
|
||||||
.value_of("terminal-width")
|
.value_of("terminal-width")
|
||||||
.and_then(|w| w.parse().ok())
|
.and_then(|w| {
|
||||||
|
if w.starts_with("+") || w.starts_with("-") {
|
||||||
|
// Treat argument as a delta to the current terminal width
|
||||||
|
w.parse().ok().map(|delta: i16| {
|
||||||
|
let old_width: u16 = Term::stdout().size().1;
|
||||||
|
let new_width: i32 = old_width as i32 + delta as i32;
|
||||||
|
|
||||||
|
if new_width <= 0 {
|
||||||
|
old_width as usize
|
||||||
|
} else {
|
||||||
|
new_width as usize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
w.parse().ok()
|
||||||
|
}
|
||||||
|
})
|
||||||
.unwrap_or(Term::stdout().size().1 as usize),
|
.unwrap_or(Term::stdout().size().1 as usize),
|
||||||
loop_through: !(self.interactive_output
|
loop_through: !(self.interactive_output
|
||||||
|| self.matches.value_of("color") == Some("always")
|
|| self.matches.value_of("color") == Some("always")
|
||||||
@@ -209,7 +244,7 @@ impl App {
|
|||||||
if output_components.plain() && paging_mode == PagingMode::Never {
|
if output_components.plain() && paging_mode == PagingMode::Never {
|
||||||
0
|
0
|
||||||
} else {
|
} else {
|
||||||
8
|
4
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
theme: self
|
theme: self
|
||||||
@@ -218,9 +253,26 @@ impl App {
|
|||||||
.map(String::from)
|
.map(String::from)
|
||||||
.or_else(|| env::var("BAT_THEME").ok())
|
.or_else(|| env::var("BAT_THEME").ok())
|
||||||
.unwrap_or(String::from(BAT_THEME_DEFAULT)),
|
.unwrap_or(String::from(BAT_THEME_DEFAULT)),
|
||||||
line_range: transpose(self.matches.value_of("line-range").map(LineRange::from))?,
|
line_ranges: LineRanges::from(
|
||||||
|
transpose(
|
||||||
|
self.matches
|
||||||
|
.values_of("line-range")
|
||||||
|
.map(|vs| vs.map(LineRange::from).collect()),
|
||||||
|
)?
|
||||||
|
.unwrap_or(vec![]),
|
||||||
|
),
|
||||||
output_components,
|
output_components,
|
||||||
syntax_mapping,
|
syntax_mapping,
|
||||||
|
pager: self.matches.value_of("pager"),
|
||||||
|
use_italic_text: match self.matches.value_of("italic-text") {
|
||||||
|
Some("always") => true,
|
||||||
|
_ => false,
|
||||||
|
},
|
||||||
|
highlight_lines: self
|
||||||
|
.matches
|
||||||
|
.values_of("highlight-line")
|
||||||
|
.and_then(|ws| ws.map(|w| w.parse().ok()).collect())
|
||||||
|
.unwrap_or_default(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +311,15 @@ impl App {
|
|||||||
.collect::<Result<Vec<OutputComponent>>>()
|
.collect::<Result<Vec<OutputComponent>>>()
|
||||||
}))?;
|
}))?;
|
||||||
|
|
||||||
values_t!(matches.values_of("style"), OutputComponent)
|
matches
|
||||||
.ok()
|
.value_of("style")
|
||||||
|
.map(|styles| {
|
||||||
|
styles
|
||||||
|
.split(",")
|
||||||
|
.map(|style| style.parse::<OutputComponent>())
|
||||||
|
.filter_map(|style| style.ok())
|
||||||
|
.collect::<Vec<_>>()
|
||||||
|
})
|
||||||
.or(env_style_components)
|
.or(env_style_components)
|
||||||
.unwrap_or(vec![OutputComponent::Full])
|
.unwrap_or(vec![OutputComponent::Full])
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
@@ -216,6 +216,10 @@ pub fn config_dir() -> Cow<'static, str> {
|
|||||||
PROJECT_DIRS.config_dir().to_string_lossy()
|
PROJECT_DIRS.config_dir().to_string_lossy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn cache_dir() -> Cow<'static, str> {
|
||||||
|
PROJECT_DIRS.cache_dir().to_string_lossy()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn clear_assets() {
|
pub fn clear_assets() {
|
||||||
print!("Clearing theme set cache ... ");
|
print!("Clearing theme set cache ... ");
|
||||||
fs::remove_file(theme_set_path()).ok();
|
fs::remove_file(theme_set_path()).ok();
|
||||||
|
|||||||
+114
-33
@@ -84,9 +84,10 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.help("Set the color theme for syntax highlighting.")
|
.help("Set the color theme for syntax highlighting.")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Set the theme for syntax highlighting. Use '--list-themes' to \
|
"Set the theme for syntax highlighting. Use '--list-themes' to \
|
||||||
see all available themes. To set a default theme, export the \
|
see all available themes. To set a default theme, add the \
|
||||||
|
'--theme=\"...\"' option to the configuration file or export the \
|
||||||
BAT_THEME environment variable (e.g.: export \
|
BAT_THEME environment variable (e.g.: export \
|
||||||
BAT_THEME=\"TwoDark\").",
|
BAT_THEME=\"...\").",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
@@ -99,11 +100,28 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
Arg::with_name("style")
|
Arg::with_name("style")
|
||||||
.long("style")
|
.long("style")
|
||||||
.value_name("style-components")
|
.value_name("style-components")
|
||||||
.use_delimiter(true)
|
// Need to turn this off for overrides_with to work as we want. See the bottom most
|
||||||
|
// example at https://docs.rs/clap/2.32.0/clap/struct.Arg.html#method.overrides_with
|
||||||
|
.use_delimiter(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.possible_values(&[
|
.overrides_with("style")
|
||||||
"auto", "full", "plain", "changes", "header", "grid", "numbers",
|
.overrides_with("plain")
|
||||||
])
|
.overrides_with("number")
|
||||||
|
// Cannot use clap's built in validation because we have to turn off clap's delimiters
|
||||||
|
.validator(|val| {
|
||||||
|
let mut invalid_vals = val.split(",").filter(|style| {
|
||||||
|
!&[
|
||||||
|
"auto", "full", "plain", "changes", "header", "grid", "numbers",
|
||||||
|
]
|
||||||
|
.contains(style)
|
||||||
|
});
|
||||||
|
|
||||||
|
if let Some(invalid) = invalid_vals.next() {
|
||||||
|
Err(format!("Unknown style, '{}'", invalid))
|
||||||
|
} else {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
})
|
||||||
.help(
|
.help(
|
||||||
"Comma-separated list of style elements to display \
|
"Comma-separated list of style elements to display \
|
||||||
(*auto*, full, plain, changes, header, grid, numbers).",
|
(*auto*, full, plain, changes, header, grid, numbers).",
|
||||||
@@ -113,18 +131,18 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
borders, Git modifications, ..) to display in addition to the \
|
borders, Git modifications, ..) to display in addition to the \
|
||||||
file contents. The argument is a comma-separated list of \
|
file contents. The argument is a comma-separated list of \
|
||||||
components to display (e.g. 'numbers,changes,grid') or a \
|
components to display (e.g. 'numbers,changes,grid') or a \
|
||||||
pre-defined style ('full'). To set a default theme, export the \
|
pre-defined style ('full'). To set a default style, add the \
|
||||||
BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"numbers\"). \
|
'--style=\"..\"' option to the configuration file or export the \
|
||||||
|
BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\"). \
|
||||||
Possible values: *auto*, full, plain, changes, header, grid, numbers.",
|
Possible values: *auto*, full, plain, changes, header, grid, numbers.",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("plain")
|
Arg::with_name("plain")
|
||||||
.overrides_with("plain")
|
.overrides_with("plain")
|
||||||
|
.overrides_with("number")
|
||||||
.short("p")
|
.short("p")
|
||||||
.long("plain")
|
.long("plain")
|
||||||
.conflicts_with("style")
|
|
||||||
.conflicts_with("number")
|
|
||||||
.help("Show plain style (alias for '--style=plain').")
|
.help("Show plain style (alias for '--style=plain').")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Only show plain style, no decorations. This is an alias for \
|
"Only show plain style, no decorations. This is an alias for \
|
||||||
@@ -136,18 +154,31 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.long("number")
|
.long("number")
|
||||||
.overrides_with("number")
|
.overrides_with("number")
|
||||||
.short("n")
|
.short("n")
|
||||||
.conflicts_with("style")
|
|
||||||
.help("Show line numbers (alias for '--style=numbers').")
|
.help("Show line numbers (alias for '--style=numbers').")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Only show line numbers, no other decorations. This is an alias for \
|
"Only show line numbers, no other decorations. This is an alias for \
|
||||||
'--style=numbers'",
|
'--style=numbers'",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("show-all")
|
||||||
|
.long("show-all")
|
||||||
|
.alias("show-nonprintable")
|
||||||
|
.short("A")
|
||||||
|
.conflicts_with("language")
|
||||||
|
.help("Show non-printable characters (space, tab, newline, ..).")
|
||||||
|
.long_help(
|
||||||
|
"Show non-printable characters like space, tab or newline. \
|
||||||
|
Use '--tabs' to control the width of the tab-placeholders.",
|
||||||
|
),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("line-range")
|
Arg::with_name("line-range")
|
||||||
.long("line-range")
|
.long("line-range")
|
||||||
.overrides_with("line-range")
|
.short("r")
|
||||||
|
.multiple(true)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
.number_of_values(1)
|
||||||
.value_name("N:M")
|
.value_name("N:M")
|
||||||
.help("Only print the lines from N to M.")
|
.help("Only print the lines from N to M.")
|
||||||
.long_help(
|
.long_help(
|
||||||
@@ -158,6 +189,19 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
'--line-range 40:' prints lines 40 to the end of the file",
|
'--line-range 40:' prints lines 40 to the end of the file",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("highlight-line")
|
||||||
|
.long("highlight-line")
|
||||||
|
.short("H")
|
||||||
|
.takes_value(true)
|
||||||
|
.number_of_values(1)
|
||||||
|
.multiple(true)
|
||||||
|
.value_name("N")
|
||||||
|
.help("Highlight the given line.")
|
||||||
|
.long_help(
|
||||||
|
"Highlight the N-th line with a different background color",
|
||||||
|
),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("color")
|
Arg::with_name("color")
|
||||||
.long("color")
|
.long("color")
|
||||||
@@ -174,6 +218,17 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
Possible values: *auto*, never, always.",
|
Possible values: *auto*, never, always.",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("italic-text")
|
||||||
|
.long("italic-text")
|
||||||
|
.takes_value(true)
|
||||||
|
.value_name("when")
|
||||||
|
.possible_values(&["always", "never"])
|
||||||
|
.default_value("never")
|
||||||
|
.hide_default_value(true)
|
||||||
|
.help("Use italics in output (always, *never*)")
|
||||||
|
.long_help("Specify when to use ANSI sequences for italic text in the output. Possible values: always, *never*."),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("decorations")
|
Arg::with_name("decorations")
|
||||||
.long("decorations")
|
.long("decorations")
|
||||||
@@ -203,12 +258,28 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.long_help(
|
.long_help(
|
||||||
"Specify when to use the pager. To control which pager \
|
"Specify when to use the pager. To control which pager \
|
||||||
is used, set the PAGER or BAT_PAGER environment \
|
is used, set the PAGER or BAT_PAGER environment \
|
||||||
variables (the latter takes precedence). The default \
|
variables (the latter takes precedence) or use the '--pager' option. \
|
||||||
pager is 'less'. To disable the pager permanently, set \
|
To disable the pager permanently, set BAT_PAGER to an empty string \
|
||||||
BAT_PAGER to an empty string. \
|
or set '--paging=never' in the configuration file. \
|
||||||
Possible values: *auto*, never, always.",
|
Possible values: *auto*, never, always.",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("pager")
|
||||||
|
.long("pager")
|
||||||
|
.overrides_with("pager")
|
||||||
|
.takes_value(true)
|
||||||
|
.value_name("command")
|
||||||
|
.hidden_short_help(true)
|
||||||
|
.help("Determine which pager to use.")
|
||||||
|
.long_help(
|
||||||
|
"Determine which pager is used. This option will overwrite \
|
||||||
|
the PAGER and BAT_PAGER environment variables. The default \
|
||||||
|
pager is 'less'. To disable the pager completely, use the \
|
||||||
|
'--paging' option. \
|
||||||
|
Example: '--pager \"less -RF\"'.",
|
||||||
|
),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("wrap")
|
Arg::with_name("wrap")
|
||||||
.long("wrap")
|
.long("wrap")
|
||||||
@@ -257,8 +328,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.long("terminal-width")
|
.long("terminal-width")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("width")
|
.value_name("width")
|
||||||
.hidden(true)
|
.hidden_short_help(true)
|
||||||
.help("Set the width of the terminal"),
|
.help(
|
||||||
|
"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.",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("no-config")
|
Arg::with_name("no-config")
|
||||||
@@ -274,17 +349,29 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.hidden(true)
|
.hidden(true)
|
||||||
.help("Show path to the configuration file."),
|
.help("Show path to the configuration file."),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("config-dir")
|
||||||
|
.long("config-dir")
|
||||||
|
.hidden(true)
|
||||||
|
.help("Show bat's configuration directory."),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("cache-dir")
|
||||||
|
.long("cache-dir")
|
||||||
|
.hidden(true)
|
||||||
|
.help("Show bat's cache directory."),
|
||||||
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("cache")
|
SubCommand::with_name("cache")
|
||||||
.about("Modify the syntax-definition and theme cache")
|
.about("Modify the syntax-definition and theme cache")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("init")
|
Arg::with_name("build")
|
||||||
.long("init")
|
.long("build")
|
||||||
.short("i")
|
.short("b")
|
||||||
.help("Initialize the syntax/theme cache.")
|
.help("Initialize (or update) the syntax/theme cache.")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Initialize the syntax/theme cache by loading from the \
|
"Initialize (or update) the syntax/theme cache by loading from \
|
||||||
source directory (default: the configuration directory).",
|
the source directory (default: the configuration directory).",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
@@ -293,21 +380,15 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.short("c")
|
.short("c")
|
||||||
.help("Remove the cached syntax definitions and themes."),
|
.help("Remove the cached syntax definitions and themes."),
|
||||||
)
|
)
|
||||||
.arg(
|
|
||||||
Arg::with_name("config-dir")
|
|
||||||
.long("config-dir")
|
|
||||||
.short("d")
|
|
||||||
.help("Show bat's configuration directory."),
|
|
||||||
)
|
|
||||||
.group(
|
.group(
|
||||||
ArgGroup::with_name("cache-actions")
|
ArgGroup::with_name("cache-actions")
|
||||||
.args(&["init", "clear", "config-dir"])
|
.args(&["build", "clear"])
|
||||||
.required(arg_group_required),
|
.required(arg_group_required),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("source")
|
Arg::with_name("source")
|
||||||
.long("source")
|
.long("source")
|
||||||
.requires("init")
|
.requires("build")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("dir")
|
.value_name("dir")
|
||||||
.help("Use a different directory to load syntaxes and themes from."),
|
.help("Use a different directory to load syntaxes and themes from."),
|
||||||
@@ -315,14 +396,14 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("target")
|
Arg::with_name("target")
|
||||||
.long("target")
|
.long("target")
|
||||||
.requires("init")
|
.requires("build")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("dir")
|
.value_name("dir")
|
||||||
.help(
|
.help(
|
||||||
"Use a different directory to store the cached syntax and theme set.",
|
"Use a different directory to store the cached syntax and theme set.",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(Arg::with_name("blank").long("blank").requires("init").help(
|
.arg(Arg::with_name("blank").long("blank").requires("build").help(
|
||||||
"Create completely new syntax and theme sets \
|
"Create completely new syntax and theme sets \
|
||||||
(instead of appending to the default sets).",
|
(instead of appending to the default sets).",
|
||||||
)),
|
)),
|
||||||
|
|||||||
+5
-1
@@ -9,7 +9,11 @@ use dirs::PROJECT_DIRS;
|
|||||||
use util::transpose;
|
use util::transpose;
|
||||||
|
|
||||||
pub fn config_file() -> PathBuf {
|
pub fn config_file() -> PathBuf {
|
||||||
PROJECT_DIRS.config_dir().join("config")
|
env::var("BAT_CONFIG_PATH")
|
||||||
|
.ok()
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.filter(|config_path| config_path.is_file())
|
||||||
|
.unwrap_or(PROJECT_DIRS.config_dir().join("config"))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseError> {
|
pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseError> {
|
||||||
|
|||||||
+31
-19
@@ -1,10 +1,11 @@
|
|||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
use app::Config;
|
use app::{Config, PagingMode};
|
||||||
use assets::HighlightingAssets;
|
use assets::HighlightingAssets;
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use inputfile::{InputFile, InputFileReader};
|
use inputfile::{InputFile, InputFileReader};
|
||||||
use line_range::LineRange;
|
use line_range::{LineRanges, RangeCheckResult};
|
||||||
use output::OutputType;
|
use output::OutputType;
|
||||||
use printer::{InteractivePrinter, Printer, SimplePrinter};
|
use printer::{InteractivePrinter, Printer, SimplePrinter};
|
||||||
|
|
||||||
@@ -19,7 +20,22 @@ impl<'b> Controller<'b> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(&self) -> Result<bool> {
|
pub fn run(&self) -> Result<bool> {
|
||||||
let mut output_type = OutputType::from_mode(self.config.paging_mode)?;
|
// Do not launch the pager if NONE of the input files exist
|
||||||
|
let mut paging_mode = self.config.paging_mode;
|
||||||
|
if self.config.paging_mode != PagingMode::Never {
|
||||||
|
let call_pager = self.config.files.iter().any(|file| {
|
||||||
|
if let InputFile::Ordinary(path) = file {
|
||||||
|
return Path::new(path).exists();
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if !call_pager {
|
||||||
|
paging_mode = PagingMode::Never;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut output_type = OutputType::from_mode(paging_mode, self.config.pager)?;
|
||||||
let writer = output_type.handle()?;
|
let writer = output_type.handle()?;
|
||||||
let mut no_errors: bool = true;
|
let mut no_errors: bool = true;
|
||||||
|
|
||||||
@@ -27,6 +43,7 @@ impl<'b> Controller<'b> {
|
|||||||
|
|
||||||
for input_file in &self.config.files {
|
for input_file in &self.config.files {
|
||||||
match input_file.get_reader(&stdin) {
|
match input_file.get_reader(&stdin) {
|
||||||
|
Err(Error(ErrorKind::ImmediateEOF, _)) => (),
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
handle_error(&error);
|
handle_error(&error);
|
||||||
no_errors = false;
|
no_errors = false;
|
||||||
@@ -64,7 +81,7 @@ impl<'b> Controller<'b> {
|
|||||||
input_file: InputFile<'a>,
|
input_file: InputFile<'a>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
printer.print_header(writer, input_file)?;
|
printer.print_header(writer, input_file)?;
|
||||||
self.print_file_ranges(printer, writer, reader, &self.config.line_range)?;
|
self.print_file_ranges(printer, writer, reader, &self.config.line_ranges)?;
|
||||||
printer.print_footer(writer)?;
|
printer.print_footer(writer)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -75,29 +92,24 @@ impl<'b> Controller<'b> {
|
|||||||
printer: &mut P,
|
printer: &mut P,
|
||||||
writer: &mut Write,
|
writer: &mut Write,
|
||||||
mut reader: InputFileReader,
|
mut reader: InputFileReader,
|
||||||
line_ranges: &Option<LineRange>,
|
line_ranges: &LineRanges,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let mut line_buffer = Vec::new();
|
let mut line_buffer = Vec::new();
|
||||||
|
|
||||||
let mut line_number: usize = 1;
|
let mut line_number: usize = 1;
|
||||||
|
|
||||||
while reader.read_line(&mut line_buffer)? {
|
while reader.read_line(&mut line_buffer)? {
|
||||||
match line_ranges {
|
match line_ranges.check(line_number) {
|
||||||
&Some(ref range) => {
|
RangeCheckResult::OutsideRange => {
|
||||||
if line_number < range.lower {
|
// Call the printer in case we need to call the syntax highlighter
|
||||||
// Call the printer in case we need to call the syntax highlighter
|
// for this line. However, set `out_of_range` to `true`.
|
||||||
// for this line. However, set `out_of_range` to `true`.
|
printer.print_line(true, writer, line_number, &line_buffer)?;
|
||||||
printer.print_line(true, writer, line_number, &line_buffer)?;
|
|
||||||
} else if line_number > range.upper {
|
|
||||||
// no more lines in range, exit early
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
printer.print_line(false, writer, line_number, &line_buffer)?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
&None => {
|
RangeCheckResult::InRange => {
|
||||||
printer.print_line(false, writer, line_number, &line_buffer)?;
|
printer.print_line(false, writer, line_number, &line_buffer)?;
|
||||||
}
|
}
|
||||||
|
RangeCheckResult::AfterLastRange => {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
line_number += 1;
|
line_number += 1;
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ pub fn get_git_diff(filename: &str) -> Option<LineChanges> {
|
|||||||
|
|
||||||
let mark_section =
|
let mark_section =
|
||||||
|line_changes: &mut LineChanges, start: u32, end: i32, change: LineChange| {
|
|line_changes: &mut LineChanges, start: u32, end: i32, change: LineChange| {
|
||||||
for line in start..(end + 1) as u32 {
|
for line in start..=end as u32 {
|
||||||
line_changes.insert(line, change);
|
line_changes.insert(line, change);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+54
-3
@@ -1,6 +1,57 @@
|
|||||||
use directories::ProjectDirs;
|
use dirs_rs;
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
use std::env;
|
||||||
|
|
||||||
|
/// Wrapper for 'dirs' that treats MacOS more like Linux, by following the XDG specification.
|
||||||
|
/// This means that the `XDG_CACHE_HOME` and `XDG_CONFIG_HOME` environment variables are
|
||||||
|
/// checked first. The fallback directories are `~/.cache/bat` and `~/.config/bat`, respectively.
|
||||||
|
pub struct BatProjectDirs {
|
||||||
|
cache_dir: PathBuf,
|
||||||
|
config_dir: PathBuf,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl BatProjectDirs {
|
||||||
|
fn new() -> Option<BatProjectDirs> {
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
let cache_dir_op = env::var_os("XDG_CACHE_HOME")
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.filter(|p| p.is_absolute())
|
||||||
|
.or_else(|| dirs_rs::home_dir().map(|d| d.join(".cache")));
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
let cache_dir_op = dirs_rs::cache_dir();
|
||||||
|
|
||||||
|
let cache_dir = cache_dir_op.map(|d| d.join("bat"))?;
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
let config_dir_op = env::var_os("XDG_CONFIG_HOME")
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.filter(|p| p.is_absolute())
|
||||||
|
.or_else(|| dirs_rs::home_dir().map(|d| d.join(".config")));
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
let config_dir_op = dirs_rs::config_dir();
|
||||||
|
|
||||||
|
let config_dir = config_dir_op.map(|d| d.join("bat"))?;
|
||||||
|
|
||||||
|
Some(BatProjectDirs {
|
||||||
|
cache_dir,
|
||||||
|
config_dir,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn cache_dir(&self) -> &Path {
|
||||||
|
&self.cache_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn config_dir(&self) -> &Path {
|
||||||
|
&self.config_dir
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref PROJECT_DIRS: ProjectDirs =
|
pub static ref PROJECT_DIRS: BatProjectDirs =
|
||||||
ProjectDirs::from("", "", crate_name!()).expect("Could not get home directory");
|
BatProjectDirs::new().expect("Could not get home directory");
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-10
@@ -14,9 +14,11 @@ pub struct InputFileReader<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> InputFileReader<'a> {
|
impl<'a> InputFileReader<'a> {
|
||||||
fn new<R: BufRead + 'a>(mut reader: R) -> InputFileReader<'a> {
|
fn new<R: BufRead + 'a>(mut reader: R) -> Result<InputFileReader<'a>> {
|
||||||
let mut first_line = vec![];
|
let mut first_line = vec![];
|
||||||
reader.read_until(b'\n', &mut first_line).ok();
|
if reader.read_until(b'\n', &mut first_line)? == 0 {
|
||||||
|
return Err(ErrorKind::ImmediateEOF.into());
|
||||||
|
}
|
||||||
|
|
||||||
let content_type = content_inspector::inspect(&first_line[..]);
|
let content_type = content_inspector::inspect(&first_line[..]);
|
||||||
|
|
||||||
@@ -24,11 +26,11 @@ impl<'a> InputFileReader<'a> {
|
|||||||
reader.read_until(0x00, &mut first_line).ok();
|
reader.read_until(0x00, &mut first_line).ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
InputFileReader {
|
Ok(InputFileReader {
|
||||||
inner: Box::new(reader),
|
inner: Box::new(reader),
|
||||||
first_line,
|
first_line,
|
||||||
content_type,
|
content_type,
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read_line(&mut self, buf: &mut Vec<u8>) -> io::Result<bool> {
|
pub fn read_line(&mut self, buf: &mut Vec<u8>) -> io::Result<bool> {
|
||||||
@@ -57,17 +59,17 @@ pub enum InputFile<'a> {
|
|||||||
impl<'a> InputFile<'a> {
|
impl<'a> InputFile<'a> {
|
||||||
pub fn get_reader(&self, stdin: &'a io::Stdin) -> Result<InputFileReader> {
|
pub fn get_reader(&self, stdin: &'a io::Stdin) -> Result<InputFileReader> {
|
||||||
match self {
|
match self {
|
||||||
InputFile::StdIn => Ok(InputFileReader::new(stdin.lock())),
|
InputFile::StdIn => InputFileReader::new(stdin.lock()),
|
||||||
InputFile::Ordinary(filename) => {
|
InputFile::Ordinary(filename) => {
|
||||||
let file = File::open(filename)?;
|
let file = File::open(filename).map_err(|e| format!("'{}': {}", filename, e))?;
|
||||||
|
|
||||||
if file.metadata()?.is_dir() {
|
if file.metadata()?.is_dir() {
|
||||||
return Err(format!("'{}' is a directory.", filename).into());
|
return Err(format!("'{}' is a directory.", filename).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(InputFileReader::new(BufReader::new(file)))
|
InputFileReader::new(BufReader::new(file))
|
||||||
}
|
}
|
||||||
InputFile::ThemePreviewFile => Ok(InputFileReader::new(THEME_PREVIEW_FILE)),
|
InputFile::ThemePreviewFile => InputFileReader::new(THEME_PREVIEW_FILE),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,7 +77,7 @@ impl<'a> InputFile<'a> {
|
|||||||
#[test]
|
#[test]
|
||||||
fn basic() {
|
fn basic() {
|
||||||
let content = b"#!/bin/bash\necho hello";
|
let content = b"#!/bin/bash\necho hello";
|
||||||
let mut reader = InputFileReader::new(&content[..]);
|
let mut reader = InputFileReader::new(&content[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(b"#!/bin/bash\n", &reader.first_line[..]);
|
assert_eq!(b"#!/bin/bash\n", &reader.first_line[..]);
|
||||||
|
|
||||||
@@ -104,7 +106,7 @@ fn basic() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn utf16le() {
|
fn utf16le() {
|
||||||
let content = b"\xFF\xFE\x73\x00\x0A\x00\x64\x00";
|
let content = b"\xFF\xFE\x73\x00\x0A\x00\x64\x00";
|
||||||
let mut reader = InputFileReader::new(&content[..]);
|
let mut reader = InputFileReader::new(&content[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(b"\xFF\xFE\x73\x00\x0A\x00", &reader.first_line[..]);
|
assert_eq!(b"\xFF\xFE\x73\x00\x0A\x00", &reader.first_line[..]);
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ impl LineRange {
|
|||||||
|
|
||||||
Err("expected single ':' character".into())
|
Err("expected single ':' character".into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_inside(&self, line: usize) -> bool {
|
||||||
|
line >= self.lower && line <= self.upper
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -72,3 +76,105 @@ fn test_parse_fail() {
|
|||||||
let range = LineRange::from("40");
|
let range = LineRange::from("40");
|
||||||
assert!(range.is_err());
|
assert!(range.is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
|
pub enum RangeCheckResult {
|
||||||
|
// Within one of the given ranges
|
||||||
|
InRange,
|
||||||
|
|
||||||
|
// Before the first range or within two ranges
|
||||||
|
OutsideRange,
|
||||||
|
|
||||||
|
// Line number is outside of all ranges and larger than the last range.
|
||||||
|
AfterLastRange,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct LineRanges {
|
||||||
|
ranges: Vec<LineRange>,
|
||||||
|
largest_upper_bound: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl LineRanges {
|
||||||
|
pub fn from(ranges: Vec<LineRange>) -> LineRanges {
|
||||||
|
let largest_upper_bound = ranges
|
||||||
|
.iter()
|
||||||
|
.map(|r| r.upper)
|
||||||
|
.max()
|
||||||
|
.unwrap_or(usize::max_value());
|
||||||
|
LineRanges {
|
||||||
|
ranges,
|
||||||
|
largest_upper_bound,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn check(&self, line: usize) -> RangeCheckResult {
|
||||||
|
if self.ranges.is_empty() {
|
||||||
|
RangeCheckResult::InRange
|
||||||
|
} else {
|
||||||
|
if self.ranges.iter().any(|r| r.is_inside(line)) {
|
||||||
|
RangeCheckResult::InRange
|
||||||
|
} else {
|
||||||
|
if line < self.largest_upper_bound {
|
||||||
|
RangeCheckResult::OutsideRange
|
||||||
|
} else {
|
||||||
|
RangeCheckResult::AfterLastRange
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
fn ranges(rs: &[&str]) -> LineRanges {
|
||||||
|
LineRanges::from(rs.iter().map(|r| LineRange::from(r).unwrap()).collect())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ranges_simple() {
|
||||||
|
let ranges = ranges(&["3:8"]);
|
||||||
|
|
||||||
|
assert_eq!(RangeCheckResult::OutsideRange, ranges.check(2));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(5));
|
||||||
|
assert_eq!(RangeCheckResult::AfterLastRange, ranges.check(9));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ranges_advanced() {
|
||||||
|
let ranges = ranges(&["3:8", "11:20", "25:30"]);
|
||||||
|
|
||||||
|
assert_eq!(RangeCheckResult::OutsideRange, ranges.check(2));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(5));
|
||||||
|
assert_eq!(RangeCheckResult::OutsideRange, ranges.check(9));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(11));
|
||||||
|
assert_eq!(RangeCheckResult::OutsideRange, ranges.check(22));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(28));
|
||||||
|
assert_eq!(RangeCheckResult::AfterLastRange, ranges.check(31));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ranges_open_low() {
|
||||||
|
let ranges = ranges(&["3:8", ":5"]);
|
||||||
|
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(1));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(3));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(7));
|
||||||
|
assert_eq!(RangeCheckResult::AfterLastRange, ranges.check(9));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ranges_open_high() {
|
||||||
|
let ranges = ranges(&["3:", "2:5"]);
|
||||||
|
|
||||||
|
assert_eq!(RangeCheckResult::OutsideRange, ranges.check(1));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(3));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(5));
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(9));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_ranges_empty() {
|
||||||
|
let ranges = ranges(&[]);
|
||||||
|
|
||||||
|
assert_eq!(RangeCheckResult::InRange, ranges.check(1));
|
||||||
|
}
|
||||||
|
|||||||
+14
-7
@@ -14,7 +14,7 @@ extern crate ansi_term;
|
|||||||
extern crate atty;
|
extern crate atty;
|
||||||
extern crate console;
|
extern crate console;
|
||||||
extern crate content_inspector;
|
extern crate content_inspector;
|
||||||
extern crate directories;
|
extern crate dirs as dirs_rs;
|
||||||
extern crate encoding;
|
extern crate encoding;
|
||||||
extern crate git2;
|
extern crate git2;
|
||||||
extern crate shell_words;
|
extern crate shell_words;
|
||||||
@@ -49,7 +49,7 @@ use ansi_term::Colour::Green;
|
|||||||
use ansi_term::Style;
|
use ansi_term::Style;
|
||||||
|
|
||||||
use app::{App, Config};
|
use app::{App, Config};
|
||||||
use assets::{clear_assets, config_dir, HighlightingAssets};
|
use assets::{cache_dir, clear_assets, config_dir, HighlightingAssets};
|
||||||
use config::config_file;
|
use config::config_file;
|
||||||
use controller::Controller;
|
use controller::Controller;
|
||||||
use inputfile::InputFile;
|
use inputfile::InputFile;
|
||||||
@@ -63,6 +63,9 @@ mod errors {
|
|||||||
SyntectError(::syntect::LoadingError);
|
SyntectError(::syntect::LoadingError);
|
||||||
ParseIntError(::std::num::ParseIntError);
|
ParseIntError(::std::num::ParseIntError);
|
||||||
}
|
}
|
||||||
|
errors {
|
||||||
|
ImmediateEOF
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_error(error: &Error) {
|
pub fn handle_error(error: &Error) {
|
||||||
@@ -83,7 +86,7 @@ mod errors {
|
|||||||
use errors::*;
|
use errors::*;
|
||||||
|
|
||||||
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
|
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
|
||||||
if matches.is_present("init") {
|
if matches.is_present("build") {
|
||||||
let source_dir = matches.value_of("source").map(Path::new);
|
let source_dir = matches.value_of("source").map(Path::new);
|
||||||
let target_dir = matches.value_of("target").map(Path::new);
|
let target_dir = matches.value_of("target").map(Path::new);
|
||||||
|
|
||||||
@@ -93,8 +96,6 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
|
|||||||
assets.save(target_dir)?;
|
assets.save(target_dir)?;
|
||||||
} else if matches.is_present("clear") {
|
} else if matches.is_present("clear") {
|
||||||
clear_assets();
|
clear_assets();
|
||||||
} else if matches.is_present("config-dir") {
|
|
||||||
writeln!(io::stdout(), "{}", config_dir())?;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -195,8 +196,8 @@ fn run_controller(config: &Config) -> Result<bool> {
|
|||||||
controller.run()
|
controller.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `Err(..)` upon fatal errors. Otherwise, returns `Some(true)` on full success and
|
/// Returns `Err(..)` upon fatal errors. Otherwise, returns `Ok(true)` on full success and
|
||||||
/// `Some(false)` if any intermediate errors occurred (were printed).
|
/// `Ok(false)` if any intermediate errors occurred (were printed).
|
||||||
fn run() -> Result<bool> {
|
fn run() -> Result<bool> {
|
||||||
let app = App::new()?;
|
let app = App::new()?;
|
||||||
|
|
||||||
@@ -229,6 +230,12 @@ fn run() -> Result<bool> {
|
|||||||
} else if app.matches.is_present("config-file") {
|
} else if app.matches.is_present("config-file") {
|
||||||
println!("{}", config_file().to_string_lossy());
|
println!("{}", config_file().to_string_lossy());
|
||||||
|
|
||||||
|
Ok(true)
|
||||||
|
} else if app.matches.is_present("config-dir") {
|
||||||
|
writeln!(io::stdout(), "{}", config_dir())?;
|
||||||
|
Ok(true)
|
||||||
|
} else if app.matches.is_present("cache-dir") {
|
||||||
|
writeln!(io::stdout(), "{}", cache_dir())?;
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else {
|
} else {
|
||||||
run_controller(&config)
|
run_controller(&config)
|
||||||
|
|||||||
+38
-12
@@ -15,45 +15,71 @@ pub enum OutputType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl OutputType {
|
impl OutputType {
|
||||||
pub fn from_mode(mode: PagingMode) -> Result<Self> {
|
pub fn from_mode(mode: PagingMode, pager: Option<&str>) -> Result<Self> {
|
||||||
use self::PagingMode::*;
|
use self::PagingMode::*;
|
||||||
Ok(match mode {
|
Ok(match mode {
|
||||||
Always => OutputType::try_pager(false)?,
|
Always => OutputType::try_pager(false, pager)?,
|
||||||
QuitIfOneScreen => OutputType::try_pager(true)?,
|
QuitIfOneScreen => OutputType::try_pager(true, pager)?,
|
||||||
_ => OutputType::stdout(),
|
_ => OutputType::stdout(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Try to launch the pager. Fall back to stdout in case of errors.
|
/// Try to launch the pager. Fall back to stdout in case of errors.
|
||||||
fn try_pager(quit_if_one_screen: bool) -> Result<Self> {
|
fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result<Self> {
|
||||||
let pager = env::var("BAT_PAGER")
|
let mut replace_arguments_to_less = false;
|
||||||
.or_else(|_| env::var("PAGER"))
|
|
||||||
|
let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
|
||||||
|
(Ok(bat_pager), _) => Some(bat_pager),
|
||||||
|
(_, Ok(pager)) => {
|
||||||
|
// less needs to be called with the '-R' option in order to properly interpret the
|
||||||
|
// ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
|
||||||
|
// therefore need to overwrite the arguments and add '-R'.
|
||||||
|
//
|
||||||
|
// We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
|
||||||
|
// or bats '--pager' command line option.
|
||||||
|
replace_arguments_to_less = true;
|
||||||
|
Some(pager)
|
||||||
|
}
|
||||||
|
_ => None,
|
||||||
|
};
|
||||||
|
|
||||||
|
let pager = pager_from_config
|
||||||
|
.map(|p| p.to_string())
|
||||||
|
.or(pager_from_env)
|
||||||
.unwrap_or(String::from("less"));
|
.unwrap_or(String::from("less"));
|
||||||
|
|
||||||
let pagerflags = shell_words::split(&pager)
|
let pagerflags =
|
||||||
.chain_err(|| "Could not parse (BAT_)PAGER environment variable.")?;
|
shell_words::split(&pager).chain_err(|| "Could not parse pager command.")?;
|
||||||
|
|
||||||
match pagerflags.split_first() {
|
match pagerflags.split_first() {
|
||||||
Some((pager_name, args)) => {
|
Some((pager_name, args)) => {
|
||||||
let pager_path = PathBuf::from(pager_name);
|
let mut pager_path = PathBuf::from(pager_name);
|
||||||
|
|
||||||
|
if pager_path.file_stem() == Some(&OsString::from("bat")) {
|
||||||
|
pager_path = PathBuf::from("less");
|
||||||
|
}
|
||||||
|
|
||||||
let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
|
let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
|
||||||
|
|
||||||
let mut process = if is_less {
|
let mut process = if is_less {
|
||||||
let mut p = Command::new(&pager_path);
|
let mut p = Command::new(&pager_path);
|
||||||
if args.is_empty() {
|
if args.is_empty() || replace_arguments_to_less {
|
||||||
p.args(vec!["--RAW-CONTROL-CHARS", "--no-init"]);
|
p.args(vec!["--RAW-CONTROL-CHARS", "--no-init"]);
|
||||||
if quit_if_one_screen {
|
if quit_if_one_screen {
|
||||||
p.arg("--quit-if-one-screen");
|
p.arg("--quit-if-one-screen");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
p.args(args);
|
||||||
}
|
}
|
||||||
p.env("LESSCHARSET", "UTF-8");
|
p.env("LESSCHARSET", "UTF-8");
|
||||||
p
|
p
|
||||||
} else {
|
} else {
|
||||||
Command::new(&pager_path)
|
let mut p = Command::new(&pager_path);
|
||||||
|
p.args(args);
|
||||||
|
p
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(process
|
Ok(process
|
||||||
.args(args)
|
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
.spawn()
|
.spawn()
|
||||||
.map(OutputType::Pager)
|
.map(OutputType::Pager)
|
||||||
|
|||||||
+40
-1
@@ -1,7 +1,7 @@
|
|||||||
use console::AnsiCodeIterator;
|
use console::AnsiCodeIterator;
|
||||||
|
|
||||||
/// Expand tabs like an ANSI-enabled expand(1).
|
/// Expand tabs like an ANSI-enabled expand(1).
|
||||||
pub fn expand(line: &str, width: usize, cursor: &mut usize) -> String {
|
pub fn expand_tabs(line: &str, width: usize, cursor: &mut usize) -> String {
|
||||||
let mut buffer = String::with_capacity(line.len() * 2);
|
let mut buffer = String::with_capacity(line.len() * 2);
|
||||||
|
|
||||||
for chunk in AnsiCodeIterator::new(line) {
|
for chunk in AnsiCodeIterator::new(line) {
|
||||||
@@ -32,3 +32,42 @@ pub fn expand(line: &str, width: usize, cursor: &mut usize) -> String {
|
|||||||
|
|
||||||
buffer
|
buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn replace_nonprintable(input: &str, tab_width: usize) -> String {
|
||||||
|
let mut output = String::new();
|
||||||
|
|
||||||
|
let tab_width = if tab_width == 0 { 4 } else { tab_width };
|
||||||
|
|
||||||
|
for chr in input.chars() {
|
||||||
|
match chr {
|
||||||
|
// space
|
||||||
|
' ' => output.push('•'),
|
||||||
|
// tab
|
||||||
|
'\t' => {
|
||||||
|
if tab_width == 1 {
|
||||||
|
output.push('↹');
|
||||||
|
} else {
|
||||||
|
output.push('├');
|
||||||
|
output.push_str(&"─".repeat(tab_width - 2));
|
||||||
|
output.push('┤');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// line feed
|
||||||
|
'\x0A' => output.push('␊'),
|
||||||
|
// carriage return
|
||||||
|
'\x0D' => output.push('␍'),
|
||||||
|
// null
|
||||||
|
'\x00' => output.push('␀'),
|
||||||
|
// bell
|
||||||
|
'\x07' => output.push('␇'),
|
||||||
|
// backspace
|
||||||
|
'\x08' => output.push('␈'),
|
||||||
|
// escape
|
||||||
|
'\x1B' => output.push('␛'),
|
||||||
|
// anything else
|
||||||
|
_ => output.push(chr),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output
|
||||||
|
}
|
||||||
|
|||||||
+64
-5
@@ -7,6 +7,7 @@ use ansi_term::Style;
|
|||||||
use console::AnsiCodeIterator;
|
use console::AnsiCodeIterator;
|
||||||
|
|
||||||
use syntect::easy::HighlightLines;
|
use syntect::easy::HighlightLines;
|
||||||
|
use syntect::highlighting::Color;
|
||||||
use syntect::highlighting::Theme;
|
use syntect::highlighting::Theme;
|
||||||
use syntect::parsing::SyntaxSet;
|
use syntect::parsing::SyntaxSet;
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@ use diff::get_git_diff;
|
|||||||
use diff::LineChanges;
|
use diff::LineChanges;
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use inputfile::{InputFile, InputFileReader};
|
use inputfile::{InputFile, InputFileReader};
|
||||||
use preprocessor::expand;
|
use preprocessor::{expand_tabs, replace_nonprintable};
|
||||||
use style::OutputWrap;
|
use style::OutputWrap;
|
||||||
use terminal::{as_terminal_escaped, to_ansi_color};
|
use terminal::{as_terminal_escaped, to_ansi_color};
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ pub struct InteractivePrinter<'a> {
|
|||||||
pub line_changes: Option<LineChanges>,
|
pub line_changes: Option<LineChanges>,
|
||||||
highlighter: Option<HighlightLines<'a>>,
|
highlighter: Option<HighlightLines<'a>>,
|
||||||
syntax_set: &'a SyntaxSet,
|
syntax_set: &'a SyntaxSet,
|
||||||
|
background_color_highlight: Option<Color>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> InteractivePrinter<'a> {
|
impl<'a> InteractivePrinter<'a> {
|
||||||
@@ -90,6 +92,8 @@ impl<'a> InteractivePrinter<'a> {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
let theme = assets.get_theme(&config.theme);
|
let theme = assets.get_theme(&config.theme);
|
||||||
|
|
||||||
|
let background_color_highlight = theme.settings.line_highlight;
|
||||||
|
|
||||||
let colors = if config.colored_output {
|
let colors = if config.colored_output {
|
||||||
Colors::colored(theme, config.true_color)
|
Colors::colored(theme, config.true_color)
|
||||||
} else {
|
} else {
|
||||||
@@ -156,6 +160,7 @@ impl<'a> InteractivePrinter<'a> {
|
|||||||
line_changes,
|
line_changes,
|
||||||
highlighter,
|
highlighter,
|
||||||
syntax_set: &assets.syntax_set,
|
syntax_set: &assets.syntax_set,
|
||||||
|
background_color_highlight,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,7 +182,7 @@ impl<'a> InteractivePrinter<'a> {
|
|||||||
|
|
||||||
fn preprocess(&self, text: &str, cursor: &mut usize) -> String {
|
fn preprocess(&self, text: &str, cursor: &mut usize) -> String {
|
||||||
if self.config.tab_width > 0 {
|
if self.config.tab_width > 0 {
|
||||||
expand(text, self.config.tab_width, cursor)
|
expand_tabs(text, self.config.tab_width, cursor)
|
||||||
} else {
|
} else {
|
||||||
text.to_string()
|
text.to_string()
|
||||||
}
|
}
|
||||||
@@ -251,7 +256,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
line_number: usize,
|
line_number: usize,
|
||||||
line_buffer: &[u8],
|
line_buffer: &[u8],
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let line = match self.content_type {
|
let mut line = match self.content_type {
|
||||||
ContentType::BINARY => {
|
ContentType::BINARY => {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
@@ -263,6 +268,11 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
.unwrap_or("Invalid UTF-16BE".into()),
|
.unwrap_or("Invalid UTF-16BE".into()),
|
||||||
_ => String::from_utf8_lossy(&line_buffer).to_string(),
|
_ => String::from_utf8_lossy(&line_buffer).to_string(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if self.config.show_nonprintable {
|
||||||
|
line = replace_nonprintable(&mut line, self.config.tab_width);
|
||||||
|
}
|
||||||
|
|
||||||
let regions = {
|
let regions = {
|
||||||
let highlighter = match self.highlighter {
|
let highlighter = match self.highlighter {
|
||||||
Some(ref mut highlighter) => highlighter,
|
Some(ref mut highlighter) => highlighter,
|
||||||
@@ -282,6 +292,17 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
let mut cursor_total: usize = 0;
|
let mut cursor_total: usize = 0;
|
||||||
let mut panel_wrap: Option<String> = None;
|
let mut panel_wrap: Option<String> = None;
|
||||||
|
|
||||||
|
// Line highlighting
|
||||||
|
let highlight_this_line = self
|
||||||
|
.config
|
||||||
|
.highlight_lines
|
||||||
|
.iter()
|
||||||
|
.any(|&l| l == line_number);
|
||||||
|
|
||||||
|
let background_color = self
|
||||||
|
.background_color_highlight
|
||||||
|
.filter(|_| highlight_this_line);
|
||||||
|
|
||||||
// Line decorations.
|
// Line decorations.
|
||||||
if self.panel_width > 0 {
|
if self.panel_width > 0 {
|
||||||
let decorations = self
|
let decorations = self
|
||||||
@@ -300,14 +321,37 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
if self.config.output_wrap == OutputWrap::None {
|
if self.config.output_wrap == OutputWrap::None {
|
||||||
let true_color = self.config.true_color;
|
let true_color = self.config.true_color;
|
||||||
let colored_output = self.config.colored_output;
|
let colored_output = self.config.colored_output;
|
||||||
|
let italics = self.config.use_italic_text;
|
||||||
|
|
||||||
for &(style, region) in regions.iter() {
|
for &(style, region) in regions.iter() {
|
||||||
let text = &*self.preprocess(region, &mut cursor_total);
|
let text = &*self.preprocess(region, &mut cursor_total);
|
||||||
|
let text_trimmed = text.trim_end_matches(|c| c == '\r' || c == '\n');
|
||||||
write!(
|
write!(
|
||||||
handle,
|
handle,
|
||||||
"{}",
|
"{}",
|
||||||
as_terminal_escaped(style, &*text, true_color, colored_output,)
|
as_terminal_escaped(
|
||||||
|
style,
|
||||||
|
text_trimmed,
|
||||||
|
true_color,
|
||||||
|
colored_output,
|
||||||
|
italics,
|
||||||
|
background_color
|
||||||
|
)
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
if text.len() != text_trimmed.len() {
|
||||||
|
if let Some(background_color) = background_color {
|
||||||
|
let mut ansi_style = Style::default();
|
||||||
|
ansi_style.background = Some(to_ansi_color(background_color, true_color));
|
||||||
|
let width = if cursor_total <= cursor_max {
|
||||||
|
cursor_max - cursor_total + 1
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
};
|
||||||
|
write!(handle, "{}", ansi_style.paint(" ".repeat(width)))?;
|
||||||
|
}
|
||||||
|
write!(handle, "{}", &text[text_trimmed.len()..])?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if line.bytes().next_back() != Some(b'\n') {
|
if line.bytes().next_back() != Some(b'\n') {
|
||||||
@@ -336,7 +380,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
// Regular text.
|
// Regular text.
|
||||||
(text, false) => {
|
(text, false) => {
|
||||||
let text = self.preprocess(
|
let text = self.preprocess(
|
||||||
text.trim_right_matches(|c| c == '\r' || c == '\n'),
|
text.trim_end_matches(|c| c == '\r' || c == '\n'),
|
||||||
&mut cursor_total,
|
&mut cursor_total,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -362,6 +406,8 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
),
|
),
|
||||||
self.config.true_color,
|
self.config.true_color,
|
||||||
self.config.colored_output,
|
self.config.colored_output,
|
||||||
|
self.config.use_italic_text,
|
||||||
|
background_color
|
||||||
)
|
)
|
||||||
)?;
|
)?;
|
||||||
break;
|
break;
|
||||||
@@ -401,6 +447,8 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
),
|
),
|
||||||
self.config.true_color,
|
self.config.true_color,
|
||||||
self.config.colored_output,
|
self.config.colored_output,
|
||||||
|
self.config.use_italic_text,
|
||||||
|
background_color
|
||||||
),
|
),
|
||||||
panel_wrap.clone().unwrap()
|
panel_wrap.clone().unwrap()
|
||||||
)?;
|
)?;
|
||||||
@@ -413,6 +461,17 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(background_color) = background_color {
|
||||||
|
let mut ansi_style = Style::default();
|
||||||
|
ansi_style.background =
|
||||||
|
Some(to_ansi_color(background_color, self.config.true_color));
|
||||||
|
|
||||||
|
write!(
|
||||||
|
handle,
|
||||||
|
"{}",
|
||||||
|
ansi_style.paint(" ".repeat(cursor_max - cursor))
|
||||||
|
)?;
|
||||||
|
}
|
||||||
write!(handle, "\n")?;
|
write!(handle, "\n")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,24 +9,24 @@ impl SyntaxMapping {
|
|||||||
SyntaxMapping(HashMap::new())
|
SyntaxMapping(HashMap::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert(&mut self, from: String, to: String) -> Option<String> {
|
pub fn insert(&mut self, from: impl Into<String>, to: impl Into<String>) -> Option<String> {
|
||||||
self.0.insert(from, to)
|
self.0.insert(from.into(), to.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn replace<'a>(&self, input: &'a str) -> Cow<'a, str> {
|
pub fn replace<'a>(&self, input: impl Into<Cow<'a, str>>) -> Cow<'a, str> {
|
||||||
let mut out = Cow::from(input);
|
let input = input.into();
|
||||||
if let Some(value) = self.0.get(input) {
|
match self.0.get(input.as_ref()) {
|
||||||
out = Cow::from(value.clone())
|
Some(s) => Cow::from(s.clone()),
|
||||||
|
None => input,
|
||||||
}
|
}
|
||||||
out
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn basic() {
|
fn basic() {
|
||||||
let mut map = SyntaxMapping::new();
|
let mut map = SyntaxMapping::new();
|
||||||
map.insert("Cargo.lock".into(), "toml".into());
|
map.insert("Cargo.lock", "toml");
|
||||||
map.insert(".ignore".into(), ".gitignore".into());
|
map.insert(".ignore", ".gitignore");
|
||||||
|
|
||||||
assert_eq!("toml", map.replace("Cargo.lock"));
|
assert_eq!("toml", map.replace("Cargo.lock"));
|
||||||
assert_eq!("other.lock", map.replace("other.lock"));
|
assert_eq!("other.lock", map.replace("other.lock"));
|
||||||
|
|||||||
+5
-2
@@ -18,8 +18,10 @@ pub fn as_terminal_escaped(
|
|||||||
text: &str,
|
text: &str,
|
||||||
true_color: bool,
|
true_color: bool,
|
||||||
colored: bool,
|
colored: bool,
|
||||||
|
italics: bool,
|
||||||
|
background_color: Option<highlighting::Color>,
|
||||||
) -> String {
|
) -> String {
|
||||||
let style = if !colored {
|
let mut style = if !colored {
|
||||||
Style::default()
|
Style::default()
|
||||||
} else {
|
} else {
|
||||||
let color = to_ansi_color(style.foreground, true_color);
|
let color = to_ansi_color(style.foreground, true_color);
|
||||||
@@ -28,12 +30,13 @@ pub fn as_terminal_escaped(
|
|||||||
color.bold()
|
color.bold()
|
||||||
} else if style.font_style.contains(FontStyle::UNDERLINE) {
|
} else if style.font_style.contains(FontStyle::UNDERLINE) {
|
||||||
color.underline()
|
color.underline()
|
||||||
} else if style.font_style.contains(FontStyle::ITALIC) {
|
} else if italics && style.font_style.contains(FontStyle::ITALIC) {
|
||||||
color.italic()
|
color.italic()
|
||||||
} else {
|
} else {
|
||||||
color.normal()
|
color.normal()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
style.background = background_color.map(|c| to_ansi_color(c, true_color));
|
||||||
style.paint(text).to_string()
|
style.paint(text).to_string()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
examples/* linguist-vendored
|
||||||
|
snapshots/* linguist-vendored
|
||||||
|
benchmarks/* linguist-vendored
|
||||||
|
benchmarks/test-src/* linguist-vendored
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
test-src/* linguist-vendored
|
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
# Make sure that the pager gets executed
|
||||||
|
--paging=always
|
||||||
|
|
||||||
|
# Output a dummy message for the integration test.
|
||||||
|
--pager="echo dummy-pager-from-config"
|
||||||
Vendored
+9
@@ -0,0 +1,9 @@
|
|||||||
|
1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
+216
-3
@@ -1,14 +1,35 @@
|
|||||||
extern crate assert_cmd;
|
extern crate assert_cmd;
|
||||||
|
extern crate escargot;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate lazy_static;
|
||||||
|
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::prelude::*;
|
||||||
|
use escargot::CargoRun;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
fn bat() -> Command {
|
lazy_static! {
|
||||||
let mut cmd = Command::main_binary().unwrap();
|
static ref CARGO_RUN: CargoRun = escargot::CargoBuild::new()
|
||||||
|
.bin("bat")
|
||||||
|
.current_release()
|
||||||
|
.run()
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bat_with_config() -> Command {
|
||||||
|
let mut cmd = CARGO_RUN.command();
|
||||||
cmd.current_dir("tests/examples");
|
cmd.current_dir("tests/examples");
|
||||||
cmd.arg("--no-config");
|
|
||||||
cmd.env_remove("PAGER");
|
cmd.env_remove("PAGER");
|
||||||
cmd.env_remove("BAT_PAGER");
|
cmd.env_remove("BAT_PAGER");
|
||||||
|
cmd.env_remove("BAT_CONFIG_PATH");
|
||||||
|
cmd.env_remove("BAT_STYLE");
|
||||||
|
cmd.env_remove("BAT_THEME");
|
||||||
|
cmd.env_remove("BAT_TABS");
|
||||||
|
cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bat() -> Command {
|
||||||
|
let mut cmd = bat_with_config();
|
||||||
|
cmd.arg("--no-config");
|
||||||
cmd
|
cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +117,178 @@ fn line_range_last_3() {
|
|||||||
.stdout("line 2\nline 3\nline 4\n");
|
.stdout("line 2\nline 3\nline 4\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn line_range_multiple() {
|
||||||
|
bat()
|
||||||
|
.arg("multiline.txt")
|
||||||
|
.arg("--line-range=1:2")
|
||||||
|
.arg("--line-range=4:4")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout("line 1\nline 2\nline 4\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_numbers() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=4")
|
||||||
|
.arg("--style=numbers")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 1 2 3 4
|
||||||
|
2 1 ?
|
||||||
|
3 22 ?
|
||||||
|
4 333 ?
|
||||||
|
5 4444 ?
|
||||||
|
6 55555 ?
|
||||||
|
7 666666 ?
|
||||||
|
8 7777777 ?
|
||||||
|
9 88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_passthrough_wrapped() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=0")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_4_wrapped() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=4")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_8_wrapped() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=8")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_passthrough() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=0")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_4() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=4")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tabs_8() {
|
||||||
|
bat()
|
||||||
|
.arg("tabs.txt")
|
||||||
|
.arg("--tabs=8")
|
||||||
|
.arg("--style=plain")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout(
|
||||||
|
" 1 2 3 4
|
||||||
|
1 ?
|
||||||
|
22 ?
|
||||||
|
333 ?
|
||||||
|
4444 ?
|
||||||
|
55555 ?
|
||||||
|
666666 ?
|
||||||
|
7777777 ?
|
||||||
|
88888888 ?
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn fail_non_existing() {
|
fn fail_non_existing() {
|
||||||
bat().arg("non-existing-file").assert().failure();
|
bat().arg("non-existing-file").assert().failure();
|
||||||
@@ -150,3 +343,23 @@ fn pager_disable() {
|
|||||||
.success()
|
.success()
|
||||||
.stdout("hello world\n");
|
.stdout("hello world\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn config_location_test() {
|
||||||
|
bat_with_config()
|
||||||
|
.env("BAT_CONFIG_PATH", "bat.conf")
|
||||||
|
.arg("--config-file")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout("bat.conf\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn config_read_arguments_from_file() {
|
||||||
|
bat_with_config()
|
||||||
|
.env("BAT_CONFIG_PATH", "bat.conf")
|
||||||
|
.arg("test.txt")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout("dummy-pager-from-config\n");
|
||||||
|
}
|
||||||
|
|||||||
+19
-25
@@ -3,39 +3,33 @@ mod tester;
|
|||||||
use tester::BatTester;
|
use tester::BatTester;
|
||||||
|
|
||||||
macro_rules! snapshot_tests {
|
macro_rules! snapshot_tests {
|
||||||
($($test_name: ident: $style: expr => [wrap: $wrap:expr, tabs: $tabs:expr],)*) => {
|
($($test_name: ident: $style: expr,)*) => {
|
||||||
$(
|
$(
|
||||||
#[test]
|
#[test]
|
||||||
fn $test_name() {
|
fn $test_name() {
|
||||||
let bat_tester = BatTester::new();
|
let bat_tester = BatTester::new();
|
||||||
bat_tester.test_snapshot(stringify!($test_name), $style, $tabs, $wrap);
|
bat_tester.test_snapshot(stringify!($test_name), $style);
|
||||||
}
|
}
|
||||||
)*
|
)*
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
snapshot_tests! {
|
snapshot_tests! {
|
||||||
changes: "changes" => [wrap: false, tabs: 8],
|
changes: "changes",
|
||||||
grid: "grid" => [wrap: false, tabs: 8],
|
grid: "grid",
|
||||||
header: "header" => [wrap: false, tabs: 8],
|
header: "header",
|
||||||
numbers: "numbers" => [wrap: false, tabs: 8],
|
numbers: "numbers",
|
||||||
changes_grid: "changes,grid" => [wrap: false, tabs: 8],
|
changes_grid: "changes,grid",
|
||||||
changes_header: "changes,header" => [wrap: false, tabs: 8],
|
changes_header: "changes,header",
|
||||||
changes_numbers: "changes,numbers" => [wrap: false, tabs: 8],
|
changes_numbers: "changes,numbers",
|
||||||
grid_header: "grid,header" => [wrap: false, tabs: 8],
|
grid_header: "grid,header",
|
||||||
grid_numbers: "grid,numbers" => [wrap: false, tabs: 8],
|
grid_numbers: "grid,numbers",
|
||||||
header_numbers: "header,numbers" => [wrap: false, tabs: 8],
|
header_numbers: "header,numbers",
|
||||||
changes_grid_header: "changes,grid,header" => [wrap: false, tabs: 8],
|
changes_grid_header: "changes,grid,header",
|
||||||
changes_grid_numbers: "changes,grid,numbers" => [wrap: false, tabs: 8],
|
changes_grid_numbers: "changes,grid,numbers",
|
||||||
changes_header_numbers: "changes,header,numbers" => [wrap: false, tabs: 8],
|
changes_header_numbers: "changes,header,numbers",
|
||||||
grid_header_numbers: "grid,header,numbers" => [wrap: false, tabs: 8],
|
grid_header_numbers: "grid,header,numbers",
|
||||||
changes_grid_header_numbers: "changes,grid,header,numbers" => [wrap: false, tabs: 8],
|
changes_grid_header_numbers: "changes,grid,header,numbers",
|
||||||
full: "full" => [wrap: false, tabs: 8],
|
full: "full",
|
||||||
plain: "plain" => [wrap: false, tabs: 0],
|
plain: "plain",
|
||||||
tabs_passthrough_wrapped: "full" => [wrap: true, tabs: 0],
|
|
||||||
tabs_4_wrapped: "full" => [wrap: true, tabs: 4],
|
|
||||||
tabs_8_wrapped: "full" => [wrap: true, tabs: 8],
|
|
||||||
tabs_passthrough: "full" => [wrap: false, tabs: 0],
|
|
||||||
tabs_4: "full" => [wrap: false, tabs: 4],
|
|
||||||
tabs_8: "full" => [wrap: false, tabs: 8],
|
|
||||||
}
|
}
|
||||||
|
|||||||
-7
@@ -17,13 +17,6 @@ def generate_snapshots():
|
|||||||
for style in collective_styles:
|
for style in collective_styles:
|
||||||
generate_style_snapshot(style)
|
generate_style_snapshot(style)
|
||||||
|
|
||||||
generate_snapshot("tabs_passthrough", "--tabs=0 --style=full --wrap=never")
|
|
||||||
generate_snapshot("tabs_passthrough_wrapped", "--tabs=0 --style=full --wrap=character")
|
|
||||||
generate_snapshot("tabs_4", "--tabs=4 --style=full --wrap=never")
|
|
||||||
generate_snapshot("tabs_4_wrapped", "--tabs=4 --style=full --wrap=character")
|
|
||||||
generate_snapshot("tabs_8", "--tabs=8 --style=full --wrap=never")
|
|
||||||
generate_snapshot("tabs_8_wrapped", "--tabs=8 --style=full --wrap=character")
|
|
||||||
|
|
||||||
|
|
||||||
def generate_style_snapshot(style):
|
def generate_style_snapshot(style):
|
||||||
generate_snapshot(style.replace(",", "_"), "--style={}".format(style))
|
generate_snapshot(style.replace(",", "_"), "--style={}".format(style))
|
||||||
|
|||||||
@@ -16,21 +16,7 @@ _ fn main() {
|
|||||||
fn area(rectangle: &Rectangle) -> u32 {
|
fn area(rectangle: &Rectangle) -> u32 {
|
||||||
rectangle.width * rectangle.height
|
rectangle.width * rectangle.height
|
||||||
}
|
}
|
||||||
|
+
|
||||||
+ fn perimeter(rectangle: &Rectangle) -> u32 {
|
+ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
+ (rectangle.width + rectangle.height) * 2
|
+ (rectangle.width + rectangle.height) * 2
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
~ */
|
|
||||||
|
|||||||
@@ -16,22 +16,8 @@ _ │ fn main() {
|
|||||||
│ fn area(rectangle: &Rectangle) -> u32 {
|
│ fn area(rectangle: &Rectangle) -> u32 {
|
||||||
│ rectangle.width * rectangle.height
|
│ rectangle.width * rectangle.height
|
||||||
│ }
|
│ }
|
||||||
│
|
+ │
|
||||||
+ │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
+ │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
+ │ (rectangle.width + rectangle.height) * 2
|
+ │ (rectangle.width + rectangle.height) * 2
|
||||||
+ │ }
|
+ │ }
|
||||||
+ │
|
|
||||||
│ // Tab alignment:
|
|
||||||
│ /*
|
|
||||||
│ Indent
|
|
||||||
│ 1 2 3 4
|
|
||||||
│ 1 ?
|
|
||||||
│ 22 ?
|
|
||||||
│ 333 ?
|
|
||||||
│ 4444 ?
|
|
||||||
│ 55555 ?
|
|
||||||
│ 666666 ?
|
|
||||||
│ 7777777 ?
|
|
||||||
│ 88888888 ?
|
|
||||||
~ │ */
|
|
||||||
──┴─────────────────────────────────────────────────────────────────────────────
|
──┴─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -19,22 +19,8 @@ _ │ fn main() {
|
|||||||
│ fn area(rectangle: &Rectangle) -> u32 {
|
│ fn area(rectangle: &Rectangle) -> u32 {
|
||||||
│ rectangle.width * rectangle.height
|
│ rectangle.width * rectangle.height
|
||||||
│ }
|
│ }
|
||||||
│
|
+ │
|
||||||
+ │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
+ │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
+ │ (rectangle.width + rectangle.height) * 2
|
+ │ (rectangle.width + rectangle.height) * 2
|
||||||
+ │ }
|
+ │ }
|
||||||
+ │
|
|
||||||
│ // Tab alignment:
|
|
||||||
│ /*
|
|
||||||
│ Indent
|
|
||||||
│ 1 2 3 4
|
|
||||||
│ 1 ?
|
|
||||||
│ 22 ?
|
|
||||||
│ 333 ?
|
|
||||||
│ 4444 ?
|
|
||||||
│ 55555 ?
|
|
||||||
│ 666666 ?
|
|
||||||
│ 7777777 ?
|
|
||||||
│ 88888888 ?
|
|
||||||
~ │ */
|
|
||||||
──┴─────────────────────────────────────────────────────────────────────────────
|
──┴─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -19,22 +19,8 @@
|
|||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||||
17 │ rectangle.width * rectangle.height
|
17 │ rectangle.width * rectangle.height
|
||||||
18 │ }
|
18 │ }
|
||||||
19 │
|
19 + │
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
21 + │ (rectangle.width + rectangle.height) * 2
|
||||||
22 + │ }
|
22 + │ }
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
───────┴────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -16,22 +16,8 @@
|
|||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||||
17 │ rectangle.width * rectangle.height
|
17 │ rectangle.width * rectangle.height
|
||||||
18 │ }
|
18 │ }
|
||||||
19 │
|
19 + │
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
21 + │ (rectangle.width + rectangle.height) * 2
|
||||||
22 + │ }
|
22 + │ }
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
───────┴────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -17,21 +17,7 @@ _ fn main() {
|
|||||||
fn area(rectangle: &Rectangle) -> u32 {
|
fn area(rectangle: &Rectangle) -> u32 {
|
||||||
rectangle.width * rectangle.height
|
rectangle.width * rectangle.height
|
||||||
}
|
}
|
||||||
|
+
|
||||||
+ fn perimeter(rectangle: &Rectangle) -> u32 {
|
+ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
+ (rectangle.width + rectangle.height) * 2
|
+ (rectangle.width + rectangle.height) * 2
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
~ */
|
|
||||||
|
|||||||
@@ -17,21 +17,7 @@
|
|||||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||||
17 rectangle.width * rectangle.height
|
17 rectangle.width * rectangle.height
|
||||||
18 }
|
18 }
|
||||||
19
|
19 +
|
||||||
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 + (rectangle.width + rectangle.height) * 2
|
21 + (rectangle.width + rectangle.height) * 2
|
||||||
22 + }
|
22 + }
|
||||||
23 +
|
|
||||||
24 // Tab alignment:
|
|
||||||
25 /*
|
|
||||||
26 Indent
|
|
||||||
27 1 2 3 4
|
|
||||||
28 1 ?
|
|
||||||
29 22 ?
|
|
||||||
30 333 ?
|
|
||||||
31 4444 ?
|
|
||||||
32 55555 ?
|
|
||||||
33 666666 ?
|
|
||||||
34 7777777 ?
|
|
||||||
35 88888888 ?
|
|
||||||
36 ~ */
|
|
||||||
|
|||||||
@@ -16,21 +16,7 @@
|
|||||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||||
17 rectangle.width * rectangle.height
|
17 rectangle.width * rectangle.height
|
||||||
18 }
|
18 }
|
||||||
19
|
19 +
|
||||||
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 + (rectangle.width + rectangle.height) * 2
|
21 + (rectangle.width + rectangle.height) * 2
|
||||||
22 + }
|
22 + }
|
||||||
23 +
|
|
||||||
24 // Tab alignment:
|
|
||||||
25 /*
|
|
||||||
26 Indent
|
|
||||||
27 1 2 3 4
|
|
||||||
28 1 ?
|
|
||||||
29 22 ?
|
|
||||||
30 333 ?
|
|
||||||
31 4444 ?
|
|
||||||
32 55555 ?
|
|
||||||
33 666666 ?
|
|
||||||
34 7777777 ?
|
|
||||||
35 88888888 ?
|
|
||||||
36 ~ */
|
|
||||||
|
|||||||
@@ -19,22 +19,8 @@
|
|||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||||
17 │ rectangle.width * rectangle.height
|
17 │ rectangle.width * rectangle.height
|
||||||
18 │ }
|
18 │ }
|
||||||
19 │
|
19 + │
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
21 + │ (rectangle.width + rectangle.height) * 2
|
||||||
22 + │ }
|
22 + │ }
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
───────┴────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -20,18 +20,4 @@ fn area(rectangle: &Rectangle) -> u32 {
|
|||||||
fn perimeter(rectangle: &Rectangle) -> u32 {
|
fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
(rectangle.width + rectangle.height) * 2
|
(rectangle.width + rectangle.height) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -23,18 +23,4 @@ fn area(rectangle: &Rectangle) -> u32 {
|
|||||||
fn perimeter(rectangle: &Rectangle) -> u32 {
|
fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
(rectangle.width + rectangle.height) * 2
|
(rectangle.width + rectangle.height) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -23,18 +23,4 @@
|
|||||||
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 │ (rectangle.width + rectangle.height) * 2
|
21 │ (rectangle.width + rectangle.height) * 2
|
||||||
22 │ }
|
22 │ }
|
||||||
23 │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 │ */
|
|
||||||
─────┴──────────────────────────────────────────────────────────────────────────
|
─────┴──────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -20,18 +20,4 @@
|
|||||||
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 │ (rectangle.width + rectangle.height) * 2
|
21 │ (rectangle.width + rectangle.height) * 2
|
||||||
22 │ }
|
22 │ }
|
||||||
23 │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 │ */
|
|
||||||
─────┴──────────────────────────────────────────────────────────────────────────
|
─────┴──────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -21,17 +21,3 @@ fn area(rectangle: &Rectangle) -> u32 {
|
|||||||
fn perimeter(rectangle: &Rectangle) -> u32 {
|
fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
(rectangle.width + rectangle.height) * 2
|
(rectangle.width + rectangle.height) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -21,17 +21,3 @@
|
|||||||
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 (rectangle.width + rectangle.height) * 2
|
21 (rectangle.width + rectangle.height) * 2
|
||||||
22 }
|
22 }
|
||||||
23
|
|
||||||
24 // Tab alignment:
|
|
||||||
25 /*
|
|
||||||
26 Indent
|
|
||||||
27 1 2 3 4
|
|
||||||
28 1 ?
|
|
||||||
29 22 ?
|
|
||||||
30 333 ?
|
|
||||||
31 4444 ?
|
|
||||||
32 55555 ?
|
|
||||||
33 666666 ?
|
|
||||||
34 7777777 ?
|
|
||||||
35 88888888 ?
|
|
||||||
36 */
|
|
||||||
|
|||||||
@@ -20,17 +20,3 @@
|
|||||||
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
21 (rectangle.width + rectangle.height) * 2
|
21 (rectangle.width + rectangle.height) * 2
|
||||||
22 }
|
22 }
|
||||||
23
|
|
||||||
24 // Tab alignment:
|
|
||||||
25 /*
|
|
||||||
26 Indent
|
|
||||||
27 1 2 3 4
|
|
||||||
28 1 ?
|
|
||||||
29 22 ?
|
|
||||||
30 333 ?
|
|
||||||
31 4444 ?
|
|
||||||
32 55555 ?
|
|
||||||
33 666666 ?
|
|
||||||
34 7777777 ?
|
|
||||||
35 88888888 ?
|
|
||||||
36 */
|
|
||||||
|
|||||||
@@ -20,17 +20,3 @@ fn area(rectangle: &Rectangle) -> u32 {
|
|||||||
fn perimeter(rectangle: &Rectangle) -> u32 {
|
fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
(rectangle.width + rectangle.height) * 2
|
(rectangle.width + rectangle.height) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
───────┬────────────────────────────────────────────────────────────────────────
|
|
||||||
│ File: sample.rs
|
|
||||||
───────┼────────────────────────────────────────────────────────────────────────
|
|
||||||
1 │ struct Rectangle {
|
|
||||||
2 │ width: u32,
|
|
||||||
3 │ height: u32,
|
|
||||||
4 │ }
|
|
||||||
5 │
|
|
||||||
6 _ │ fn main() {
|
|
||||||
7 │ let rect1 = Rectangle { width: 30, height: 50 };
|
|
||||||
8 │
|
|
||||||
9 │ println!(
|
|
||||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
|
||||||
11 ~ │ perimeter(&rect1)
|
|
||||||
12 │ );
|
|
||||||
13 + │ println!(r#"This line contains invalid utf8: "�����"#;
|
|
||||||
14 │ }
|
|
||||||
15 │
|
|
||||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
|
||||||
17 │ rectangle.width * rectangle.height
|
|
||||||
18 │ }
|
|
||||||
19 │
|
|
||||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
|
||||||
21 + │ (rectangle.width + rectangle.height) * 2
|
|
||||||
22 + │ }
|
|
||||||
23 + │
|
|
||||||
24 │ // Tab alignment:
|
|
||||||
25 │ /*
|
|
||||||
26 │ Indent
|
|
||||||
27 │ 1 2 3 4
|
|
||||||
28 │ 1 ?
|
|
||||||
29 │ 22 ?
|
|
||||||
30 │ 333 ?
|
|
||||||
31 │ 4444 ?
|
|
||||||
32 │ 55555 ?
|
|
||||||
33 │ 666666 ?
|
|
||||||
34 │ 7777777 ?
|
|
||||||
35 │ 88888888 ?
|
|
||||||
36 ~ │ */
|
|
||||||
───────┴────────────────────────────────────────────────────────────────────────
|
|
||||||
Vendored
-14
@@ -20,17 +20,3 @@ fn area(rectangle: &Rectangle) -> u32 {
|
|||||||
fn perimeter(rectangle: &Rectangle) -> u32 {
|
fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||||
(rectangle.width + rectangle.height) * 2
|
(rectangle.width + rectangle.height) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
|
|||||||
Vendored
-14
@@ -16,17 +16,3 @@ fn main() {
|
|||||||
fn area(rectangle: &Rectangle) -> u32 {
|
fn area(rectangle: &Rectangle) -> u32 {
|
||||||
rectangle.width * rectangle.height
|
rectangle.width * rectangle.height
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tab alignment:
|
|
||||||
/*
|
|
||||||
Indent
|
|
||||||
1 2 3 4
|
|
||||||
1 ?
|
|
||||||
22 ?
|
|
||||||
333 ?
|
|
||||||
4444 ?
|
|
||||||
55555 ?
|
|
||||||
666666 ?
|
|
||||||
7777777 ?
|
|
||||||
88888888 ?
|
|
||||||
*/
|
|
||||||
+1
-3
@@ -38,7 +38,7 @@ impl BatTester {
|
|||||||
BatTester { temp_dir, exe }
|
BatTester { temp_dir, exe }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn test_snapshot(&self, name: &str, style: &str, tab_width: u32, wrap: bool) {
|
pub fn test_snapshot(&self, name: &str, style: &str) {
|
||||||
let output = Command::new(&self.exe)
|
let output = Command::new(&self.exe)
|
||||||
.current_dir(self.temp_dir.path())
|
.current_dir(self.temp_dir.path())
|
||||||
.args(&[
|
.args(&[
|
||||||
@@ -48,8 +48,6 @@ impl BatTester {
|
|||||||
"--color=never",
|
"--color=never",
|
||||||
"--decorations=always",
|
"--decorations=always",
|
||||||
"--terminal-width=80",
|
"--terminal-width=80",
|
||||||
&format!("--wrap={}", if wrap { "character" } else { "never" }),
|
|
||||||
&format!("--tabs={}", tab_width),
|
|
||||||
&format!("--style={}", style),
|
&format!("--style={}", style),
|
||||||
])
|
])
|
||||||
.output()
|
.output()
|
||||||
|
|||||||
Reference in New Issue
Block a user