1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-03 18:51:44 +00:00

Compare commits

...

38 Commits

Author SHA1 Message Date
sharkdp 2508323264 Extract grid and line-number color from theme
This changes the output color of the grid and the line numbers to use
the "gutter" foreground color defined in the Sublime `.tmTheme` files.

Sublime Text does the same.

Note: we could go one step further and also extract the "GitGutter"
colors from the themes. These could be used instead of red/green/yellow
to signify Git modifications. The problem is that they are quite a bit
harder to extract from the syntect `Theme` object.

closes #178
2018-08-19 12:32:35 +02:00
sharkdp 297afad337 Bump version 2018-08-19 12:31:35 +02:00
sharkdp 1dddce3aa1 Separate syntax set and theme set
This commit separates the handling of syntax sets and theme sets. It
also changes the way how new syntax definitions are loaded from `bat`'s
configuration folder. New syntax definitions are now loaded *in
addition* to the ones that are stored in the `bat` binary by default.

This fixes #172
2018-08-19 11:08:23 +02:00
sharkdp 76be0d3933 Add arm as a compile target 2018-08-19 09:50:24 +02:00
sharkdp e5b8c4471a Bump minimum required rust version 2018-08-18 21:30:12 +02:00
sharkdp b191691767 Revert "replace trait object BufRead by generic"
This reverts commit 037861e588.
2018-08-18 21:25:58 +02:00
Michal Nazarewicz 5c95b8803b Avoid floating point arithmetic in RGB→8-bit ANSI approximation 2018-08-18 20:58:03 +02:00
sharkdp 5b421b455d Update dependencies 2018-08-18 20:44:25 +02:00
sharkdp a6d6c28723 Add documentation on new pager-customization 2018-08-18 20:22:11 +02:00
sharkdp 2966939e38 Update submodules 2018-08-18 19:30:35 +02:00
sharkdp d179693d1d Use BAT_PAGER and PAGER environment variables, closes #158 2018-08-18 18:48:22 +02:00
sharkdp 268577c6f9 Run 'cargo fmt' 2018-08-18 17:54:26 +02:00
TA Thanh Dinh 037861e588 replace trait object BufRead by generic 2018-08-18 17:54:26 +02:00
sharkdp 94ccc646e8 Update README 2018-07-23 21:58:06 +02:00
sharkdp 0cc5d1dab6 Update error-chain to fix compiler warnings 2018-07-23 21:54:30 +02:00
sharkdp 28397b8f78 Always show a warning when theme is unknown 2018-07-23 21:51:49 +02:00
sharkdp c899849101 Use map instead of and_then(..Some(..)) 2018-07-23 21:51:49 +02:00
sharkdp bf53b64125 Small style fix 2018-07-23 21:51:49 +02:00
Armando Perez c68aa0f424 Allow specifying the theme via the BAT_THEME environment variable
The `--theme` command line option stills takes precedence and this
change preserves how errors are handled when it's used: If a theme name
that doesn't exist is specified using the argument, this error is fatal.
However, if a theme that doesn't exist is specified using the environment
variable, the error is logged to `stderr` and the "Default" theme is
loaded as a fallback.
2018-07-23 21:51:49 +02:00
sharkdp 6b57f4eebc Style changes 2018-07-18 00:06:24 +02:00
eth-p 0ddd388a29 Improve logic for SGR sequence passthrough 2018-07-18 00:06:24 +02:00
eth-p 34811b8161 Fix #182 2018-07-18 00:06:24 +02:00
David Peter 8b92aae23f Fix Travis link 2018-07-17 23:37:03 +02:00
sharkdp 3a0941cabe Update syntaxes.bin 2018-07-17 23:28:44 +02:00
sharkdp 52877c6d67 Add Nix syntax, closes #180 2018-07-17 23:28:31 +02:00
sharkdp 455de98a89 Update sublimehq/Packages, closes #183 2018-07-17 23:27:19 +02:00
Stéphane Campinas 8c6a74a6c5 typo 2018-07-06 19:09:53 +02:00
Gert Hulselmans 3f8b340ed8 Add AWK syntax. 2018-06-15 16:41:51 +02:00
sharkdp 65e6970907 Change help text for --line-range 2018-06-12 08:18:44 +02:00
sharkdp 90cc019482 Run 'cargo fmt' 2018-06-12 08:18:44 +02:00
Taylor eaf0b99d25 update 2018-06-12 08:18:44 +02:00
Taylor Skinner 3b1dcca5d0 use map() 2018-06-12 08:18:44 +02:00
Taylor Skinner 26dbdf4fa0 update line-ranges 2018-06-12 08:18:44 +02:00
Taylor Skinner 6691786d82 add line-range 2018-06-12 08:18:44 +02:00
Conrad Kleinespel 50209bfe21 updates archlinux install instructions 2018-06-08 16:15:27 +02:00
sharkdp c91511cca1 Always run snapshot test 2018-06-02 19:03:38 +02:00
sharkdp c9f7a0c126 Use separate Git repository for snapshot testing
closes #161
2018-06-02 19:00:05 +02:00
Ezinwa Okpoechi 69c798eafd Fix command typo 2018-06-01 17:01:28 +02:00
25 changed files with 1332 additions and 523 deletions
+7 -1
View File
@@ -24,7 +24,7 @@
url = https://github.com/clintberry/sublime-text-2-ini
[submodule "assets/syntaxes/CMake"]
path = assets/syntaxes/CMake
url = https://github.com/sharkdp/Sublime-CMakeLists
url = https://github.com/zyxar/Sublime-CMakeLists
[submodule "assets/syntaxes/LESS"]
path = assets/syntaxes/LESS
url = https://github.com/danro/LESS-sublime
@@ -40,3 +40,9 @@
[submodule "assets/themes/TwoDark"]
path = assets/themes/TwoDark
url = https://github.com/erremauro/TwoDark
[submodule "assets/syntaxes/AWK"]
path = assets/syntaxes/AWK
url = https://github.com/JohnNilsson/awk-sublime
[submodule "assets/syntaxes/Nix"]
path = assets/syntaxes/Nix
url = https://github.com/wmertens/sublime-nix
+14 -17
View File
@@ -17,18 +17,24 @@ matrix:
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
- os: linux
rust: stable
env:
- TARGET=arm-unknown-linux-gnueabihf
- CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
# Minimum Rust supported channel.
- os: linux
rust: 1.24.0
rust: 1.26.0
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: 1.24.0
rust: 1.26.0
env:
- TARGET=x86_64-unknown-linux-musl
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
- os: osx
rust: 1.24.0
rust: 1.26.0
env: TARGET=x86_64-apple-darwin
# Code formatting check
@@ -39,15 +45,10 @@ matrix:
- cargo install --debug --force rustfmt-nightly
script: cargo fmt -- --check
addons:
apt:
packages:
# needed for i686-unknown-linux-gnu target
- gcc-multilib
# needed for musl targets
- musl-tools
# needed to build deb packages
- fakeroot
sudo: required
before_install:
- ci/before_install.bash
env:
global:
@@ -62,11 +63,7 @@ install:
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
script:
# Incorporate TARGET env var to the build and test process
- cargo build --target $TARGET --verbose
- cargo test --target $TARGET --verbose
# Run 'bat' on its own source code and the README
- cargo run --target $TARGET -- src/main.rs README.md --paging=never
- ci/script.bash
before_deploy:
- bash ci/before_deploy.bash
Generated
+245 -283
View File
@@ -1,32 +1,27 @@
[[package]]
name = "aho-corasick"
version = "0.6.4"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ansi_term"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "ansi_term"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "atty"
version = "0.2.10"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -34,32 +29,33 @@ name = "base64"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bat"
version = "0.4.1"
version = "0.5.0"
dependencies = [
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ansi_term 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)",
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"console 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"directories 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"directories 1.0.1 (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)",
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntect 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bincode"
version = "1.0.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -69,50 +65,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "byteorder"
version = "1.2.2"
version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bytes"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cc"
version = "1.0.15"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cfg-if"
version = "0.1.3"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.4.2"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "clap"
version = "2.31.2"
version = "2.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -122,16 +109,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (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.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cmake"
version = "0.1.31"
version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -141,49 +128,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"clicolors-control 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.5.5 (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.3 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (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.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "directories"
version = "0.10.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dtoa"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "duct"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"os_pipe 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"shared_child 0.3.2 (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.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "error-chain"
version = "0.11.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "flate2"
version = "1.0.1"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (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)",
]
@@ -206,45 +178,31 @@ name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "gcc"
version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "git2"
version = "0.7.1"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.0 (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.7 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "idna"
version = "0.1.4"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "iovec"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itoa"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -263,40 +221,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazycell"
version = "0.6.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
version = "0.2.40"
version = "0.2.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
version = "0.7.1"
version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.33 (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.20 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libz-sys"
version = "1.0.18"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -305,16 +261,25 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "log"
version = "0.4.1"
name = "lock_api"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "matches"
version = "0.1.6"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -322,7 +287,7 @@ name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -330,34 +295,21 @@ name = "miniz-sys"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "nix"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-integer"
version = "0.1.36"
version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-traits"
version = "0.2.2"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -366,29 +318,19 @@ version = "3.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"onig_sys 68.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "onig_sys"
version = "68.0.1"
version = "68.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
"duct 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "os_pipe"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"nix 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -396,15 +338,15 @@ name = "owning_ref"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parking_lot"
version = "0.5.5"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -413,10 +355,10 @@ name = "parking_lot_core"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -426,7 +368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "pkg-config"
version = "0.3.11"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -435,15 +377,15 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "proc-macro2"
version = "0.3.8"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -451,25 +393,25 @@ dependencies = [
[[package]]
name = "quote"
version = "0.5.2"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.4.2"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (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.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "redox_syscall"
version = "0.1.37"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -477,7 +419,7 @@ name = "redox_termios"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -485,10 +427,10 @@ name = "regex"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (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.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -505,6 +447,19 @@ dependencies = [
"ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "remove_dir_all"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ryu"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "safemem"
version = "0.2.0"
@@ -515,52 +470,50 @@ name = "same-file"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "scopeguard"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.51"
version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.51"
version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.14.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
version = "1.0.17"
version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "shared_child"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ryu 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "smallvec"
version = "0.6.1"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "stable_deref_trait"
version = "1.0.0"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -570,11 +523,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syn"
version = "0.13.7"
version = "0.14.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -583,28 +536,37 @@ name = "syntect"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bincode 1.0.0 (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.3 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.2 (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.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)",
"onig 3.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tempdir"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term_size"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -613,8 +575,8 @@ name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -623,35 +585,34 @@ name = "termios"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "textwrap"
version = "0.9.0"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "thread_local"
version = "0.3.5"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 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)",
]
[[package]]
name = "time"
version = "0.1.39"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -664,17 +625,17 @@ name = "unicode-bidi"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-normalization"
version = "0.1.6"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicode-width"
version = "0.1.4"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -692,11 +653,11 @@ dependencies = [
[[package]]
name = "url"
version = "1.7.0"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -707,7 +668,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "vcpkg"
version = "0.2.3"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "version_check"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -717,11 +683,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "walkdir"
version = "2.1.4"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -731,7 +697,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.4"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -770,97 +736,93 @@ dependencies = [
]
[metadata]
"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"
"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455"
"checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa"
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1"
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
"checksum base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c4a342b450b268e1be8036311e2c613d7f8a7ed31214dff1cc3b60852a3168d"
"checksum bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0"
"checksum bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2fb9e29e72fd6bc12071533d5dc7664cb01480c59406f656d7ac25c7bd8ff7"
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
"checksum byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "73b5bdfe7ee3ad0b99c9801d58807a9dbc9e09196365b0203853b99889ab3c87"
"checksum bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1d50c876fb7545f5f289cd8b2aee3f359d073ae819eed5d6373638e2c61e59"
"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18"
"checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6"
"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
"checksum byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8389c509ec62b9fe8eca58c502a0acaf017737355615243496cde4994f8fa4f9"
"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
"checksum chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e48d85528df61dc964aa43c5f6ca681a19cfa74939b2348d204bd08a981f2fb0"
"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 cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3"
"checksum cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "704fbf3bb5149daab0afb255dbea24a1f08d2f4099cedb9baab6d470d4c5eefb"
"checksum console 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7649ca90478264b9686aac8d269fcb014f14c2bed7c79a7e51b9f6afd4d783eb"
"checksum directories 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc2561db021b6f1321d0f16b67ed28ce843ef4610dfaa432e3ffa2e8a3050ebf"
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
"checksum duct 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "166298c17c5b4fe5997b962c2f22e887c7c5adc44308eb9103ce5b66af45a423"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
"checksum directories 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b106a38a9bf6c763c6c2e2c3332ab7635da453a68a6babca776386b3b287d338"
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
"checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b"
"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-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum git2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f41c0035c37ec11ed3f1e1946a76070b0c740393687e9a9c7612f6a709036b3"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
"checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71"
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
"checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606"
"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.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b"
"checksum libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecbd6428006c321c29b6c8a895f0d90152f1cf4fd8faab69fc436a3d9594f63"
"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16"
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
"checksum libgit2-sys 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6ab62b46003ba97701554631fa570d9f7e7947e2480ae3d941e555a54a2c0f05"
"checksum libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "f5f9aba969b3c45fe9c94bec65895868a9ceca9a600699f4054b75747a19c7c6"
"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2"
"checksum matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "835511bab37c34c47da5cb44844bea2cfde0236db0b506f90ea4224482c9774a"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
"checksum nix 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fd5681d13fda646462cfbd4e5f2051279a89a544d50eb98c365b507246839f"
"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe"
"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364"
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
"checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe"
"checksum onig 3.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f5eeb268a4620c74ea5768c6d2ccd492d60a47a8754666b91a46bfc35cd4d1ba"
"checksum onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c6be7c4f985508684e54f18dd37f71e66f3e1ad9318336a520d7e42f0d3ea8e"
"checksum os_pipe 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934868c3f86ed7a39ef63d88edeac5bd49a0c843192651900e9ce1178cbbf157"
"checksum onig_sys 68.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48b1fc88a091cf46a8ec67a3cd3ffd55f75d3bed741c76f253d78746ec43602b"
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac"
"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b"
"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa"
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
"checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f"
"checksum pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "104630aa1c83213cbc76db0703630fcb0421dac3585063be4ce9a8a2feeaa745"
"checksum plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c61ac2afed2856590ae79d6f358a24b85ece246d2aa134741a66d589519b7503"
"checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7"
"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
"checksum proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5697238f0d893c7f0ecc59c0999f18d2af85e424de441178bcacc9f9e6cf67"
"checksum quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ed7d650913520df631972f21e104a4fa2f9c82a14afc65d17b388a2e29731e7c"
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
"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 regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
"checksum ryu 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0568787116e13c652377b6846f5931454a363a8fdf8ae50463ee40935b278b"
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
"checksum serde 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "21924cc18e5281f232a17c040355fac97732b42cf019c24996a1642bcb169cdb"
"checksum serde_derive 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "9c624a90bec6fe9bc60d275d7af71c72c26b24cd6c6776d8e344dc4044caa3e2"
"checksum serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f3ad6d546e765177cf3dded3c2e424a8040f870083a0e64064746b958ece9cb1"
"checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e"
"checksum smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03dab98ab5ded3a8b43b2c80751194608d0b2aa0f1d46cf95d1c35e192844aa7"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)" = "6dfad05c8854584e5f72fb859385ecdfa03af69c3fd0572f0da2d4c95f060bdb"
"checksum serde_derive 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)" = "b719c6d5e9f73fbc37892246d5852333f040caa617b8873c6aced84bcb28e7bb"
"checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae"
"checksum smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "211a489e65e94b103926d2054ae515a1cdb5d515ea0ef414fee23b7e043ce748"
"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 syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "61b8f1b737f929c6516ba46a3133fd6d5215ad8a62f66760f851f7048aebedfb"
"checksum syn 0.14.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b7bfcbb0c068d0f642a0ffbd5c604965a360a61f99e8add013cef23a838614f3"
"checksum syntect 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc8a6f0db88d4afc340522c20d260411e746b2225b257c6b238a75de9d7cec78"
"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 termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
"checksum termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d9cf598a6d7ce700a4e6a9199da127e6819a61e64b68609683cc9a01b5683a"
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098"
"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 time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b"
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
"checksum unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90d662d111b0dbb08a180f2761026cba648c258023c355954a7c00e00e354636"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"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-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 url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7"
"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380"
"checksum vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a51475940ea5ed2f7ba8e7b867c42d6cb7f06fafb9c1673ed8e768c675c771cc"
"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
"checksum walkdir 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f1b768ba943161a9226ccd59b26bcd901e5d60e6061f4fcad3034784e0c7372b"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+7 -4
View File
@@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
name = "bat"
readme = "README.md"
repository = "https://github.com/sharkdp/bat"
version = "0.4.1"
version = "0.5.0"
exclude = [
"assets/syntaxes/*",
"assets/themes/*",
@@ -15,9 +15,9 @@ exclude = [
[dependencies]
atty = "0.2.2"
ansi_term = "0.10"
ansi_term = "0.11"
console = "0.6"
directories = "0.10"
directories = "1.0"
lazy_static = "1.0"
[dependencies.git2]
@@ -36,6 +36,9 @@ default-features = false
features = ["suggestions", "color", "wrap_help"]
[dependencies.error-chain]
version = "0.11"
version = "0.12"
default-features = false
features = []
[dev-dependencies]
tempdir = "0.3"
+58 -37
View File
@@ -1,6 +1,6 @@
<p align="center">
<img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
<a href="Version info"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
<a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></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.
@@ -71,7 +71,7 @@ bat header.md content.md footer.md > document.md
bat -n main.rs # show line numbers (only)
cat f - g # output 'f', then stdin, then 'g'.
bat f - g # output 'f', then stdin, then 'g'.
```
## Installation
@@ -83,13 +83,10 @@ binary builds and Debian packages.
#### On Arch Linux
You can install [the AUR package](https://aur.archlinux.org/packages/bat/)
via yaourt, or manually:
You can install via Pacman:
```bash
git clone https://aur.archlinux.org/bat.git
cd bat
makepkg -si
pacman -S bat
```
#### On FreeBSD
@@ -117,7 +114,7 @@ brew install bat
### From source
If you want to build to compile `bat` from source, you need Rust 1.24 or
If you want to build to compile `bat` from source, you need Rust 1.26 or
higher. You can then use `cargo` to build everything:
```bash
@@ -132,9 +129,10 @@ some dependencies to be built.
### Highlighting theme
Use `bat --list-themes` to get a list of all available themes for syntax
highlighting. To select the `TwoDark` theme, for example, call `bat` with
the `--theme=TwoDark` option. Use `alias bat="bat --theme=TwoDark"` in your
shells startup file to make the change permanent.
highlighting. To select the `TwoDark` theme, call `bat` with the
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shells startup file to
make the change permanent.
### Output style
@@ -142,55 +140,78 @@ 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
and line numbers but no grid and no file header.
### Add new syntaxes and highlighting themes
### Adding new syntaxes / language definitions
`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/)
library for syntax highlighting. `syntect` can read any
[Sublime Text `.sublime-syntax` file](https://www.sublimetext.com/docs/3/syntax.html)
and theme.
and theme. To add new syntax definitions, do the following.
To build your own language-set and theme, follow these steps:
Create a folder with syntax definition files:
Create a folder with a syntax highlighting theme:
```bash
BAT_CONFIG_DIR="$(bat cache --config-dir)"
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
```
Now use the following command to parse these files into a binary cache:
```bash
bat cache --init
```
Finally, use `bat --list-languages` to check if the new languages are available.
If you ever want to go back to the default settings, call:
```bash
bat cache --clear
```
### Adding new themes
This works very similar to how we add new syntax definitions.
First, create a folder with the new syntax highlighting themes:
```bash
BAT_CONFIG_DIR="$(bat cache --config-dir)"
mkdir -p "$BAT_CONFIG_DIR/themes"
cd "$BAT_CONFIG_DIR/themes"
# Download a theme, for example:
# Download a theme in '.tmTheme' format, for example:
git clone https://github.com/greggb/sublime-snazzy
# Create a link for the default theme
# Create a link to specify the new default theme
ln -sf "sublime-snazzy/Sublime Snazzy.tmTheme" Default.tmTheme
```
Create a folder with language definition files:
```bash
mkdir -p "$BAT_CONFIG_DIR/syntaxes"
cd "$BAT_CONFIG_DIR/syntaxes"
# Download some language definition files, for example:
git clone https://github.com/sublimehq/Packages
git clone https://github.com/danro/LESS-sublime
```
Finally, use the following command to parse all these files into a binary
cache:
```bash
# Update the binary cache
bat cache --init
```
Use `bat --list-languages` and `bat --list-themes` to check if all languages and themes are
available.
Finally, use `bat --list-themes` to check if the new themes are available.
If you ever want to go back to the default settings, call:
**Note:** Unlike for syntax definitions, adding custom themes currently *removes all default
themes*. If you want to go back to the default themes, call `bat cache --clear`.
### Using a different pager
`bat` uses the pager that is specified in the `PAGER` environment variable. If this variable is not
set, `less` is used by default. If you want to use a different pager, you can either modify the
`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
`PAGER`. If you want to pass command-line arguments to the pager, you need to create a small shell
script as a wrapper, for example:
```bash
bat cache --clear
#!/bin/bash
less --tabs 4 -RF "$@"
```
## Project goals and alternatives
Binary file not shown.
Submodule assets/syntaxes/AWK added at 1ce5f90d44
Submodule assets/syntaxes/Nix added at ebf06571f3
+609
View File
@@ -0,0 +1,609 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Nix
file_extensions:
- nix
scope: source.nix
contexts:
main:
- include: expression
comment:
- match: '/\*([^*]|\*[^\/])*'
push:
- meta_scope: comment.block.nix
- match: \*\/
pop: true
- include: comment-remark
- match: '\#'
push:
- meta_scope: comment.line.number-sign.nix
- match: $
pop: true
- include: comment-remark
attribute-bind:
- include: attribute-name
- include: attribute-bind-from-equals
attribute-bind-from-equals:
- match: \=
captures:
0: keyword.operator.bind.nix
push:
- match: \;
captures:
0: punctuation.terminator.bind.nix
pop: true
- include: expression
attribute-inherit:
- match: \binherit\b
captures:
0: keyword.other.inherit.nix
push:
- match: \;
captures:
0: punctuation.terminator.inherit.nix
pop: true
- match: \(
captures:
0: punctuation.section.function.arguments.nix
push:
- match: (?=\;)
pop: true
- match: \)
captures:
0: punctuation.section.function.arguments.nix
push:
- match: (?=\;)
pop: true
- include: bad-reserved
- include: attribute-name-single
- include: others
- include: expression
- match: '(?=[a-zA-Z\_])'
push:
- match: (?=\;)
pop: true
- include: bad-reserved
- include: attribute-name-single
- include: others
- include: others
attribute-name:
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
scope: entity.other.attribute-name.multipart.nix
- match: \.
- include: string-quoted
- include: interpolation
attribute-name-single:
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
scope: entity.other.attribute-name.single.nix
attrset-contents:
- include: attribute-inherit
- include: bad-reserved
- include: attribute-bind
- include: others
attrset-definition:
- match: '(?=\{)'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: '(\{)'
captures:
0: punctuation.definition.attrset.nix
push:
- match: '(\})'
captures:
0: punctuation.definition.attrset.nix
pop: true
- include: attrset-contents
- match: '(?<=\})'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
attrset-definition-brace-opened:
- match: '(?<=\})'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- match: (?=.?)
push:
- match: '\}'
captures:
0: punctuation.definition.attrset.nix
pop: true
- include: attrset-contents
attrset-for-sure:
- match: (?=\brec\b)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: \brec\b
captures:
0: keyword.other.nix
push:
- match: '(?=\{)'
pop: true
- include: others
- include: attrset-definition
- include: others
- match: '(?=\{\s*(\}|[^,?]*(=|;)))'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: attrset-definition
- include: others
attrset-or-function:
- match: '\{'
captures:
0: punctuation.definition.attrset-or-function.nix
push:
- match: '(?=([\])};]|\b(else|then)\b))'
pop: true
- match: '(?=(\s*\}|\"|\binherit\b|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*(\s*\.|\s*=[^=])))'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: attrset-definition-brace-opened
- match: '(?=(\.\.\.|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*\s*[,?]))'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-definition-brace-opened
- include: bad-reserved
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
captures:
0: variable.parameter.function.maybe.nix
push:
- match: '(?=([\])};]|\b(else|then)\b))'
pop: true
- match: (?=\.)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: attrset-definition-brace-opened
- match: \s*(\,)
captures:
1: keyword.operator.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-definition-brace-opened
- match: (?=\=)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: attribute-bind-from-equals
- include: attrset-definition-brace-opened
- match: (?=\?)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-parameter-default
- match: \,
captures:
0: keyword.operator.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-definition-brace-opened
- include: others
- include: others
bad-reserved:
- match: '(?<![\w''-])(if|then|else|assert|with|let|in|rec|inherit)(?![\w''-])'
scope: invalid.illegal.reserved.nix
comment-remark:
- match: (TODO|FIXME|BUG|\!\!\!):?
captures:
1: markup.bold.comment.nix
constants:
- match: \b(builtins|true|false|null)\b
captures:
0: constant.language.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- match: \b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\b
captures:
0: support.function.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- match: '\b[0-9]+\b'
captures:
0: constant.numeric.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
expression:
- include: parens-and-cont
- include: list-and-cont
- include: string
- include: interpolation
- include: with-assert
- include: function-for-sure
- include: attrset-for-sure
- include: attrset-or-function
- include: let
- include: if
- include: operator-unary
- include: constants
- include: bad-reserved
- include: parameter-name-and-cont
- include: others
expression-cont:
- match: (?=.?)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: parens
- include: list
- include: string
- include: interpolation
- include: function-for-sure
- include: attrset-for-sure
- include: attrset-or-function
- match: '(\bor\b|\.|==|!=|!|\<\=|\<|\>\=|\>|&&|\|\||-\>|//|\?|\+\+|-|\*|/(?=([^*]|$))|\+)'
scope: keyword.operator.nix
- include: constants
- include: bad-reserved
- include: parameter-name
- include: others
function-body:
- match: '(@\s*([a-zA-Z\_][a-zA-Z0-9\_\''\-]*)\s*)?(\:)'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression
function-body-from-colon:
- match: (\:)
captures:
0: punctuation.definition.function.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression
function-contents:
- include: bad-reserved
- include: function-parameter
- include: others
function-definition:
- match: (?=.?)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-body-from-colon
- match: (?=.?)
push:
- match: (?=\:)
pop: true
- match: '(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*)'
captures:
0: variable.parameter.function.4.nix
push:
- match: (?=\:)
pop: true
- match: \@
push:
- match: (?=\:)
pop: true
- include: function-header-until-colon-no-arg
- include: others
- include: others
- match: '(?=\{)'
push:
- match: (?=\:)
pop: true
- include: function-header-until-colon-with-arg
- include: others
function-definition-brace-opened:
- match: (?=.?)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-body-from-colon
- match: (?=.?)
push:
- match: (?=\:)
pop: true
- include: function-header-close-brace-with-arg
- match: (?=.?)
push:
- match: '(?=\})'
pop: true
- include: function-contents
- include: others
function-for-sure:
- match: '(?=(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*\s*[:@]|\{[^}]*\}\s*:|\{[^#}"''/=]*[,\?]))'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: function-definition
function-header-close-brace-no-arg:
- match: '\}'
captures:
0: punctuation.definition.entity.function.nix
push:
- match: (?=\:)
pop: true
- include: others
function-header-close-brace-with-arg:
- match: '\}'
captures:
0: punctuation.definition.entity.function.nix
push:
- match: (?=\:)
pop: true
- include: function-header-terminal-arg
- include: others
function-header-open-brace:
- match: '\{'
captures:
0: punctuation.definition.entity.function.2.nix
push:
- match: '(?=\})'
pop: true
- include: function-contents
function-header-terminal-arg:
- match: (?=@)
push:
- match: (?=\:)
pop: true
- match: \@
push:
- match: (?=\:)
pop: true
- match: '(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*)'
push:
- meta_scope: variable.parameter.function.3.nix
- match: (?=\:)
pop: true
- include: others
- include: others
function-header-until-colon-no-arg:
- match: '(?=\{)'
push:
- match: (?=\:)
pop: true
- include: function-header-open-brace
- include: function-header-close-brace-no-arg
function-header-until-colon-with-arg:
- match: '(?=\{)'
push:
- match: (?=\:)
pop: true
- include: function-header-open-brace
- include: function-header-close-brace-with-arg
function-parameter:
- match: (\.\.\.)
push:
- meta_scope: keyword.operator.nix
- match: '(,|(?=\}))'
pop: true
- include: others
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
captures:
0: variable.parameter.function.1.nix
push:
- match: '(,|(?=\}))'
captures:
0: keyword.operator.nix
pop: true
- include: whitespace
- include: comment
- include: function-parameter-default
- include: expression
- include: others
function-parameter-default:
- match: \?
captures:
0: keyword.operator.nix
push:
- match: "(?=[,}])"
pop: true
- include: expression
if:
- match: (?=\bif\b)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: \bif\b
captures:
0: keyword.other.nix
push:
- match: \bth(?=en\b)
captures:
0: keyword.other.nix
pop: true
- include: expression
- match: (?<=th)en\b
captures:
0: keyword.other.nix
push:
- match: \bel(?=se\b)
captures:
0: keyword.other.nix
pop: true
- include: expression
- match: (?<=el)se\b
captures:
0: keyword.other.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
captures:
0: keyword.other.nix
pop: true
- include: expression
illegal:
- match: .
scope: invalid.illegal
interpolation:
- match: '\$\{'
captures:
0: punctuation.section.embedded.begin.nix
push:
- meta_scope: markup.italic
- match: '\}'
captures:
0: punctuation.section.embedded.end.nix
pop: true
- include: expression
let:
- match: (?=\blet\b)
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: \blet\b
captures:
0: keyword.other.nix
push:
- match: '(?=([\])};,]|\b(in|else|then)\b))'
pop: true
- match: '(?=\{)'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: '\{'
push:
- match: '\}'
pop: true
- include: attrset-contents
- match: '(^|(?<=\}))'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- include: others
- include: attrset-contents
- include: others
- match: \bin\b
captures:
0: keyword.other.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression
list:
- match: '\['
captures:
0: punctuation.definition.list.nix
push:
- match: '\]'
captures:
0: punctuation.definition.list.nix
pop: true
- include: expression
list-and-cont:
- match: '(?=\[)'
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: list
- include: expression-cont
operator-unary:
- match: (!|-)
scope: keyword.operator.unary.nix
others:
- include: whitespace
- include: comment
- include: illegal
parameter-name:
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
captures:
0: variable.parameter.name.nix
parameter-name-and-cont:
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
captures:
0: variable.parameter.name.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
parens:
- match: \(
captures:
0: punctuation.definition.expression.nix
push:
- match: \)
captures:
0: punctuation.definition.expression.nix
pop: true
- include: expression
parens-and-cont:
- match: (?=\()
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: parens
- include: expression-cont
string:
- match: (?=\'\')
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- match: \'\'
captures:
0: punctuation.definition.string.other.start.nix
push:
- meta_scope: string.quoted.other.nix
- match: \'\'(?!\$|\'|\\.)
captures:
0: punctuation.definition.string.other.end.nix
pop: true
- match: \'\'(\$|\'|\\.)
scope: constant.character.escape.nix
- include: interpolation
- include: expression-cont
- match: (?=\")
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: string-quoted
- include: expression-cont
- match: '([a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+)'
captures:
0: string.unquoted.path.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- match: '(\<[a-zA-Z0-9\.\_\-\+]+(\/[a-zA-Z0-9\.\_\-\+]+)*\>)'
captures:
0: string.unquoted.spath.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
- match: '([a-zA-Z][a-zA-Z0-9\+\-\.]*\:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\'']+)'
captures:
0: string.unquoted.url.nix
push:
- match: '(?=([\])};,]|\b(else|then)\b))'
pop: true
- include: expression-cont
string-quoted:
- match: \"
captures:
0: punctuation.definition.string.double.start.nix
push:
- meta_scope: string.quoted.double.nix
- match: \"
captures:
0: punctuation.definition.string.double.end.nix
pop: true
- match: \\.
scope: constant.character.escape.nix
- include: interpolation
whitespace:
- match: \s+
with-assert:
- match: '(?<![\w''-])(with|assert)(?![\w''-])'
captures:
0: keyword.other.nix
push:
- match: \;
pop: true
- include: expression
+10 -3
View File
@@ -11,17 +11,24 @@ pack() {
local tempdir
local out_dir
local package_name
local gcc_prefix
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
out_dir=$(pwd)
package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then
gcc_prefix="arm-linux-gnueabihf-"
else
gcc_prefix=""
fi
# create a "staging" directory
mkdir "$tempdir/$package_name"
# copying the main binary
cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
strip "$tempdir/$package_name/$PROJECT_NAME"
"${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
# readme and license
cp README.md "$tempdir/$package_name"
@@ -50,8 +57,8 @@ make_deb() {
architecture=i386
;;
*)
echo "ERROR: unknown target" >&2
return 1
echo "make_deb: skipping target '${TARGET}'" >&2
return 0
;;
esac
version=${TRAVIS_TAG#v}
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -ex
if [ "$TRAVIS_OS_NAME" != linux ]; then
exit 0
fi
sudo apt-get update
# needed for musl targets
sudo apt-get install -y musl-tools
# needed to build deb packages
sudo apt-get install -y fakeroot
# needed for i686 linux gnu target
if [[ $TARGET == i686-unknown-linux-gnu ]]; then
sudo apt-get install -y gcc-multilib
fi
# needed for cross-compiling for arm
if [[ $TARGET == arm-unknown-linux-gnueabihf ]]; then
sudo apt-get install -y \
gcc-4.8-arm-linux-gnueabihf \
binutils-arm-linux-gnueabihf \
libc6-armhf-cross \
libc6-dev-armhf-cross
fi
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -ex
# Incorporate TARGET env var to the build and test process
cargo build --target "$TARGET" --verbose
# We cannot run arm executables on linux
if [[ $TARGET != arm-unknown-linux-gnueabihf ]]; then
cargo test --target "$TARGET" --verbose
# Run 'bat' on its own source code and the README
cargo run --target "$TARGET" -- src/main.rs README.md --paging=never
fi
+121 -49
View File
@@ -48,8 +48,7 @@ impl App {
.about(
"A cat(1) clone with wings.\n\n\
Use '--help' instead of '-h' to see a more detailed version of the help text.",
)
.long_about("A cat(1) clone with syntax highlighting and Git integration.")
).long_about("A cat(1) clone with syntax highlighting and Git integration.")
.arg(
Arg::with_name("language")
.short("l")
@@ -61,20 +60,16 @@ impl App {
specified as a name (like 'C++' or 'LaTeX') or possible file \
extension (like 'cpp', 'hpp' or 'md'). Use '--list-languages' \
to show all supported language names and file extensions",
)
.takes_value(true),
)
.arg(
).takes_value(true),
).arg(
Arg::with_name("FILE")
.help("File(s) to print / concatenate. Use '-' for standard input.")
.long_help(
"File(s) to print. Use no argument or '-' to read from standard \
input",
)
.multiple(true)
).multiple(true)
.empty_values(false),
)
.arg(
).arg(
Arg::with_name("style")
.long("style")
.value_name("style-components")
@@ -82,8 +77,7 @@ impl App {
.takes_value(true)
.possible_values(&[
"auto", "full", "plain", "changes", "header", "grid", "numbers",
])
.default_value("auto")
]).default_value("auto")
.help("Comma-separated list of style elements to display")
.long_help(
"Configure which elements (line numbers, file headers, grid \
@@ -92,8 +86,7 @@ impl App {
components to display (e.g. 'numbers,changes,grid') or a \
pre-defined style ('full')",
),
)
.arg(
).arg(
Arg::with_name("color")
.long("color")
.overrides_with("color")
@@ -102,8 +95,7 @@ impl App {
.possible_values(&["auto", "never", "always"])
.default_value("auto")
.help("When to use colors"),
)
.arg(
).arg(
Arg::with_name("paging")
.long("paging")
.overrides_with("paging")
@@ -113,8 +105,7 @@ impl App {
.default_value("auto")
.help("When to use the pager")
.long_help("Specify when to use the pager (less)"),
)
.arg(
).arg(
Arg::with_name("wrap")
.long("wrap")
.overrides_with("wrap")
@@ -123,14 +114,12 @@ impl App {
.possible_values(&["character", "never"])
.default_value("character")
.help("When to wrap text"),
)
.arg(
).arg(
Arg::with_name("list-languages")
.long("list-languages")
.help("Displays supported languages")
.long_help("Display a list of supported languages"),
)
.arg(
).arg(
Arg::with_name("theme")
.long("theme")
.overrides_with("theme")
@@ -140,14 +129,25 @@ impl App {
"Set the theme for syntax highlighting. Use '--list-themes' to \
see all available themes",
),
)
.arg(
).arg(
Arg::with_name("line-range")
.long("line-range")
.overrides_with("line-range")
.takes_value(true)
.value_name("n:m")
.help("Only print the lines from n to m")
.long_help(
"Print a specified range or ranges of lines from the files. \
For example: '--line-range 30:40' will print lines 30 to 40 \n\
'--line-range :40' will print lines 1 to 40 \n\
'--line-range 40:' will print lines 40 to the end of the file",
),
).arg(
Arg::with_name("list-themes")
.long("list-themes")
.help("Displays supported themes")
.help("Display a list of supported themes for syntax highlighting"),
)
.arg(
).arg(
Arg::with_name("number")
.long("number")
.overrides_with("number")
@@ -158,8 +158,7 @@ impl App {
"Show line numbers (no other decorations). This is an alias for \
'--style=numbers'",
),
)
.arg(
).arg(
Arg::with_name("unbuffered")
.short("u")
.help("(ignored)")
@@ -167,10 +166,9 @@ impl App {
.long_help(
"This option exists for POSIX-compliance reasons ('u' is for \
'unbuffered'). The output is always unbuffered - this option \
it simply ignored.",
is simply ignored.",
),
)
.subcommand(
).subcommand(
SubCommand::with_name("cache")
.about("Modify the syntax-definition and theme cache")
.arg(
@@ -182,33 +180,28 @@ impl App {
"Initialize the syntax/theme cache by loading from the \
source directory (default: the configuration directory)",
),
)
.arg(
).arg(
Arg::with_name("clear")
.long("clear")
.short("c")
.help("Reset the cache"),
)
.arg(
).arg(
Arg::with_name("config-dir")
.long("config-dir")
.short("d")
.help("Show the configuration directory"),
)
.group(
).group(
ArgGroup::with_name("cache-actions")
.args(&["init", "clear", "config-dir"])
.required(true),
)
.arg(
).arg(
Arg::with_name("source")
.long("source")
.requires("init")
.takes_value(true)
.value_name("dir")
.help("Use a different source for loading syntaxes and themes from"),
)
.arg(
).arg(
Arg::with_name("target")
.long("target")
.requires("init")
@@ -218,8 +211,7 @@ impl App {
"Use a different source to store the cached syntax and theme set",
),
),
)
.help_message("Print this help message.")
).help_message("Print this help message.")
.version_message("Show version information.")
.get_matches()
}
@@ -268,7 +260,13 @@ impl App {
},
term_width: Term::stdout().size().1 as usize,
files,
theme: self.matches.value_of("theme"),
theme: self
.matches
.value_of("theme")
.map(String::from)
.or_else(|| env::var("BAT_THEME").ok())
.unwrap_or(String::from("Default")),
line_range: transpose(self.matches.value_of("line-range").map(LineRange::from))?,
})
}
@@ -283,10 +281,8 @@ impl App {
} else {
Some(filename)
}
})
.collect()
})
.unwrap_or_else(|| vec![None]) // read from stdin (None) if no args are given
}).collect()
}).unwrap_or_else(|| vec![None]) // read from stdin (None) if no args are given
}
fn output_components(&self) -> Result<OutputComponents> {
@@ -321,7 +317,8 @@ pub struct Config<'a> {
pub paging_mode: PagingMode,
pub term_width: usize,
pub files: Vec<Option<&'a str>>,
pub theme: Option<&'a str>,
pub theme: String,
pub line_range: Option<LineRange>,
}
fn is_truecolor_terminal() -> bool {
@@ -329,3 +326,78 @@ fn is_truecolor_terminal() -> bool {
.map(|colorterm| colorterm == "truecolor" || colorterm == "24bit")
.unwrap_or(false)
}
pub struct LineRange {
pub lower: usize,
pub upper: usize,
}
impl LineRange {
pub fn from(range_raw: &str) -> Result<LineRange> {
LineRange::parse_range(range_raw)
}
pub fn new() -> LineRange {
LineRange {
lower: usize::min_value(),
upper: usize::max_value(),
}
}
pub fn parse_range(range_raw: &str) -> Result<LineRange> {
let mut new_range = LineRange::new();
if range_raw.bytes().nth(0).ok_or("Empty line range")? == b':' {
new_range.upper = range_raw[1..].parse()?;
return Ok(new_range);
} else if range_raw.bytes().last().ok_or("Empty line range")? == b':' {
new_range.lower = range_raw[..range_raw.len() - 1].parse()?;
return Ok(new_range);
}
let line_numbers: Vec<&str> = range_raw.split(':').collect();
if line_numbers.len() == 2 {
new_range.lower = line_numbers[0].parse()?;
new_range.upper = line_numbers[1].parse()?;
return Ok(new_range);
}
Err("expected single ':' character".into())
}
}
#[test]
fn test_parse_line_range_full() {
let range = LineRange::from("40:50").expect("Shouldn't fail on test!");
assert_eq!(40, range.lower);
assert_eq!(50, range.upper);
}
#[test]
fn test_parse_line_range_partial_min() {
let range = LineRange::from(":50").expect("Shouldn't fail on test!");
assert_eq!(usize::min_value(), range.lower);
assert_eq!(50, range.upper);
}
#[test]
fn test_parse_line_range_partial_max() {
let range = LineRange::from("40:").expect("Shouldn't fail on test!");
assert_eq!(40, range.lower);
assert_eq!(usize::max_value(), range.upper);
}
#[test]
fn test_parse_line_range_fail() {
let range = LineRange::from("40:50:80");
assert!(range.is_err());
let range = LineRange::from("40::80");
assert!(range.is_err());
let range = LineRange::from(":40:");
assert!(range.is_err());
let range = LineRange::from("40");
assert!(range.is_err());
}
fn transpose<T>(opt: Option<Result<T>>) -> Result<Option<T>> {
opt.map_or(Ok(None), |res| res.map(Some))
}
+48 -33
View File
@@ -2,7 +2,6 @@ use directories::ProjectDirs;
use errors::*;
use std::borrow::Cow;
use std::fs::{self, File};
use std::io;
use std::path::{Path, PathBuf};
use syntect::dumps::{dump_to_file, from_binary, from_reader};
use syntect::highlighting::{Theme, ThemeSet};
@@ -12,7 +11,8 @@ use syntect::parsing::{SyntaxDefinition, SyntaxSet};
use std::os::unix::fs::FileTypeExt;
lazy_static! {
static ref PROJECT_DIRS: ProjectDirs = ProjectDirs::from("", "", crate_name!());
static ref PROJECT_DIRS: ProjectDirs =
ProjectDirs::from("", "", crate_name!()).expect("Could not get home directory");
}
pub struct HighlightingAssets {
@@ -28,28 +28,32 @@ impl HighlightingAssets {
pub fn from_files(dir: Option<&Path>) -> Result<Self> {
let source_dir = dir.unwrap_or_else(|| PROJECT_DIRS.config_dir());
let theme_dir = source_dir.join("themes");
let theme_set = ThemeSet::load_from_folder(&theme_dir).chain_err(|| {
format!(
"Could not load themes from '{}'",
theme_dir.to_string_lossy()
)
})?;
let mut syntax_set = SyntaxSet::new();
let syntax_dir = source_dir.join("syntaxes");
if !syntax_dir.exists() {
return Err(format!(
"Could not load syntaxes from '{}'",
syntax_dir.to_string_lossy()
).into());
}
syntax_set.load_syntaxes(syntax_dir, true)?;
syntax_set.load_plain_text_syntax();
let mut assets = Self::from_binary_unlinked();
Ok(HighlightingAssets {
syntax_set,
theme_set,
})
let theme_dir = source_dir.join("themes");
if let Ok(theme_set) = ThemeSet::load_from_folder(&theme_dir) {
// TODO: If syntect would support this, it would be great to
// load the new themes in addition to the ones in the binary.
assets.theme_set = theme_set;
} else {
println!(
"No themes were found in '{}', using the default set",
theme_dir.to_string_lossy()
);
}
let syntax_dir = source_dir.join("syntaxes");
if syntax_dir.exists() {
assets.syntax_set.load_syntaxes(syntax_dir, true)?;
} else {
println!(
"No syntaxes were found in '{}', using the default set.",
syntax_dir.to_string_lossy()
);
}
Ok(assets)
}
fn from_cache() -> Result<Self> {
@@ -79,9 +83,8 @@ impl HighlightingAssets {
})
}
fn from_binary() -> Self {
let mut syntax_set: SyntaxSet = from_binary(include_bytes!("../assets/syntaxes.bin"));
syntax_set.link_syntaxes();
fn from_binary_unlinked() -> Self {
let syntax_set: SyntaxSet = from_binary(include_bytes!("../assets/syntaxes.bin"));
let theme_set: ThemeSet = from_binary(include_bytes!("../assets/themes.bin"));
HighlightingAssets {
@@ -90,6 +93,12 @@ impl HighlightingAssets {
}
}
fn from_binary() -> Self {
let mut assets = Self::from_binary_unlinked();
assets.syntax_set.link_syntaxes();
assets
}
pub fn save(&self, dir: Option<&Path>) -> Result<()> {
let target_dir = dir.unwrap_or_else(|| PROJECT_DIRS.cache_dir());
let _ = fs::create_dir(target_dir);
@@ -123,13 +132,19 @@ impl HighlightingAssets {
Ok(())
}
pub fn get_theme(&self, theme: &str) -> Result<&Theme> {
Ok(self.theme_set.themes.get(theme).ok_or_else(|| {
io::Error::new(
io::ErrorKind::Other,
format!("Could not find '{}' theme", theme),
)
})?)
pub fn get_theme(&self, theme: &str) -> &Theme {
match self.theme_set.themes.get(theme) {
Some(theme) => theme,
None => {
use ansi_term::Colour::Yellow;
eprintln!(
"{}: Unknown theme '{}', using default.",
Yellow.paint("[bat warning]"),
theme
);
&self.theme_set.themes["Default"]
}
}
}
pub fn get_syntax(&self, language: Option<&str>, filename: Option<&str>) -> &SyntaxDefinition {
+40 -14
View File
@@ -1,5 +1,5 @@
use ansi_term::Colour::Green;
use app::Config;
use app::{Config, LineRange};
use assets::HighlightingAssets;
use diff::get_git_diff;
use errors::*;
@@ -57,13 +57,15 @@ pub fn list_languages(assets: &HighlightingAssets, term_width: usize) {
}
pub fn print_files(assets: &HighlightingAssets, config: &Config) -> Result<bool> {
let theme = assets.get_theme(config.theme.unwrap_or("Default"))?;
let theme = assets.get_theme(&config.theme);
let mut output_type = OutputType::from_mode(config.paging_mode);
let handle = output_type.handle()?;
let mut printer = Printer::new(handle, &config);
let mut printer = Printer::new(handle, &config, &theme);
let mut no_errors: bool = true;
for file in &config.files {
printer.ansi_prefix_sgr.clear();
printer.line_changes = file.and_then(|filename| get_git_diff(filename));
let syntax = assets.get_syntax(config.language, *file);
@@ -85,28 +87,52 @@ fn print_file(
filename: Option<&str>,
) -> Result<()> {
let stdin = io::stdin(); // TODO: this is not always needed
{
let reader: Box<BufRead> = match filename {
None => Box::new(stdin.lock()),
Some(filename) => Box::new(BufReader::new(File::open(filename)?)),
};
let mut reader: Box<BufRead> = match filename {
None => Box::new(stdin.lock()),
Some(filename) => Box::new(BufReader::new(File::open(filename)?)),
};
let highlighter = HighlightLines::new(syntax, theme);
let mut highlighter = HighlightLines::new(syntax, theme);
printer.print_header(filename)?;
printer.print_header(filename)?;
print_file_ranges(printer, reader, highlighter, &printer.config.line_range)?;
printer.print_footer()?;
}
Ok(())
}
fn print_file_ranges<'a>(
printer: &mut Printer,
mut reader: Box<BufRead + 'a>,
mut highlighter: HighlightLines,
line_ranges: &Option<LineRange>,
) -> Result<()> {
let mut buffer = Vec::new();
while reader.read_until(b'\n', &mut buffer)? > 0 {
{
let line = String::from_utf8_lossy(&buffer);
let regions = highlighter.highlight(line.as_ref());
printer.print_line(&regions)?;
match line_ranges {
&Some(ref range) => {
if printer.line_number + 1 < range.lower {
// skip line
printer.line_number += 1;
} else if printer.line_number >= range.upper {
// no more lines in range
break;
} else {
printer.print_line(&regions)?;
}
}
&None => {
printer.print_line(&regions)?;
}
}
}
buffer.clear();
}
printer.print_footer()?;
Ok(())
}
+1
View File
@@ -41,6 +41,7 @@ mod errors {
Clap(::clap::Error);
Io(::std::io::Error);
SyntectError(::syntect::LoadingError);
ParseIntError(::std::num::ParseIntError);
}
}
+19 -7
View File
@@ -1,5 +1,6 @@
use app::PagingMode;
use errors::*;
use std::env;
use std::io::{self, Write};
use std::process::{Child, Command, Stdio};
@@ -20,13 +21,24 @@ impl OutputType {
/// Try to launch the pager. Fall back to stdout in case of errors.
fn try_pager(quit_if_one_screen: bool) -> Self {
let mut args = vec!["--RAW-CONTROL-CHARS", "--no-init"];
if quit_if_one_screen {
args.push("--quit-if-one-screen");
}
Command::new("less")
.args(&args)
.env("LESSCHARSET", "UTF-8")
let pager = env::var("BAT_PAGER")
.or_else(|_| env::var("PAGER"))
.unwrap_or(String::from("less"));
let mut process = if pager == "less" {
let mut args = vec!["--RAW-CONTROL-CHARS", "--no-init"];
if quit_if_one_screen {
args.push("--quit-if-one-screen");
}
let mut p = Command::new("less");
p.args(&args).env("LESSCHARSET", "UTF-8");
p
} else {
Command::new(pager)
};
process
.stdin(Stdio::piped())
.spawn()
.map(OutputType::Pager)
+44 -21
View File
@@ -1,4 +1,4 @@
use ansi_term::Colour::{Fixed, Green, Red, White, Yellow};
use ansi_term::Colour::{Fixed, Green, Red, Yellow};
use ansi_term::Style;
use app::Config;
use console::AnsiCodeIterator;
@@ -9,23 +9,24 @@ use std::boxed::Box;
use std::io::Write;
use std::vec::Vec;
use style::OutputWrap;
use syntect::highlighting;
use terminal::as_terminal_escaped;
use syntect::highlighting::{self, Theme};
use terminal::{as_terminal_escaped, to_ansi_color};
pub struct Printer<'a> {
handle: &'a mut Write,
colors: Colors,
config: &'a Config<'a>,
pub config: &'a Config<'a>,
decorations: Vec<Box<Decoration>>,
panel_width: usize,
line_number: usize,
pub ansi_prefix_sgr: String,
pub line_number: usize,
pub line_changes: Option<LineChanges>,
}
impl<'a> Printer<'a> {
pub fn new(handle: &'a mut Write, config: &'a Config) -> Self {
pub fn new(handle: &'a mut Write, config: &'a Config, theme: &Theme) -> Self {
let colors = if config.colored_output {
Colors::colored()
Colors::colored(theme, config.true_color)
} else {
Colors::plain()
};
@@ -67,6 +68,7 @@ impl<'a> Printer<'a> {
colors,
config,
decorations,
ansi_prefix_sgr: String::new(),
line_number: 0,
line_changes: None,
}
@@ -151,19 +153,27 @@ impl<'a> Printer<'a> {
text,
true_color,
colored_output,
))
.collect::<Vec<_>>()
)).collect::<Vec<_>>()
.join("")
)?;
} else {
for &(style, region) in regions.iter() {
let mut ansi_iterator = AnsiCodeIterator::new(region);
let mut ansi_prefix = "";
let mut ansi_prefix: String = String::new();
for chunk in ansi_iterator {
match chunk {
// ANSI escape passthrough.
(text, true) => {
ansi_prefix = text;
if text.chars().last().map_or(false, |c| c == 'm') {
ansi_prefix.push_str(text);
if text == "\x1B[0m" {
self.ansi_prefix_sgr = "\x1B[0m".to_owned();
} else {
self.ansi_prefix_sgr.push_str(text);
}
} else {
ansi_prefix.push_str(text);
}
}
// Regular text.
@@ -185,7 +195,10 @@ impl<'a> Printer<'a> {
"{}",
as_terminal_escaped(
style,
&*format!("{}{}", ansi_prefix, text),
&*format!(
"{}{}{}",
self.ansi_prefix_sgr, ansi_prefix, text
),
self.config.true_color,
self.config.colored_output,
)
@@ -202,8 +215,7 @@ impl<'a> Printer<'a> {
.iter()
.map(|ref d| d
.generate(self.line_number, true, self)
.text)
.collect::<Vec<String>>()
.text).collect::<Vec<String>>()
.join(" ")
))
} else {
@@ -221,13 +233,19 @@ impl<'a> Printer<'a> {
"{}\n{}",
as_terminal_escaped(
style,
&*format!("{}{}", ansi_prefix, text),
&*format!(
"{}{}{}",
self.ansi_prefix_sgr, ansi_prefix, text
),
self.config.true_color,
self.config.colored_output,
),
panel_wrap.clone().unwrap()
)?;
}
// Clear the ANSI prefix buffer.
ansi_prefix.clear();
}
}
}
@@ -256,8 +274,7 @@ impl<'a> Printer<'a> {
}
}
const GRID_COLOR: u8 = 238;
const LINE_NUMBER_COLOR: u8 = 244;
const DEFAULT_GUTTER_COLOR: u8 = 238;
#[derive(Default)]
pub struct Colors {
@@ -274,14 +291,20 @@ impl Colors {
Colors::default()
}
fn colored() -> Self {
fn colored(theme: &Theme, true_color: bool) -> Self {
let gutter_color = theme
.settings
.gutter_foreground
.map(|c| to_ansi_color(c, true_color))
.unwrap_or(Fixed(DEFAULT_GUTTER_COLOR));
Colors {
grid: Fixed(GRID_COLOR).normal(),
filename: White.bold(),
grid: gutter_color.normal(),
filename: Style::new().bold(),
git_added: Green.normal(),
git_removed: Red.normal(),
git_modified: Yellow.normal(),
line_number: Fixed(LINE_NUMBER_COLOR).normal(),
line_number: gutter_color.normal(),
}
}
}
+13 -13
View File
@@ -1,5 +1,5 @@
use ansi_term::Colour::{Fixed, RGB};
use ansi_term::Style;
use ansi_term::{self, Style};
use syntect::highlighting::{self, FontStyle};
/// Approximate a 24 bit color value by a 8 bit ANSI code
@@ -13,14 +13,19 @@ fn rgb2ansi(r: u8, g: u8, b: u8) -> u8 {
} else if r > 248 {
WHITE
} else {
let fr = f32::from(r);
(((fr - 8.) / 247.) * 24.) as u8 + 232
((r - 8) as u16 * 24 / 247) as u8 + 232
}
} else {
let fr = f32::from(r);
let fg = f32::from(g);
let fb = f32::from(b);
16 + (36 * (fr / 255. * 5.) as u8) + (6 * (fg / 255. * 5.) as u8) + (fb / 255. * 5.) as u8
36 * (r / 51) + 6 * (g / 51) + (b / 51) + 16
}
}
pub fn to_ansi_color(color: highlighting::Color, true_color: bool) -> ansi_term::Colour {
if true_color {
RGB(color.r, color.g, color.b)
} else {
let ansi_code = rgb2ansi(color.r, color.g, color.b);
Fixed(ansi_code)
}
}
@@ -33,12 +38,7 @@ pub fn as_terminal_escaped(
let style = if !colored {
Style::default()
} else {
let color = if true_color {
RGB(style.foreground.r, style.foreground.g, style.foreground.b)
} else {
let ansi = rgb2ansi(style.foreground.r, style.foreground.g, style.foreground.b);
Fixed(ansi)
};
let color = to_ansi_color(style.foreground, true_color);
if style.font_style.contains(FontStyle::BOLD) {
color.bold()
+47 -25
View File
@@ -1,16 +1,28 @@
use std::env;
use std::fs::{self, File};
use std::io::Read;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::process::Command;
extern crate tempdir;
use self::tempdir::TempDir;
extern crate git2;
use self::git2::build::CheckoutBuilder;
use self::git2::Repository;
use self::git2::Signature;
pub struct BatTester {
/// Temporary working directory
temp_dir: TempDir,
/// Path to the *bat* executable
exe: PathBuf,
}
impl BatTester {
pub fn new() -> Self {
modify_sample_file();
let temp_dir = create_sample_directory().expect("sample directory");
let root = env::current_exe()
.expect("tests executable")
@@ -21,17 +33,18 @@ impl BatTester {
.to_path_buf();
let exe_name = if cfg!(windows) { "bat.exe" } else { "bat" };
let exe = root.join(exe_name);
BatTester {
exe: root.join(exe_name),
}
BatTester { temp_dir, exe }
}
pub fn test_snapshot(&self, style: &str) {
let output = Command::new(&self.exe)
.args(&["tests/snapshots/sample.rs", &format!("--style={}", style)])
.current_dir(self.temp_dir.path())
.args(&["sample.rs", &format!("--style={}", style)])
.output()
.expect("bat failed");
// have to do the replace because the filename in the header changes based on the current working directory
let actual = String::from_utf8_lossy(&output.stdout)
.as_ref()
@@ -47,26 +60,35 @@ impl BatTester {
}
}
impl Drop for BatTester {
fn drop(&mut self) {
undo_sample_file_modification();
}
}
fn create_sample_directory() -> Result<TempDir, git2::Error> {
// Create temp directory and initialize repository
let temp_dir = TempDir::new("bat-tests").expect("Temp directory");
let repo = Repository::init(&temp_dir)?;
fn modify_sample_file() {
fs::copy(
"tests/snapshots/sample.modified.rs",
"tests/snapshots/sample.rs",
).expect("generating modified sample file failed");
}
// Copy over `sample.rs`
let sample_path = temp_dir.path().join("sample.rs");
println!("{:?}", &sample_path);
fs::copy("tests/snapshots/sample.rs", &sample_path).expect("successful copy");
fn undo_sample_file_modification() {
let output = Command::new("git")
.args(&["checkout", "--", "tests/snapshots/sample.rs"])
.output()
.expect("git checkout failed");
// Commit
let mut index = repo.index()?;
index.add_path(Path::new("sample.rs"))?;
if !output.status.success() {
panic!("undoing modified sample changes failed")
}
let oid = index.write_tree()?;
let signature = Signature::now("bat test runner", "bat@test.runner")?;
let tree = repo.find_tree(oid)?;
let _ = repo.commit(
Some("HEAD"), // point HEAD to our new commit
&signature, // author
&signature, // committer
"initial commit",
&tree,
&[],
);
let mut opts = CheckoutBuilder::new();
repo.checkout_head(Some(opts.force()))?;
fs::copy("tests/snapshots/sample.modified.rs", &sample_path).expect("successful copy");
Ok(temp_dir)
}
-12
View File
@@ -1,6 +1,5 @@
mod tester;
use std::process::{Command, Stdio};
use tester::BatTester;
static STYLES: &'static [&'static str] = &[
@@ -25,17 +24,6 @@ static STYLES: &'static [&'static str] = &[
#[test]
fn test_snapshots() {
let status = Command::new("git")
.arg("rev-parse")
.stdout(Stdio::null())
.stderr(Stdio::null())
.status();
if !status.map(|s| s.success()).unwrap_or(false) {
// Git not available or not a git repository. Skipping snapshot test.
return;
}
let bat_tester = BatTester::new();
for style in STYLES {