mirror of
https://github.com/sharkdp/bat
synced 2026-08-05 19:11:42 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e8ea815af | |||
| b7bc2d54ba | |||
| 21f9e2b0f7 | |||
| 92aa2b547e | |||
| 65f66d0bee |
+14
-2
@@ -6,16 +6,26 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
rust: stable
|
rust: stable
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
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
|
- os: osx
|
||||||
rust: stable
|
rust: stable
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
# Minimum Rust supported channel.
|
# Minimum Rust supported channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: 1.22.1
|
rust: 1.24.0
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
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
|
- os: osx
|
||||||
rust: 1.22.1
|
rust: 1.24.0
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
@@ -23,6 +33,8 @@ addons:
|
|||||||
packages:
|
packages:
|
||||||
# needed for i686-unknown-linux-gnu target
|
# needed for i686-unknown-linux-gnu target
|
||||||
- gcc-multilib
|
- gcc-multilib
|
||||||
|
# needed for musl targets
|
||||||
|
- musl-tools
|
||||||
# needed to build deb packages
|
# needed to build deb packages
|
||||||
- fakeroot
|
- fakeroot
|
||||||
|
|
||||||
|
|||||||
Generated
+1
-1
@@ -61,7 +61,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bat"
|
name = "bat"
|
||||||
version = "0.2.1"
|
version = "0.2.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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"
|
name = "bat"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/sharkdp/bat"
|
repository = "https://github.com/sharkdp/bat"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
atty = "0.2.2"
|
atty = "0.2.2"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ makepkg -si
|
|||||||
|
|
||||||
### From source
|
### 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:
|
You can then use `cargo` to build everything:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
@@ -46,11 +46,12 @@ cargo install bat
|
|||||||
|
|
||||||
## Customization
|
## 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:
|
To build your own language-set and theme, follow these steps:
|
||||||
|
|
||||||
Create a folder with a syntax highlighting theme:
|
Create a folder with a syntax highlighting theme:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
mkdir -p ~/.config/bat/themes
|
mkdir -p ~/.config/bat/themes
|
||||||
cd ~/.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:
|
Create a folder with language definition files:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
mkdir -p ~/.config/bat/syntax
|
mkdir -p ~/.config/bat/syntax
|
||||||
cd ~/.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
|
Finally, use the following command to parse all these files into a binary
|
||||||
cache:
|
cache:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
bat init-cache
|
bat init-cache
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user