David Peter
dbf78d280a
Fix loading of several plugins
2022-05-29 20:57:01 +02:00
David Peter
bc91af3ee5
Better error handling
2022-05-29 20:48:37 +02:00
David Peter
3811615606
Initial prototype for Lua plugins
2022-05-29 20:40:05 +02:00
Martin Nordholts
3339eee2dc
Make the default macOS theme depend on Dark Mode ( #2197 )
...
* Make the default macOS theme depend on Dark Mode
We frequently get complaints from macOS users that bat does not work on
their default macOS terminal background, which is white.
Pay the price of slightly increased startup time to get a better default
on macOS. To avoid the slightly increased startup time, simply specify a
theme explicitly via `--theme`, `BAT_THEME`, or `~/.config/bat`.
Note that if there is an error when we check if Dark Mode is enabled, we
behave the same as on Windows and Linux; assume that the terminal
background is dark. This harmonizes behavior across platforms, and makes
bat behave the same as before, when Dark Mode was always assumed to be
enabled.
* src/assets.rs: Fix typo
* Update CHANGELOG.md
2022-05-24 19:29:03 +02:00
David Peter
e9f8370b13
Refer to discussions page in issue templates.
2022-05-22 21:27:54 +02:00
David Peter
892b186ba5
Add CHANGELOG entry
2022-05-16 21:54:36 +02:00
David Peter
6db64cf050
Use cross to build x86_64-unknown-linux-gnu executables
...
We do this in order to link against older versions of glibc.
closes #2106
2022-05-16 21:54:36 +02:00
Martin Nordholts
5f139e5ec2
CHANGELOG.md: Remove empty Themes section for v0.21.0
2022-05-15 15:28:25 +02:00
Martin Nordholts
8b50ef87fd
Post-release: Prepare an "unreleased" section at the top of CHANGELOG.md
...
As per `doc/release-checklist.md`.
2022-05-12 13:40:48 +02:00
Martin Nordholts
405e5f7460
assets/create.sh
2022-05-12 12:12:49 +02:00
Martin Nordholts
8d4f8ba1b2
CHANGELOG.md: unreleased -> v0.21.0
2022-05-12 12:12:49 +02:00
Martin Nordholts
d3f89bc4bc
Bump to v0.21.0
2022-05-12 12:12:49 +02:00
Martin Nordholts
5fe9b3e1b3
Make INI
syntax register as handler of .inf
files
...
We need to type `inf` and `INF` as strings in `INI.sublime-syntax`,
otherwise `yaml-rust` interprets them as real numbers ("infinity") and
they do not get registered as file extensions:
/Users/martin/src/yaml-rust # https://github.com/chyh1990/yaml-rust
% cargo run --example dump_yaml ~/src/bat/assets/syntaxes/02_Extra/INI.sublime-syntax
---
String("name"):
String("INI")
String("file_extensions"):
String("ini")
String("INI")
Real("inf")
Real("INF")
...
Also add a regression test.
2022-05-11 17:39:01 +02:00
Martin Nordholts
dc7d5a862f
release-checklist.md: Don't recommend --allow-dirty
to cargo publish
...
Using `--allow-dirty` increases the risk of the published code not being
versioned properly in git.
2022-05-09 09:47:30 +02:00
Martin Nordholts
4789c71a37
release-checklist.md: Recommend looking at the tip of master for -h
and man
2022-05-09 09:47:30 +02:00
Martin Nordholts
be99b759d3
release-checklist.md: Recommend --locked
for cargo install
...
So that the command will not fail if you are using the MSRV toolchain
and the latest version of a dependency happens to have a higher MSRV
than we do.
2022-05-09 09:47:30 +02:00
Martin Nordholts
5f7ae6b277
release-checklist.md: Recommend a single git grep command for MSRV
...
That filters out irrelevant hits in CHANGELOG.md and tests/.
2022-05-09 09:47:30 +02:00
Martin Nordholts
ea5aaa03a2
CHANGELOG.md: Clean up and tweak
2022-05-09 08:25:43 +02:00
Martin Nordholts
7334ab4542
Bump to syntect 5.0.0 to e.g. start lazy-loading syntaxes ( #2181 )
...
* Bump to syntect 5.0.0 to e.g. start lazy-loading themes
Closes #915
Closes #951
Closes #1846
Closes #1854
* Typo fix formated -> formatted
* Update CHANGELOG.md
2022-05-07 13:43:11 +02:00
Martin Nordholts
719248f1c1
Simplify release-checklist.md by printing -h
, --help
and man
in CI ( #2183 )
...
* Simplify release-checklist.md by printing `-h`, `--help` and `man` in CI
Note that we run `find . -name bat.1` before we run anything with
`--all-features`, because `--all-features` is considered a separate
target, and so we will get a different (but identical) `bat.1`. For
example, we might have these:
./target/debug/build/bat-218e9538b4996215/out/assets/manual/bat.1
./target/debug/build/bat-89d6f56802af023f/out/assets/manual/bat.1
By showing the man page earlier, there is only one `bat.1` to pick from.
* Use plain `man $(find . -name bat.1)`
2022-05-06 07:33:32 +02:00
dependabot[bot]
ef3e398b2b
Bump assets/syntaxes/02_Extra/Zig from 87ecbca
to 1a4a384
( #2136 )
...
* Bump assets/syntaxes/02_Extra/Zig from `87ecbca` to `1a4a384`
Bumps [assets/syntaxes/02_Extra/Zig](https://github.com/ziglang/sublime-zig-language ) from `87ecbca` to `1a4a384`.
- [Release notes](https://github.com/ziglang/sublime-zig-language/releases )
- [Commits](87ecbcae6f...1a4a38445f
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Zig
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update tests/syntax-tests/highlighted/Zig/example.zig and CHANGELOG.md
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2022-05-05 20:29:17 +02:00
Tejinder Singh
52bab63e18
Add --relative
to batdiff
in README.md ( #2172 )
2022-05-05 20:27:52 +02:00
Martin Nordholts
0851bbbb28
printer.rs: De-duplicate code to highlight long lines
...
We do this to only have one invocation of `highlighter.highlight(...)`
so we don't need to change to `highlighter.highlight_line(...)` in two
places in #2181 .
2022-05-05 17:21:49 +02:00
Ryan Zoeller
05ebf5ed26
Limit nix features
...
This removes memoffset as an indirect dependency, and should slightly decrease build times.
2022-05-05 06:24:26 +02:00
Isaac Horvath
adea895026
Add a --style=default option ( #2119 )
...
* Add a --style=default option
* Added --style=default test and CHANGELOG entry
* Format CHANGELOG.md options with quotes
Co-authored-by: Martin Nordholts <enselic@gmail.com>
* Update help text for '--style'
* Make --style=default the default option
* Update style descriptions: "basic" -> "recommended"
* Add integration test for --style=default as default
* Update clap long help for --style
2022-05-04 21:31:32 +02:00
dependabot[bot]
a6bd28a78b
Bump assets/syntaxes/02_Extra/Nginx from 15a1db1
to 65f5a63
...
Bumps [assets/syntaxes/02_Extra/Nginx](https://github.com/brandonwamboldt/sublime-nginx ) from `15a1db1` to `65f5a63`.
- [Release notes](https://github.com/brandonwamboldt/sublime-nginx/releases )
- [Commits](15a1db1510...65f5a63c0d
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Nginx
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 21:29:18 +02:00
Keith Hall
b5294f1cb2
Skip syntax highlighting for long lines ( #2165 )
...
* Skip highlighting for long lines
* Run cargo fmt, update changelog
2022-05-04 07:59:24 +02:00
Nathan Fisher
5114c0189d
Add support for BusyBox less as pager ( #2162 )
...
* Add support for BusyBox less as pager
* Run tests/syntax-tests/update.sh to update tests
* Address reviewer's concerns with pull request
* Revert all changes in `test` directory
* Minimize overall diff size
* Detect busybox from separate helper function
* Pass equivalent options to BusyBox from same code by changing from long to
short options
* Remove redundant `if` statement from previous commit
Add test for invalid utf-8
Add `parse_less_version_busybox` to test for invalid program
Add commenting around short options
2022-05-04 07:56:38 +02:00
dependabot[bot]
f2727d74d5
Bump nix from 0.23.1 to 0.24.1
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.23.1 to 0.24.1.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.23.1...v0.24.1 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 07:54:31 +02:00
dependabot[bot]
735bee47eb
Bump flate2 from 1.0.22 to 1.0.23
...
Bumps [flate2](https://github.com/rust-lang/flate2-rs ) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.22...1.0.23 )
---
updated-dependencies:
- dependency-name: flate2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 07:53:20 +02:00
dependabot[bot]
a05ac53040
Bump thiserror from 1.0.30 to 1.0.31
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.30 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.30...1.0.31 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 07:51:35 +02:00
Martin Nordholts
acb1231e40
Run cargo clippy --fix --all-targets --all-features
with Rust 1.60
...
Clippy in the newly released Rust 1.60 found some new lints.
Conveniently, all of them were fixable with `--fix`.
By fixing these lints it becomes easier for us and others to see when
new lints are introduced.
2022-05-04 07:49:40 +02:00
cyqsimon
3ae05333b0
Add mapping for Unix mail spool ( #2156 )
2022-04-27 22:51:10 +02:00
dependabot[bot]
4291fd5c65
Bump assets/syntaxes/02_Extra/Fish from cd95616
to 98316d4
...
Bumps [assets/syntaxes/02_Extra/Fish](https://github.com/Phidica/sublime-fish ) from `cd95616` to `98316d4`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases )
- [Commits](cd95616df5...98316d4332
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Fish
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 21:09:33 +02:00
Víctor González Prieto
b0898900ce
Syntax: add cmd-help ( #2148 )
...
* Add cmd-help syntax
To highlight command --help messages.
* README.md: mention help message highlighting
* README.md: edit help message highlighting
2022-04-26 19:42:18 +02:00
Martin Nordholts
3239d3be2a
bug_report.md template: Explicitly ask for steps
2022-04-20 07:53:03 +02:00
Martin Nordholts
19033d7315
bug_report.md template: Mention some already reported bugs
2022-04-20 07:53:03 +02:00
Martin Nordholts
520081a92c
Print info about custom assets in --diagnostics
2022-04-02 21:46:41 +02:00
Martin Nordholts
47e0dc22d2
Lock regex crate at min 1.5.5 for CVE-2022-24713
...
Cargo.lock already specifies 1.5.5, but we should also do it in
Cargo.toml.
2022-04-02 21:46:16 +02:00
acheronfail
33a984992b
Update CHANGELOG.md
...
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2022-04-02 21:05:37 +02:00
acheronfail
b1e67e215c
Allow configuring show_nonprintable from PrettyPrinter
2022-04-02 21:05:37 +02:00
dependabot[bot]
49317adcd3
Bump git2 from 0.14.1 to 0.14.2
...
Bumps [git2](https://github.com/rust-lang/git2-rs ) from 0.14.1 to 0.14.2.
- [Release notes](https://github.com/rust-lang/git2-rs/releases )
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.14.1...0.14.2 )
---
updated-dependencies:
- dependency-name: git2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 20:57:30 +02:00
dependabot[bot]
738304fe27
Bump once_cell from 1.9.0 to 1.10.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.9.0...v1.10.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 06:48:35 +02:00
dependabot[bot]
a191552031
Bump regex from 1.5.4 to 1.5.5
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 06:47:13 +02:00
dependabot[bot]
cec7229b6a
Bump semver from 1.0.6 to 1.0.7
...
Bumps [semver](https://github.com/dtolnay/semver ) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/dtolnay/semver/releases )
- [Commits](https://github.com/dtolnay/semver/compare/1.0.6...1.0.7 )
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 06:44:20 +02:00
dependabot[bot]
e735562098
Bump assets/syntaxes/02_Extra/Fish from 2c254cc
to cd95616
...
Bumps [assets/syntaxes/02_Extra/Fish](https://github.com/Phidica/sublime-fish ) from `2c254cc` to `cd95616`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases )
- [Commits](2c254cc851...cd95616df5
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/Fish
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 08:18:18 +02:00
Keith Hall
1b030dc03b
Merge pull request #2127 from sharkdp/log_syntax_2123
...
Syntax: [Log] highlight escape characters in double quoted strings
2022-03-23 22:37:44 +02:00
Keith Hall
c0ec03e08a
Syntax: [Log] highlight escape characters in double quoted strings
2022-03-22 22:20:39 +02:00
Martin Nordholts
9ab378b5dc
Include contents of custom assets metadata.yaml
in --diagnostics
2022-03-07 21:05:09 +01:00
dependabot[bot]
a153a78d7a
Bump shell-words from 1.0.0 to 1.1.0
...
Bumps [shell-words](https://github.com/tmiasko/shell-words ) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/tmiasko/shell-words/releases )
- [Commits](https://github.com/tmiasko/shell-words/compare/v1.0.0...v1.1.0 )
---
updated-dependencies:
- dependency-name: shell-words
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-06 20:24:37 +01:00