Martin Nordholts
b040efff79
Support a hidden arg --no-custom-assets that skips loading assets from the cache
3 years ago
Martin Nordholts
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 .
3 years ago
Martin Nordholts
c0e09662b4
HighlightingAssets::get_extension_syntax(): Split up into smaller methods
...
To make the code easier to understand and change.
3 years ago
Martin Nordholts
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
3 years ago
David Peter
fb1ab09e3e
Add Enselic in FUNDING.yml
3 years ago
Sarvesh MD
f464b1ba39
Update battest.py
...
Add decorator test `@classmethod` and fixed spellings.
3 years ago
Frank Steffahn
2ea6348b85
Add `rs` identifier for Rust code blocks in Markdown
3 years ago
David Peter
6e536ab06d
Update CHANGELOG
3 years ago
Ville Skyttä
7537e309d8
Add groff syntax
...
The syntax is named "Man Page" upstream, but our man page syntax is
different, it's for rendered man pages. Rename to Groff and remove
`.man` from extensions.
3 years ago
David Peter
84e2a2e5d1
Add custom FUNDING.yml
3 years ago
Martin Nordholts
f6fc826dc6
HighlightingAssets: Introduce private fn new() helper
...
It already now reduces code duplication slightly, but will become even more
useful in the future when we add more complicated logic such as lazy-loading.
3 years ago
Martin Nordholts
375d55aa5d
HighlightingAssets: Encapsulate syntax_set behind a getter
...
Since we only modify `pub(crate)` items, the stable bat-as-a-library API is not
affected.
This takes us one step closer to making SyntaxSet lazy-loaded, which in turn
takes us one step closer to solving #951 .
3 years ago
Martin Nordholts
6ef2bb3283
De-duplicate some themes.bin and syntaxes.bin related code
3 years ago
bl-ue
fc0794a83d
Fix typo in README
3 years ago
David Peter
589df6792f
Add note on vulnerability reporting, closes #1473
3 years ago
David Peter
945bba777b
Upgrade CHANGELOG with security vulnerability notice
3 years ago
David Peter
64763eafbe
Update Julia syntax test
3 years ago
David Peter
3da4651569
Update Julia syntax, closes #1692
3 years ago
David Peter
311ed2feca
Update assets
3 years ago
David Peter
33c11d64f0
Run cargo fmt
3 years ago
David Peter
a4b674902f
Bump version to v0.18.2
3 years ago
David Peter
3fa09dbe2e
Use resolved path for --diagnostic as well
3 years ago
David Peter
bf2b2df9c9
Fix for Windows: do not run binaries from CWD
...
This fixes a bug on Windows where `Command::new` would also run
executables from the current working directory, possibly resulting in
accidental runs of programs called `less`.
3 years ago
dependabot[bot]
3617c98cf5
Bump assets/syntaxes/02_Extra/CMake from `7d6231c` to `ab6ef4e`
...
Bumps [assets/syntaxes/02_Extra/CMake](https://github.com/zyxar/Sublime-CMakeLists ) from `7d6231c` to `ab6ef4e`.
- [Release notes](https://github.com/zyxar/Sublime-CMakeLists/releases )
- [Commits](7d6231c934...ab6ef4ef9f
)
---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/CMake
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
774d36c989
Bump ansi_colours from 1.0.2 to 1.0.4
...
Bumps [ansi_colours](https://github.com/mina86/ansi_colours ) from 1.0.2 to 1.0.4.
- [Release notes](https://github.com/mina86/ansi_colours/releases )
- [Commits](https://github.com/mina86/ansi_colours/commits )
---
updated-dependencies:
- dependency-name: ansi_colours
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
6abd61865f
Bump globset from 0.4.6 to 0.4.8
...
Bumps [globset](https://github.com/BurntSushi/ripgrep ) from 0.4.6 to 0.4.8.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases )
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.6...globset-0.4.8 )
---
updated-dependencies:
- dependency-name: globset
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
David Peter
3c59b98dc8
Add CHANGELOG entry for #1687
3 years ago
David Peter
21338ed789
Abort ignored filename suffix stripping early on unworkable filenames
3 years ago
David Peter
dc8ab0b5ce
Simplify ignored filename suffix stripping
3 years ago
Ville Skyttä
ddb39ef2f6
Add syntax tests for ignored filename suffixes
3 years ago
Ville Skyttä
355e62efe9
Find syntax ignoring known backup/template filename suffixes
...
For example, fall back to `foo.extension` for `foo.extension~`,
`foo.extension.orig`, `foo.extension.in.in` etc.
3 years ago
David Peter
fddd11a205
CICD: sync with pastel, minor changes
3 years ago
Ville Skyttä
8b37e62cf3
Add some more options to bash completion
...
https://github.com/sharkdp/bat/pull/1702#issuecomment-872452683
3 years ago
dependabot[bot]
4296d47dcb
Bump assert_cmd from 1.0.4 to 1.0.5
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.4...v1.0.5 )
---
updated-dependencies:
- dependency-name: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Frederick Zhang
42f1ef019a
Fix missing config/cache arguments in Zsh completion
3 years ago
Frederick Zhang
fe8e526292
Document --generate-config-file in manual
3 years ago
Ville Skyttä
0e9d612173
Add change log entry for bash completion
3 years ago
Ville Skyttä
06c601bc7c
Depend on scop/bash-completion
...
For = option/arg separator support, improved mid-word completion
behavior, code cleanliness.
3 years ago
Ville Skyttä
229fbc1a18
Add missing comment about --theme arg escaping
3 years ago
Ville Skyttä
e05f5010da
Add bash completion
...
Closes https://github.com/sharkdp/bat/issues/1010
3 years ago
Martin Nordholts
073b9968c0
pretty_printer.rs: Don't use a URL as an example Input title
...
Otherwise Rust 1.53.0 gets confused during `cargo doc` because it thinks
we want an actual URL:
warning: this URL is not a hyperlink
--> src/pretty_printer.rs:331:40
|
331 | /// The title for the input (e.g. "http://example.com/example.txt ")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.com/example.txt >`
|
= note: `#[warn(rustdoc::bare_urls)]` on by default
= note: bare URLs are not automatically turned into clickable links
It was perhaps also a bit confusing to give an URL as an example in the
first place, because according to our own API example
`examples/inputs.rs` it is meant to be more a free-text thing.
3 years ago
Rémi Ait-Younes
d3aa17ae77
Update README.md
3 years ago
Rémi Ait-Younes
4187eed12b
Update README.md
3 years ago
Mohamed Abdelnour
12ecb325c9
Modify Linguist overrides
3 years ago
Ville Skyttä
90e48e9b61
Spelling fixes
3 years ago
Kid
35f31270f3
Highlight mtab files with fstab highlighting
3 years ago
Martin Nordholts
2a71852070
README.md: List compatibility as another advantage to 3-bit themes
...
See discussion in #1681 .
3 years ago
Martin Nordholts
c8dd32802d
README.md: Mention that PAGER is ignored if set to more or most
...
Fixes #1666
3 years ago
dependabot[bot]
71f04dc0e8
Bump nix from 0.20.0 to 0.21.0
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.20.0 to 0.21.0.
- [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.20.0...v0.21.0 )
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
49f8bbfee4
Bump assert_cmd from 1.0.3 to 1.0.4
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.3...v1.0.4 )
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago