Commit Graph

1256 Commits

Author SHA1 Message Date
sharkdp
5e5cb89da6 Add all builder options 2020-04-22 23:55:28 +02:00
sharkdp
057e4eced1 Large refactoring towards a better builder structure 2020-04-22 23:55:28 +02:00
sharkdp
27974616bf Initial verison of PrettyPrinter builder 2020-04-22 23:55:28 +02:00
sharkdp
319ab779ee Use 4-bit ANSI codes for base16 theme
closes #865
2020-04-22 10:22:11 +02:00
Brice Dutheil
37831cdcb3 Fix README phrasing about dark mode 2020-04-21 22:37:24 +02:00
sharkdp
70480ee9d4 Bump version to v0.14.0 2020-04-21 18:21:22 +02:00
sharkdp
371c929ede Update CHANGELOG 2020-04-21 18:21:12 +02:00
sharkdp
864656bd11 Pass --no-init on Windows if less version < 559
We used to call `less` with
``` bash
less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init
```
We only passed `--no-init` because there was a bug with previous versions
of `less` which required the use of `--no-init` in combination with
`--quit-if-one-screen` to prevent this "no output" issue from happening.

Since bat 0.13, [we omit the `--no-init` option](0ecc94956b/src/output.rs (L85-L97))
if we can detect that the version of `less` is higher than or equal to 530. We
did that because `--no-init` breaks mouse support and because [less 530 fixed
the above-mentioned bug](http://www.greenwoodsoftware.com/less/news.530.html).
However, it seems that this bug was *not* fixed on Windows!

According to @gwsw, the issue should be fixed with less 559 on Windows.

closes #887
2020-04-21 18:18:03 +02:00
sharkdp
2e9cf63a5f Fix compilation of library 2020-04-21 18:14:31 +02:00
sharkdp
886b22e0ee Do not store metadata.yaml file in git 2020-04-21 18:14:31 +02:00
sharkdp
72618db179 Add metadata information to cached assets
When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
`metadata.yaml` file which includes information about the `bat` version which was
used to create the cached files. When loading cached files, we now print an error
if they have been created with an incompatible version

closes #882
2020-04-21 18:14:31 +02:00
sharkdp
c8273369cc Make get_cache_dir private 2020-04-21 18:14:31 +02:00
sharkdp
95a56a2795 Typo in CHANGELOG 2020-04-21 17:49:36 +02:00
sharkdp
859ff50766 Update default config file, add comment about tmux mouse scrolling support 2020-04-21 17:45:14 +02:00
sharkdp
ce583eb9bf Revert "Pass '--mouse' to less versions >= 551"
This reverts commit cb21b74ecd.
2020-04-21 17:29:01 +02:00
sharkdp
3a195be14e Revert "Only enable --mouse when running from tmux, see #904"
This reverts commit 5f6e310152.
2020-04-21 17:28:37 +02:00
sharkdp
5f6e310152 Only enable --mouse when running from tmux, see #904 2020-04-21 16:15:02 +02:00
sharkdp
5449472f15 Remove invalid UTF-8 file from repo, use temp file instead 2020-04-21 16:02:28 +02:00
sharkdp
82e20bfe14 Fix bug for file with invalid-utf8 filenames 2020-04-21 14:09:18 +02:00
sharkdp
47abb192bc Patch Rust syntax file
closes #924
2020-04-21 13:45:26 +02:00
sharkdp
03a7d6be92 Disable Travis caching 2020-04-21 13:44:51 +02:00
sharkdp
a927815292 Update CHANGELOG 2020-04-21 11:50:26 +02:00
sharkdp
3447a03433 Update dependencies 2020-04-21 11:50:26 +02:00
sharkdp
03c2281828 Add do-not-panic! regression tests 2020-04-21 11:50:26 +02:00
sharkdp
c386cb35fb Pass '--mouse' to less versions >= 551
When using `less` version 551 or newer, `bat` will now pass the `--mouse` argument, allowing
for (better) mouse scrolling support in some terminals.

closes #904
2020-04-21 10:00:32 +02:00
sharkdp
97ea3dd4dc Update CHANGELOG 2020-04-21 08:58:38 +02:00
sharkdp
a6d9d1551f Improve error message 2020-04-21 08:57:15 +02:00
sharkdp
34619a2e89 Small refactoring, handle invalid UTF-8 filenames 2020-04-21 08:57:15 +02:00
Kyle Criddle
83d408bab3 Extract common syntax functionality to helper fns 2020-04-21 08:57:15 +02:00
sharkdp
8067fd9eda Fix build on 1.37 2020-04-21 08:57:15 +02:00
sharkdp
98ba9e0101 Use to_string_lossy 2020-04-21 08:57:15 +02:00
sharkdp
1b8ce60054 Pass stdin as a generic BufRead, fix stdin tests 2020-04-21 08:57:15 +02:00
sharkdp
d5a31dc2ec Remove commented-out code 2020-04-21 08:57:15 +02:00
sharkdp
051dd4ba87 Make filename method private 2020-04-21 08:57:15 +02:00
sharkdp
2ad1848859 Do not take optional as argument 2020-04-21 08:57:15 +02:00
sharkdp
90e7d2fe33 Rename field name, new constructors 2020-04-21 08:57:15 +02:00
Kyle Criddle
04fa84aea7 Moved user_provided_filename to be contained within OrdinaryFile struct 2020-04-21 08:57:15 +02:00
Kyle Criddle
a3f8140fbe Use --file-name to detect syntax highlighting
Closes #891
2020-04-21 08:57:15 +02:00
Ethan P
96aedf6240
Add cat alias detection to info.sh (#911) 2020-04-21 08:33:44 +02:00
Michael Diamond
4cc2989fe9 Clarify the Ubuntu/Debian install instructions
A cursory reading of the existing text would lead a reader to think `bat`should be available on Debian, which isn't really true. Most users are not running Sid, so `bat` isn't yet available to them.
2020-04-17 14:10:08 +02:00
sharkdp
0ecc94956b Add performance patch for Makefile syntax
Thanks to @keith-hall!

closes #750
2020-04-13 10:38:22 +02:00
David Peter
61e47e0c13
Add Stylus syntax (#917)
closes #915
2020-04-12 19:42:36 +02:00
sharkdp
f5145ef130 Move Rego syntax 2020-04-12 19:20:28 +02:00
sharkdp
edd27645d0 Add a way to directly search for a pattern 2020-04-12 19:19:33 +02:00
sharkdp
fc6f4f31dd Add documentation 2020-04-12 19:19:33 +02:00
sharkdp
f2cef702a0 Add script to find slow-to-highlight files 2020-04-12 19:19:33 +02:00
sharkdp
8b3d54ce29 Update CHANGELOG 2020-04-11 23:55:27 +02:00
sharkdp
47a3721890 Add patch for C# syntax 2020-04-11 23:55:27 +02:00
sharkdp
495fab24a5 cargo fmt 2020-04-11 19:40:04 +02:00
sharkdp
fccbe4f4f2 Add regex-onig feature to 'cargo check' tests 2020-04-11 10:33:53 +02:00