mirror of
https://github.com/sharkdp/bat
synced 2026-08-04 19:01:44 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e8ea815af | |||
| b7bc2d54ba | |||
| 21f9e2b0f7 | |||
| 92aa2b547e | |||
| 65f66d0bee |
+14
-2
@@ -6,16 +6,26 @@ matrix:
|
||||
- os: linux
|
||||
rust: stable
|
||||
env: TARGET=x86_64-unknown-linux-gnu
|
||||
- os: linux
|
||||
rust: stable
|
||||
env:
|
||||
- TARGET=x86_64-unknown-linux-musl
|
||||
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
||||
- os: osx
|
||||
rust: stable
|
||||
env: TARGET=x86_64-apple-darwin
|
||||
|
||||
# Minimum Rust supported channel.
|
||||
- os: linux
|
||||
rust: 1.22.1
|
||||
rust: 1.24.0
|
||||
env: TARGET=x86_64-unknown-linux-gnu
|
||||
- os: linux
|
||||
rust: 1.24.0
|
||||
env:
|
||||
- TARGET=x86_64-unknown-linux-musl
|
||||
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
||||
- os: osx
|
||||
rust: 1.22.1
|
||||
rust: 1.24.0
|
||||
env: TARGET=x86_64-apple-darwin
|
||||
|
||||
addons:
|
||||
@@ -23,6 +33,8 @@ addons:
|
||||
packages:
|
||||
# needed for i686-unknown-linux-gnu target
|
||||
- gcc-multilib
|
||||
# needed for musl targets
|
||||
- musl-tools
|
||||
# needed to build deb packages
|
||||
- fakeroot
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -61,7 +61,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bat"
|
||||
version = "0.2.1"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
|
||||
name = "bat"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/sharkdp/bat"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
|
||||
[dependencies]
|
||||
atty = "0.2.2"
|
||||
|
||||
@@ -37,7 +37,7 @@ makepkg -si
|
||||
|
||||
### From source
|
||||
|
||||
If you want to build to compile `bat` from source, you need Rust 1.22 or higher.
|
||||
If you want to build to compile `bat` from source, you need Rust 1.24 or higher.
|
||||
You can then use `cargo` to build everything:
|
||||
|
||||
``` bash
|
||||
@@ -46,11 +46,12 @@ cargo install bat
|
||||
|
||||
## Customization
|
||||
|
||||
`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/) library for syntax highlighting. `syntect` can read any [Sublime Text `.sublime-syntax` files](https://www.sublimetext.com/docs/3/syntax.html) and themes.
|
||||
`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.
|
||||
|
||||
To build your own language-set and theme, follow these steps:
|
||||
|
||||
Create a folder with a syntax highlighting theme:
|
||||
|
||||
``` bash
|
||||
mkdir -p ~/.config/bat/themes
|
||||
cd ~/.config/bat/themes
|
||||
@@ -63,6 +64,7 @@ ln -s "sublime-monokai-extended/Monokai Extended.tmTheme" Default.tmTheme
|
||||
```
|
||||
|
||||
Create a folder with language definition files:
|
||||
|
||||
``` bash
|
||||
mkdir -p ~/.config/bat/syntax
|
||||
cd ~/.config/bat/syntax
|
||||
@@ -75,6 +77,7 @@ git clone https://github.com/jonschlinkert/sublime-markdown-extended
|
||||
|
||||
Finally, use the following command to parse all these files into a binary
|
||||
cache:
|
||||
|
||||
``` bash
|
||||
bat init-cache
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user