Commit Graph

150 Commits

Author SHA1 Message Date
6acec2c074 Reduce startup time in loop-through mode with 80%-90%
Instead of 100 ms - 50 ms, startup takes 10 ms - 5 ms.

HighlightingAssets::get_syntax_set() is never called when e.g. piping the bat
output to a file (see Config::loop_through), so by loading the SyntaxSet only
when needed, we radically improve startup time when it is not needed.
2021-07-29 20:36:05 +02:00
a81009607a HighlightingAssets: Make .syntaxes() and syntax_for_file_name() failable
Or rather, introduce new versions of these methods and deprecate the old ones.

This is preparation to enable robust and user-friendly support for lazy-loading.
With lazy-loading, we don't know if the SyntaxSet is valid until after we try to
use it, so wherever we try to use it, we need to return a Result. See discussion
about panics in #1747.
2021-07-29 08:26:18 +02:00
ccf4563573 Make loading of cached assets closer in performance to integrated assets
Using BufReader makes sense for large files, but assets are never large enough
to require buffering. It is significantly faster to load the file contents in
one go, so let's do that instead.

Closes #1753
2021-07-27 14:53:59 +02:00
6e536ab06d Update CHANGELOG 2021-07-25 13:28:43 +02:00
945bba777b Upgrade CHANGELOG with security vulnerability notice 2021-07-13 10:56:51 +02:00
a4b674902f Bump version to v0.18.2 2021-07-12 23:17:48 +02:00
3c59b98dc8 Add CHANGELOG entry for #1687 2021-07-09 06:36:06 +02:00
0e9d612173 Add change log entry for bash completion 2021-06-28 11:58:03 +02:00
90e48e9b61 Spelling fixes 2021-06-13 22:08:56 +02:00
f4217eba73 Merge pull request #1669 from sharkdp/dependabot/submodules/assets/syntaxes/02_Extra/DotENV-58201ba
Bump assets/syntaxes/02_Extra/DotENV from `a1c9176` to `58201ba`
2021-06-02 07:48:13 +02:00
14900f6ed8 Update CHANGELOG.md for #1668 2021-06-01 22:36:56 +02:00
bcca56e3b1 CHANGELOG.md: Apply DotENV syntax also for .env.default and .env.defaults 2021-06-01 18:45:17 +02:00
cf7d9ef962 Update CHANGELOG.md for #1661 2021-05-27 12:05:07 +02:00
8435cad602 Merge master 2021-05-15 09:41:27 +02:00
6fc9641f6a Update CHANGELOG for #1655 2021-05-15 00:13:42 +02:00
ef5154d5b3 Update CHANGELOG for #1654 2021-05-14 22:12:58 +02:00
73dab51ad1 Bump version, update dependencies 2021-05-12 22:55:25 +02:00
9328007d05 Updated CHANGELOG 2021-05-12 22:46:44 +02:00
5db3c93057 Merge branch 'master' into syslog 2021-05-12 11:34:35 +02:00
3559079de0 Improvements to CSV highlighting 2021-05-11 21:04:02 +02:00
aa09a9dc04 Update changelog for #1589 2021-04-06 15:33:34 -07:00
1537733e6b replace Syslog dependency with a custom syntax 2021-04-04 22:47:01 +03:00
d89fa3ebc2 Add SystemVerilog support 2021-03-15 07:21:15 +01:00
52f84b063c Update dependencies, MSRV: 1.45 2021-03-07 15:33:37 +01:00
35347c2310 Improve readability
Using `Path`s for paths expresses intent more clearly.
2021-03-07 14:59:10 +01:00
b147443c32 Add new unreleased section 2021-02-28 23:28:59 +01:00
ca60937c2e Do not ignore non-existent BAT_CONFIG_PATH
Do not ignore `BAT_CONFIG_PATH` if it doesn't exist. Both when
generating a new config file with `--generate-config-file` and
when attempting to read the config.

Also, provide a better error message in case the file can not
be created.

closes #1550
2021-02-28 10:08:24 +01:00
2aa3ed9da8 Update CHANGELOG 2021-02-28 10:06:56 +01:00
7eabb5e05a Highlight *.pac files as JavaScript
closes #1515
2021-02-16 21:52:52 +01:00
37d0d8984c README.md: Warn about buggy snap packages
As discussed in #1519, the batcat snap package is too problematic for
official endorsement, so withdraw recommendation from README.me (and
remove section from CHANGELOG.md since a release with it has not been
made yet).
2021-02-15 22:39:48 +01:00
2e8c0a39db Add support for env vars and manpage refs with dots to Manpage syntax 2021-02-15 22:30:42 +01:00
c48e779e8a CHANGELOG.md: Add entry for #1413 2021-01-11 21:56:10 +01:00
060b9981b5 Remove deprecated PrettyPrinter methods 2021-01-11 21:36:08 +01:00
02e6ff4183 Merge remote-tracking branch 'origin/master' into fix-1063 2021-01-10 11:56:03 +01:00
7ada963ec2 Add ChangeLog entry 2021-01-09 22:35:50 +01:00
7c227169a4 Add note about breaking change 2021-01-09 20:44:44 +01:00
de6cb75f4b Addressed PR feedback. Upped min version and used matches! macro 2021-01-09 15:21:26 +01:00
83c9cb7907 fix bug where long lines were truncated in plain mode without wrap=never not being set 2021-01-09 15:21:26 +01:00
da10166625 Merge remote-tracking branch 'origin/master' into fix-1063 2021-01-07 12:58:26 +01:00
2b44940f81 Update CHANGELOG 2021-01-06 22:55:12 +01:00
478233f795 Merge remote-tracking branch 'origin/master' into fix-1063 2021-01-04 21:02:51 +01:00
7fbb3a5352 Add Zig entry in ChangeLog, see #1470 2021-01-02 21:37:11 +01:00
aa5b941ed5 Add ChangeLog entry 2021-01-02 09:46:58 +01:00
bfa5342331 Also replace 'more' from PAGER with 'less'
But first do some quite significant refactorings to keep the code clean
and easy to understand.
2020-12-30 17:59:30 +01:00
22bdc7c20f When PAGER=most, don't print a warning to stderr, silently use less instead 2020-12-30 08:25:39 +01:00
6d0e7650c3 Add .resource extension for Robot Framework 2020-12-29 09:04:34 +01:00
552545fe5f Merge remote-tracking branch 'origin/master' into fix-1063 2020-12-28 22:48:52 +01:00
dcfe883f4b Simplify and polish pager.rs and related code 2020-12-28 22:39:34 +01:00
f45fa5e187 CHANGELOG.md: Add bugfix entry for #614 2020-12-28 22:32:56 +01:00
cc0f8ca813 Merge remote-tracking branch 'origin/master' into fix-1063 2020-12-28 21:57:38 +01:00