Oliver looney
7f12989127
added set_terminal_title arg to clap_app.rs to fix ci errors
4 months ago
Oliver looney
60e32cf823
removed set_terminal_title arg from clap_app.rs since other boolean args aren't in clap_app.rs
4 months ago
Oliver looney
b33e33fe26
terminal title is only set if user opts in with --set_terminal_title flag
4 months ago
Oliver looney
9239b125b1
added a flag to config for setting terminal title
4 months ago
Filip Razek
e586751208
Attempt to fix integration test
4 months ago
Filip Razek
5c1f47359e
Run cargo fmt
4 months ago
Filip Razek
45ee2dc4c7
fix: Wrap file name in header
4 months ago
cyqsimon
230abfd2bc
Merge branch 'master' into syntax-mapping-refactor
5 months ago
cyqsimon
c0f2d6f934
Add note on subdirectory's irrelevance to ordering
5 months ago
cyqsimon
e4d637a3d8
Reverse precedence of syntax mappings specified on CLI
5 months ago
rhysd
8e66bc8722
Make the error handler `FnMut`
5 months ago
Oliver looney
3b0ade9cb8
slightly changed set terminal command to match docs & broke print line into multiple variables
5 months ago
Oliver looney
57016f4e04
small refactoring of set terminal title function
5 months ago
Oliver looney
12b74dfb4e
terminal title is only set when pager is being used
6 months ago
cyqsimon
f0a6fe216d
Benchmark prototype
6 months ago
cyqsimon
8a08025091
Disable `builtin_mappings_are_lazily_evaluated` for ARM builds
6 months ago
cyqsimon
586c804b1e
Add test: `builtin_mappings_are_lazily_evaluated`
6 months ago
cyqsimon
e30161ac3c
Add test: `builtin_mappings_matcher_only_compile_once`
6 months ago
cyqsimon
3865908439
Add test: `custom_mappings_precedence`
6 months ago
cyqsimon
9474b4cf8b
Rename & sort syntax mapping tests
6 months ago
cyqsimon
b48bda21a3
Add test: `all_fixed_builtin_mappings_can_compile`
6 months ago
cyqsimon
36073a3d95
Document another rule ignore condition
6 months ago
cyqsimon
1f10d846a3
Fix tests
...
1. for override test, test for something in `common`
2. move git mappings to `common`
6 months ago
cyqsimon
22531eab90
Port all mappings to new system
6 months ago
cyqsimon
0c1b80faab
Impl per-target syntax mappings
6 months ago
cyqsimon
ad628c0471
Fix iterator lifetime incompatibility
6 months ago
cyqsimon
f483d2df42
Lazily compile `GlobMatcher`s
6 months ago
cyqsimon
4ad3002543
`s/Lazy<GlobMatcher>/Lazy<Option<GlobMatcher>>/`
6 months ago
cyqsimon
cfd622d6e1
Migrate `SyntaxMapping` impl to new system
...
Most existing builtins are removed but not yet ported, so the test
`user_can_override_builtin_mappings` should fail. It should pass once the old
rules have been ported.
6 months ago
cyqsimon
1c7c9a6b6d
Split `syntax_mapping/builtin.rs`
6 months ago
cyqsimon
de6d418d42
Remove `BuiltinMatcher` enum
...
Explanation added as comments in code
Using plain `Lazy<Option<GlobMatcher>>` is just better
6 months ago
cyqsimon
7e1fbcfe95
Fix visibility for `SyntaxMapping::get_syntax_for`
...
This change was made in 31fb708
, but then was reverted (I assume incorrectly)
in 6246485
.
6 months ago
cyqsimon
0fea82cff9
Minor improvement of variable naming accuracy
6 months ago
cyqsimon
64840fbbae
`join_segments` -> `build_glob_string`
...
- this is a more descriptive name
6 months ago
cyqsimon
827b3eca2f
Add unset `*.conf` example
6 months ago
cyqsimon
9478d2dfe8
Isolate variables at compile time
6 months ago
cyqsimon
d24501ab5e
`include!` generated mappings in source
6 months ago
cyqsimon
52f94b4623
Clarify syntax selection algorithm behaviour
6 months ago
cyqsimon
37fd050100
Describe filename ordering more accurately
6 months ago
cyqsimon
83286975ff
Add ordering prefix to git-config example
6 months ago
cyqsimon
f705fcb984
Add global git-config example
6 months ago
cyqsimon
9ca1f20f43
Add specification draft
6 months ago
Oliver looney
6ad800e43a
tidied commits
6 months ago
Oliver looney
069318b139
fixed formatting of terminal title
6 months ago
Oliver looney
b9b554248d
successfully setting the terminal title to bat's input's names
6 months ago
Oliver looney
4863d428dd
title is being reset on quit, so no need to restore terminal title
6 months ago
Oliver looney
2e103ee6b3
able to set terminal title to hardcoded value
6 months ago
Lena
28990bc451
fix: display color when NO_COLOR is an empty string ( #2767 )
6 months ago
einfachIrgendwer0815
3d87b25b19
Add unicode/caret replacements for all control characters ( #2712 )
8 months ago
rhysd
e5c81ed41e
Replace our own macros to write buffers with standard macros
8 months ago
skoriop
0937d575fd
fix: rewrite overflow test using `usize::MAX`
8 months ago
skoriop
d89df18de2
test: add test for overflow in `LineRange::from`
8 months ago
skoriop
9fcc57e496
fix: integer overflow in `LineRange::parse_range`
8 months ago
Linda_pp
9f795dd947
Associate `*.sarif` files with `json` syntax ( #2695 )
...
* Associate `*.sarif` files with `json` syntax
* Update changelog for #2695
8 months ago
Nicolas AMBRY
5a240f36b9
Case insensitive `--map-syntax` ( #2650 )
...
Co-authored-by: Nicolas AMBRY <nicolas.ambry@atos.net>
9 months ago
J-Kappes
e2bf85e749
Make -pp override --paging and vice versa when passed as a later argument. ( #2660 )
9 months ago
Anomalocaridid
433176ab54
require LESSOPEN to have exactly one %s
9 months ago
Anomalocaridid
b56021ffa9
make LESSOPEN support opt-in
9 months ago
Anomalocaridid
ac2953c070
pass --no-lessopen to less by default
9 months ago
Anomalocaridid
e32ad0b048
Add `$LESSOPEN` and `$LESSCLOSE` support ( #2444 )
9 months ago
David Peter
3abc0c0fc4
Merge pull request #2548 from utkarshgupta137/master
...
Replace `dirs` crate with `etcetera` crate
9 months ago
David Peter
b06f13f0c5
Merge pull request #2618 from Piturnah/feat/write-to-buffer
...
feat: Optionally write to a buffer instead of stdout
9 months ago
Utkarsh Gupta
a721cc31f3
Replace `dirs` crate with `etcetera` crate
9 months ago
David Peter
1e52785d35
Merge pull request #2626 from rhysd/encoding_rs
...
Replace unmaintained `encoding` dependency with `encoding_rs`
9 months ago
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>
9 months ago
Peter Hebden
72e1a40bab
Remove leftover unwrap
9 months ago
Peter Hebden
b2c28cdddb
Clippy lints
9 months ago
Peter Hebden
906e774372
Handle todos
9 months ago
Peter Hebden
d929becefc
Fix signatures
9 months ago
Peter Hebden
103a2f0d9b
Add `OutputHandle` enum to use instead of `&mut dyn io::Write`
9 months ago
rhysd
d33b2e158e
Replace unmaintained `encoding` with `encoding_rs`
9 months ago
einfachIrgendwer0815
26111950b3
Add environment variable `BAT_PAGING`
9 months ago
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 ).
9 months ago
WinterCore
d580445aef
fix: Add syntax mapping `jsonl` => `json`
9 months ago
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>
9 months ago
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
9 months ago
John Higgins
b1fbcc8a6e
fix for issue #2633
10 months ago
einfachIrgendwer0815
c46c53320b
Add `Containerfile` syntax mapping
11 months ago
cyqsimon
f8c700027e
Add `os-release` syntax mapping
1 year ago
Nigecat
149dec6953
Fix paging not happening when stdout is interactive but stdin is not
1 year ago
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`.
1 year ago
Collin Styles
7929179a74
Make `PrettyPrinter::header` an alias for `header_filename`
...
Fixes #2378
1 year ago
David Peter
1a142a82b4
Merge pull request #2513 from nickelc/deps/dirs
...
Replace `dirs-next` with the original `dirs` crate
1 year ago
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.
1 year ago
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.
1 year ago
David Peter
231ad86f04
Merge pull request #2502 from Enselic/clippy-1.68
...
Fix clippy warnings with Rust 1.68
1 year ago
einfachIrgendwer0815
8f99a78cf1
Print non-printable characters using caret notation ( #2443 )
...
When the new flag is set, non-printable characters are printed using caret notation.
1 year ago
Martin Nordholts
40a423905a
Fix clippy warnings with Rust 1.68
1 year ago
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
1 year ago
BlackHoleFox
1004018941
Directly read preferences instead of using the defaults CLI
1 year ago
rhysd
4cc2a489d0
Remove unnecessary heap allocations in `PrettyPrinter::print` for style components
1 year ago
rhysd
5e3abcad07
Fix code fence in doc comment
1 year ago
Miles Liu
e39178b101
Fix `bat cache --clear` not clearing the `--target` dir if specified
2 years ago
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
2 years ago
Aaron Kollasch
4bcea01e9d
Deduplicate lines in matches function
2 years ago
Aaron Kollasch
76aad7c74f
Improve correctness and add more tests
2 years ago
Aaron Kollasch
36ccc6a31e
Allow env vars to override config but not args
2 years ago
David Peter
a65b0828ee
Merge remote-tracking branch 'origin/master' into HEAD
2 years ago
David Peter
ccde13c9e8
Hide 'cache' subcommand, re-enable bold/underline styling, add note about cache subcommand
2 years ago
John Higgins
ff71303349
Update src/bin/bat/clap_app.rs for PR 2309
...
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago