einfachIrgendwer0815
3d87b25b19
Add unicode/caret replacements for all control characters ( #2712 )
2023-10-20 19:41:48 +02:00
rhysd
e5c81ed41e
Replace our own macros to write buffers with standard macros
2023-10-05 09:21:26 +02:00
skoriop
0937d575fd
fix: rewrite overflow test using usize::MAX
2023-10-05 09:20:09 +02:00
skoriop
d89df18de2
test: add test for overflow in LineRange::from
2023-10-05 09:20:09 +02:00
skoriop
9fcc57e496
fix: integer overflow in LineRange::parse_range
2023-10-05 09:20:09 +02:00
Linda_pp
9f795dd947
Associate *.sarif
files with json
syntax ( #2695 )
...
* Associate `*.sarif` files with `json` syntax
* Update changelog for #2695
2023-10-04 09:34:40 +02:00
Nicolas AMBRY
5a240f36b9
Case insensitive --map-syntax
( #2650 )
...
Co-authored-by: Nicolas AMBRY <nicolas.ambry@atos.net>
2023-09-14 16:04:43 +02:00
J-Kappes
e2bf85e749
Make -pp override --paging and vice versa when passed as a later argument. ( #2660 )
2023-09-14 05:45:46 +02:00
Anomalocaridid
433176ab54
require LESSOPEN to have exactly one %s
2023-09-08 06:25:20 +02:00
Anomalocaridid
b56021ffa9
make LESSOPEN support opt-in
2023-09-08 06:25:20 +02:00
Anomalocaridid
ac2953c070
pass --no-lessopen to less by default
2023-09-08 06:25:20 +02:00
Anomalocaridid
e32ad0b048
Add $LESSOPEN
and $LESSCLOSE
support ( #2444 )
2023-09-02 08:48:26 +02:00
David Peter
3abc0c0fc4
Merge pull request #2548 from utkarshgupta137/master
...
Replace `dirs` crate with `etcetera` crate
2023-09-01 21:41:24 +02:00
David Peter
b06f13f0c5
Merge pull request #2618 from Piturnah/feat/write-to-buffer
...
feat: Optionally write to a buffer instead of stdout
2023-09-01 21:18:04 +02:00
Utkarsh Gupta
a721cc31f3
Replace dirs
crate with etcetera
crate
2023-09-01 21:13:21 +02:00
David Peter
1e52785d35
Merge pull request #2626 from rhysd/encoding_rs
...
Replace unmaintained `encoding` dependency with `encoding_rs`
2023-09-01 21:12:07 +02:00
Orion Yeung
9ba3b6ed13
No duplicate keys test, fixes #2643 ( #2647 )
...
* moved unit tests to conditional compile
made module `tests` and conditionally compiled
* added test to check for duplicate keys in builtin
checks all pairs in GlobMatcher::mappings via `GlobMatcher::glob`s `Eq`
panics at first match
```rs
SyntaxMapping {
mappings: Vec<(
GlobMatcher {
glob: Glob, ...,
}, ...,
}, ...,
}
```
* output more info with test failure
* dont duplicatively add git config path
* use guard in match for adding builtin git config syntax mapping
---------
Co-authored-by: Orion Yeung <11580988+orionyeung001@users.noreply.github.com>
2023-09-01 21:11:41 +02:00
Peter Hebden
72e1a40bab
Remove leftover unwrap
2023-09-01 20:52:55 +02:00
Peter Hebden
b2c28cdddb
Clippy lints
2023-09-01 20:52:55 +02:00
Peter Hebden
906e774372
Handle todos
2023-09-01 20:52:55 +02:00
Peter Hebden
d929becefc
Fix signatures
2023-09-01 20:52:55 +02:00
Peter Hebden
103a2f0d9b
Add OutputHandle
enum to use instead of &mut dyn io::Write
2023-09-01 20:52:55 +02:00
rhysd
d33b2e158e
Replace unmaintained encoding
with encoding_rs
2023-09-01 20:41:55 +02:00
einfachIrgendwer0815
26111950b3
Add environment variable BAT_PAGING
2023-09-01 17:59:41 +02:00
Orion Yeung
f21d3502e1
Add *.ron
syntax mapping
...
Add a mapping to use `Rust` for rusty object notation, identified by `.ron` extension. See [#2427 ](https://github.com/sharkdp/bat/issues/2427 ).
2023-09-01 17:57:46 +02:00
WinterCore
d580445aef
fix: Add syntax mapping jsonl
=> json
2023-09-01 17:45:41 +02:00
mataha
82664e3c82
Bump MSRV to 1.70.0
...
The intention is to take advantage of `std::io::IsTerminal` that landed
in 1.70.0, both in `bat` and its dependencies (`clap`, `grep-cli`).
This will fix #2570 as well - `grep-cli` 0.1.9 has a patch for that.
Signed-off-by: mataha <mataha@users.noreply.github.com>
2023-09-01 05:42:45 +02:00
Ville Skyttä
1893405cbf
Add .dpkg-new and .dpkg-tmp to ignored suffixes
...
Refs https://www.debian.org/doc/manuals/debian-handbook/sect.package-meta-information.en.html#sect.conffiles
2023-08-28 17:50:29 +02:00
John Higgins
b1fbcc8a6e
fix for issue #2633
2023-08-02 00:04:55 -07:00
einfachIrgendwer0815
c46c53320b
Add Containerfile
syntax mapping
2023-07-02 13:50:37 +02:00
cyqsimon
f8c700027e
Add os-release
syntax mapping
2023-06-01 13:17:22 +08:00
Nigecat
149dec6953
Fix paging not happening when stdout is interactive but stdin is not
2023-05-22 05:42:01 +02:00
Constantin Nickel
57cc0d8435
Use the is-terminal
crate instead of atty
...
The crate is already used by `clap` and a similar trait is about to be
stabilized in `std`.
2023-04-05 19:26:52 +02:00
Collin Styles
7929179a74
Make PrettyPrinter::header
an alias for header_filename
...
Fixes #2378
2023-03-24 22:33:43 +01:00
David Peter
1a142a82b4
Merge pull request #2513 from nickelc/deps/dirs
...
Replace `dirs-next` with the original `dirs` crate
2023-03-24 22:07:47 +01:00
Constantin Nickel
0e148e35dd
Replace dirs-next
with the original dirs
crate
...
The `dirs` crate was forked as `dirs-next` after the original repos were archived.
The fork hasn't released a new version since October 2020, while the original
has been taken off the shelf and has seen updates since then.
2023-03-24 19:10:38 +01:00
Constantin Nickel
da3aa4e2fd
Use nu-ansi-term
instead of ansi_term
...
The `nu-ansi-term` crate is a fork of `ansi_term` which is maintained by
the Nushell project.
2023-03-24 17:42:54 +01:00
David Peter
231ad86f04
Merge pull request #2502 from Enselic/clippy-1.68
...
Fix clippy warnings with Rust 1.68
2023-03-15 08:36:28 +01:00
einfachIrgendwer0815
8f99a78cf1
Print non-printable characters using caret notation ( #2443 )
...
When the new flag is set, non-printable characters are printed using caret notation.
2023-03-14 22:21:30 +01:00
Martin Nordholts
40a423905a
Fix clippy warnings with Rust 1.68
2023-03-14 21:19:14 +01:00
Martin Nordholts
ec6e9c29ac
Bump MSRV to 1.62 ( #2496 )
...
* Bump MSRV to 1.62
Mainly to be able to derive default enum variants.
* CHANGELOG.md: Update
2023-03-03 13:20:03 +01:00
BlackHoleFox
1004018941
Directly read preferences instead of using the defaults CLI
2023-02-05 16:53:28 +01:00
rhysd
4cc2a489d0
Remove unnecessary heap allocations in PrettyPrinter::print
for style components
2023-01-15 21:16:36 +09:00
rhysd
5e3abcad07
Fix code fence in doc comment
2023-01-13 08:16:38 +01:00
Miles Liu
e39178b101
Fix bat cache --clear
not clearing the --target
dir if specified
2022-11-19 18:00:37 +08:00
Aaron Kollasch
e773b48135
Fix cache subcommand and add tests
...
Treat the cache subcommand differently from --no-config:
For --no-config, insert args from selected environment variables
For cache, don't insert args
2022-11-02 16:48:51 -04:00
Aaron Kollasch
4bcea01e9d
Deduplicate lines in matches function
2022-11-02 16:48:51 -04:00
Aaron Kollasch
76aad7c74f
Improve correctness and add more tests
2022-11-02 16:48:50 -04:00
Aaron Kollasch
36ccc6a31e
Allow env vars to override config but not args
2022-11-02 16:48:50 -04:00
David Peter
a65b0828ee
Merge remote-tracking branch 'origin/master' into HEAD
2022-10-30 20:43:06 +01:00