Commit Graph

351 Commits (master)

Author SHA1 Message Date
Martin Nordholts 0655ecf23d Prepare for v0.20.0 release
Since we have added new enum variants to the `StyleComponent` which was
not previously marked `#[non_exhaustive]`, we must bump left-most
non-zero version number (see
[specifying-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio)).
Otherwise client code that do exhaustive matches on `StyleComponent`
will stop compiling.
2 years ago
cyqsimon 14ddda0a8b
Recognize files in `$XDG_CONFIG_HOME/git/` and `$HOME/.config/git/` better (#2067)
* git global config - lookup $XDG_CONFIG_HOME faithfully

* Use `bool::then`

* Cover both `$XDG_CONFIG_HOME` & `$HOME/.config`

* Remove unused import

* Global git config tests

* Added trailing newline

* Fix git config test

* Wrote to changelog

* Revert change of `Result::ok` to `Result::unwrap`

* Apply suggestions from code review

Co-authored-by: Martin Nordholts <enselic@gmail.com>

* Guard against empty `$HOME`

Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Josh Pencheon ad6cae433a
fix Bash completion on macOS (#2074)
* fix Bash completion on macOS

The Homebrew-provided bash-completion is version 1.x,
which doesn't provide _init_completion. We add a standard
shim instead.

* Add entry to CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>

* review: avoid calling _split_longopt repeatedly

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2 years ago
ltdk e4f6fb2afe Add JQ syntax highlighting 2 years ago
Mahdi Dibaiee d21f1e8f17
Underline highlighted lines in ANSI theme (#1985)
* Underline highlighted lines in ANSI theme

* add test for ansi highlight underline, fix underscore in plain
2 years ago
dependabot[bot] 9ad147278f
Bump assets/syntaxes/02_Extra/GLSL from `4cd4acf` to `59a5f8a` (#2050)
* Bump assets/syntaxes/02_Extra/GLSL from `4cd4acf` to `59a5f8a`

Bumps [assets/syntaxes/02_Extra/GLSL](https://github.com/euler0/sublime-glsl) from `4cd4acf` to `59a5f8a`.
- [Release notes](https://github.com/euler0/sublime-glsl/releases)
- [Commits](4cd4acfffc...59a5f8a312)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/GLSL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Dan Davison 4e36a56014
Expose syntect theme and syntax sets (#2030)
Fixes #2026
Ref https://github.com/dandavison/delta/issues/895
2 years ago
Mahdi Dibaiee 312c8ef01f
Add new `--style` called `header-filesize` and display it by default (#1988)
Also rename `header` to `header-filename`.

Related to #1701
2 years ago
dependabot[bot] f3f8194932
Bump assets/syntaxes/02_Extra/GraphQL from `59304d6` to `9b6f6d0` (#2000)
* Bump assets/syntaxes/02_Extra/GraphQL from `59304d6` to `9b6f6d0`

Bumps [assets/syntaxes/02_Extra/GraphQL](https://github.com/dncrews/GraphQL-SublimeText3) from `59304d6` to `9b6f6d0`.
- [Release notes](https://github.com/dncrews/GraphQL-SublimeText3/releases)
- [Commits](59304d6c7b...9b6f6d0a86)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/GraphQL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
dependabot[bot] 2ae4ffcdfa
Bump assets/syntaxes/02_Extra/VimL from `c91fe3a` to `ee85822` (#2002)
* Bump assets/syntaxes/02_Extra/VimL from `c91fe3a` to `ee85822`

Bumps [assets/syntaxes/02_Extra/VimL](https://github.com/SalGnt/Sublime-VimL) from `c91fe3a` to `ee85822`.
- [Release notes](https://github.com/SalGnt/Sublime-VimL/releases)
- [Commits](c91fe3ab02...ee85822cbe)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/VimL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
dependabot[bot] f5a7f86a64
Bump assets/syntaxes/02_Extra/TOML from `6bfcc3c` to `ed38438` (#2049)
* Bump assets/syntaxes/02_Extra/TOML from `6bfcc3c` to `ed38438`

Bumps [assets/syntaxes/02_Extra/TOML](https://github.com/jasonwilliams/sublime_toml_highlighting) from `6bfcc3c` to `ed38438`.
- [Release notes](https://github.com/jasonwilliams/sublime_toml_highlighting/releases)
- [Commits](6bfcc3c236...ed38438900)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/TOML
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update CHANGELOG.md for PR #2049

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Martin Nordholts 76aa138230 CHANGELOG.md: Prepare a new "unreleased" section 2 years ago
Martin Nordholts d3956be616 CHANGELOG.md: Rearrange and update for v0.19.0 2 years ago
Martin Nordholts 68528983d7 Mark `MappingTarget` as `#[non_exhaustive]` for increased semver flexibility
This will allow us to add new enum variants in the future without breaking
semver compatibility. See
https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute

Since we already added an enum variant since v0.18.3, now is a good time to mark
it as `#[non_exhaustive]`.
2 years ago
Mahdi Dibaiee 6dc621ec18 Set minimum supported rust version to 1.51 2 years ago
dependabot[bot] 3358b075fb
Bump assets/syntaxes/02_Extra/TypeScript from `a607ddf` to `ba45efd` (#1834)
* Bump assets/syntaxes/02_Extra/TypeScript from `a607ddf` to `ba45efd`

Bumps [assets/syntaxes/02_Extra/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `a607ddf` to `ba45efd`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](a607ddfec9...ba45efd058)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/TypeScript
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Do machine-conversion from .tmLanguage to .sublime-syntax

The new .sublime-syntax files are pure "Tools" -> "Developer" -> "New Syntax
from ..." conversions from a licenced version of Sublime Text, Version 3.1.1,
Build 3176 with the .tmLanguage as the source files. No manual changes has been
made.

* Add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] a02713dc15
Bump assets/syntaxes/02_Extra/PowerShell from `4a0a076` to `742f0b5` (#1935)
* Bump assets/syntaxes/02_Extra/PowerShell from `4a0a076` to `742f0b5`

Bumps [assets/syntaxes/02_Extra/PowerShell](https://github.com/PowerShell/EditorSyntax) from `4a0a076` to `742f0b5`.
- [Release notes](https://github.com/PowerShell/EditorSyntax/releases)
- [Commits](4a0a076661...742f0b5d4b)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/PowerShell
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Do machine-conversion from .tmLanguage to .sublime-syntax

The new .sublime-syntax file is a pure "Tools" -> "Developer" -> "New Syntax
from ..." conversion from a licenced version of Sublime Text, Version 3.1.1,
Build 3176 with the .tmLanguage as the source file. No manual changes has been
made.

* Update regression test and add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
dependabot[bot] ee1f5a9e89
Bump assets/syntaxes/02_Extra/SCSS_Sass from `63819a1` to `d3d9404` (#1766)
* Bump assets/syntaxes/02_Extra/SCSS_Sass from `63819a1` to `d3d9404`

Bumps [assets/syntaxes/02_Extra/SCSS_Sass](https://github.com/braver/SublimeSass) from `63819a1` to `d3d9404`.
- [Release notes](https://github.com/braver/SublimeSass/releases)
- [Commits](63819a1ab6...d3d9404640)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/SCSS_Sass
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update regression test and add CHANGELOG.md entry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
Martin Nordholts a3ea798246
Credit syntax definition and theme authors with new `--acknowledgements` option (#1971)
The text that is printed is generated when building assets, by analyzing LICENSE
and NOTICE files that comes with syntaxes and themes.

We take this opportunity to also add a NOTICE file as defined by Apache License 2.0.
3 years ago
Ethan P 63ad53817d
Improved ANSI passthrough (#1596)
Improve handling of ANSI passthrough. Fix ANSI passthrough for --wrap=never. Add test for ANSI passthrough.
3 years ago
Martin Nordholts 7fceb4878f
Load themes lazily for improved startup time (#1969)
This is for #951. Syntax lazy-loading will come later and have a much bigger
impact, but lazy-loading of themes does not have negligible impact.
3 years ago
Ersikan 29711c178a
Better syntax highlighting for Dart (#1959)
Remove unmaintained Dart syntax submodule. Add elMuso/Dartlight as submodule. Update Dart syntax highlighting. Add changes to changelog.
3 years ago
David Peter 3338699257 Remove the 'requirements.txt' syntax
This is needed because the syntax is only available under GPL v3.0,
which is not compatible with `bat`s license.
3 years ago
Bojan Durdevic 9a2979df5f Changelog update 3 years ago
Martin Nordholts d7671fa8e3 Remove the code related to minimal_syntaxes.bin
To get fast startup, syntect will instead start to lazy-load syntaxes. See
https://github.com/trishume/syntect/pull/393 and discussions in linked PRs.
3 years ago
Shun Sakai 619cf6e6d6 Add MediaWiki syntax 3 years ago
Bojan Đurđević d6ed5e6746
Support for ignored-suffix CLI arguments (#1892) 3 years ago
cbolgiano 7fe4fdf33d
Introduce MapExtensionToUnknown MappingTarget (#1889)
Co-authored-by: Martin Nordholts <enselic@gmail.com>
3 years ago
Martin Nordholts 4081ace4b9 Include git hash in `bat -V` and `bat --version` output if present
I had to use a `lazy_static` due to that the clap API that only accepts a
reference to a version string. And, in our code, only a 'static reference to a
version string.

Code could probably be refactored to accept a "normal" reference, but that would
be a major undertaking.
3 years ago
Martin Nordholts 6eb2cc9cac Add LiveScript syntax
The file `LiveScript.sublime-syntax` is a pure export from a licenced version
of Sublime Text, Version 3.1.1, Build 3176 with
assets/syntaxes/02_Extra/LiveScript/Syntaxes/LiveScript.tmLanguage as the source
file.
3 years ago
Diva M 3a3cd0acba changelog 3 years ago
Georgy Komarov d04a83de7b Add Racket syntax 3 years ago
Martin Nordholts 418fce5683 Bump MSRV to 1.46
See #1874 and #1872.
3 years ago
Martin Nordholts 405a80f3ee HighlightingAssets: Turn get_syntax_for_path() into public API 3 years ago
Martin Nordholts 9124271eaf
Load independent and minimal syntax sets when using --language (#1787)
This significantly speeds up the startup time of bat, since only a single
linked SyntaxDefinition is loaded for each file. The size increase of the
binary is just ~400 kB.

In order for startup time to be improved, the --language arg must be used, and
it must match one of the following names:

"Plain Text", "ActionScript", "AppleScript", "Batch File", "NAnt Build File",
"C#", "C", "CSS", "D", "Diff", "Erlang", "Go", "Haskell", "JSON", "Java
Properties", "BibTeX", "LaTeX Log", "TeX", "Lisp", "Lua", "MATLAB", "Pascal",
"R", "Regular Expression", "Rust", "SQL", "Scala", "Tcl", "XML", "YAML", "Apache
Conf", "ARM Assembly", "Assembly (x86_64)", "CMakeCache", "Comma Separated
Values", "Cabal", "CoffeeScript", "CpuInfo", "Dart Analysis Output", "Dart",
"Dockerfile", "DotENV", "F#", "Friendly Interactive Shell (fish)", "Fortran
(Fixed Form)", "Fortran (Modern)", "Fortran Namelist", "fstab", "GLSL",
"GraphQL", "Groff/troff", "group", "hosts", "INI", "Jinja2", "jsonnet",
"Kotlin", "Less", "LLVM", "Lean", "MemInfo", "Nim", "Ninja", "Nix", "passwd",
"PowerShell", "Protocol Buffer (TEXT)", "Puppet", "Rego", "resolv", "Robot
Framework", "SML", "Strace", "Stylus", "Solidity", "Vyper", "Swift",
"SystemVerilog", "TOML", "Terraform", "TypeScript", "TypeScriptReact",
"Verilog", "VimL", "Zig", "gnuplot", "log", "requirements.txt", "Highlight
non-printables", "Private Key", "varlink"

Later commits will improve startup time for more code paths.

* fix some typos and misspellings

* CHANGELOG.md: Add Performance section (preliminary)

* Add a CHANGELOG.md entry for this PR
3 years ago
Rashil Gandhi 43afae34be
Add PowerShell completion file (#1826) 3 years ago
Martin Nordholts 19c3e82abf
Replace deprecated 'error-chain' with 'thiserror' (#1820)
We can't use #[from] on Error::Msg(String) because String does not implement Error.
(Which it shouldn't; see e.g. https://internals.rust-lang.org/t/impl-error-for-string/8881.)
So we implement From manually for Error::Msg, since our current code was written
in that way for error-chain.
3 years ago
Martin Nordholts f1c0fd7343
Don't take a HighlightingAssets detour to build assets (#1802)
Move code to build assets to its own file. That results in better modularity and flexibility.

It also allows us to simplify HighlightingAssets a lot, since it will now always
be initialized with a SerializedSyntaxSet.
3 years ago
Bojan Durdevic c86a179412 PR comments addressed for line range +delta syntax 3 years ago
Bojan Durdevic 0748783404 Support for line range plus syntax 3 years ago
Martin Nordholts b3247d9364 Merge the v0.18.3 hotfix release into master
The v0.18.3 release was a hotfix release to make bat build again with Rust 1.54.
This merge commit brings in all changes from the hotfix release into the master
branch.

In practice, this only brings in one new commit, namely b146958ec. The other
three commits in the release were cherry-picks from master.
3 years ago
Martin Nordholts b146958ecb Bump version to v0.18.3 3 years ago
Mario Finelli 5125e9c941 Add support for ruby-slim syntax 3 years ago
Bill Risher 6c62ed5608 revamped integration test, made CHANGELOG changes 3 years ago
Bill Risher bf78288e9e feat(config): added recognition of $BAT_CONFIG_DIR 3 years ago
Ville Skyttä 79f08588c6 Mention syslog highlight improvements in change log 3 years ago
Martin Nordholts d8b813c0bf
When returning a SyntaxReference, also return the SyntaxSet that contains it (#1776)
To improve startup performance, we will later load smaller `SyntaxSet`s instead
of one giant one. However, the current API assumes only one `SyntaxSet` is ever used,
and that that implicitly is the `SyntaxSet` from which returned `SyntaxReference`s
comes.

This change changes the API to reflect that `SyntaxSet` and `SyntaxReference`
are tightly coupled, and enables the use of several `SyntaxSet`.
3 years ago
Keith Hall 05c11964fc add patch for Python syntax to help improve performance 3 years ago
Martin Nordholts 1ef0206f24 CHANGELOG.md: Highlight for `vimrc` and `gvimrc` files 3 years ago
Layle | Luca 51c7eb7ac1
Included LLVM syntax highlighting submodule and added regression tests 3 years ago
Keith Hall 6d5ff671e7 Add HTTP Request/Response syntax as a git submodule 3 years ago
Martin Nordholts 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.
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 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 6e536ab06d Update CHANGELOG 3 years ago
David Peter 945bba777b Upgrade CHANGELOG with security vulnerability notice 3 years ago
David Peter a4b674902f Bump version to v0.18.2 3 years ago
David Peter 3c59b98dc8 Add CHANGELOG entry for #1687 3 years ago
Ville Skyttä 0e9d612173 Add change log entry for bash completion 3 years ago
Ville Skyttä 90e48e9b61 Spelling fixes 3 years ago
Martin Nordholts 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`
3 years ago
Mohamed Abdelnour 14900f6ed8 Update `CHANGELOG.md` for #1668 3 years ago
Martin Nordholts bcca56e3b1 CHANGELOG.md: Apply DotENV syntax also for .env.default and .env.defaults 3 years ago
Mohamed Abdelnour cf7d9ef962 Update `CHANGELOG.md` for #1661 3 years ago
Mohamed Abdelnour 8435cad602 Merge master 3 years ago
Mohamed Abdelnour 6fc9641f6a Update CHANGELOG for #1655 3 years ago
Mohamed Abdelnour ef5154d5b3 Update CHANGELOG for #1654 3 years ago
David Peter 73dab51ad1 Bump version, update dependencies 3 years ago
David Peter 9328007d05 Updated CHANGELOG 3 years ago
David Peter 5db3c93057
Merge branch 'master' into syslog 3 years ago
Keith Hall 3559079de0 Improvements to CSV highlighting 3 years ago
Ethan P aa09a9dc04
Update changelog for #1589 3 years ago
Keith Hall 1537733e6b replace Syslog dependency with a custom syntax 3 years ago
Sean McLoughlin d89fa3ebc2 Add SystemVerilog support 3 years ago
David Peter 52f84b063c Update dependencies, MSRV: 1.45 3 years ago
Aleksey Kladov 35347c2310 Improve readability
Using `Path`s for paths expresses intent more clearly.
3 years ago
David Peter b147443c32 Add new unreleased section 3 years ago
David Peter 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
3 years ago
David Peter 2aa3ed9da8 Update CHANGELOG 3 years ago
David Peter 7eabb5e05a Highlight *.pac files as JavaScript
closes #1515
3 years ago
Martin Nordholts 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).
3 years ago
Keith Hall 2e8c0a39db Add support for env vars and manpage refs with dots to Manpage syntax 3 years ago
Martin Nordholts c48e779e8a CHANGELOG.md: Add entry for #1413 3 years ago
sharkdp 060b9981b5 Remove deprecated PrettyPrinter methods 3 years ago
Martin Nordholts 02e6ff4183 Merge remote-tracking branch 'origin/master' into fix-1063 3 years ago
sharkdp 7ada963ec2 Add ChangeLog entry 3 years ago
sharkdp 7c227169a4 Add note about breaking change 3 years ago
mark chaitin de6cb75f4b Addressed PR feedback. Upped min version and used matches! macro 3 years ago
mark chaitin 83c9cb7907 fix bug where long lines were truncated in plain mode without wrap=never not being set 3 years ago
Martin Nordholts da10166625 Merge remote-tracking branch 'origin/master' into fix-1063 3 years ago
sharkdp 2b44940f81 Update CHANGELOG 3 years ago
Martin Nordholts 478233f795 Merge remote-tracking branch 'origin/master' into fix-1063 3 years ago
sharkdp 7fbb3a5352 Add Zig entry in ChangeLog, see #1470 3 years ago
sharkdp aa5b941ed5 Add ChangeLog entry 3 years ago
Martin Nordholts bfa5342331 Also replace 'more' from PAGER with 'less'
But first do some quite significant refactorings to keep the code clean
and easy to understand.
3 years ago
Martin Nordholts 22bdc7c20f When PAGER=most, don't print a warning to stderr, silently use less instead 3 years ago
sharkdp 6d0e7650c3 Add .resource extension for Robot Framework 3 years ago
Martin Nordholts 552545fe5f Merge remote-tracking branch 'origin/master' into fix-1063 3 years ago
Martin Nordholts dcfe883f4b Simplify and polish pager.rs and related code 3 years ago
Martin Nordholts f45fa5e187 CHANGELOG.md: Add bugfix entry for #614 3 years ago
Martin Nordholts cc0f8ca813 Merge remote-tracking branch 'origin/master' into fix-1063 3 years ago
sharkdp 73d9a95862 Update CHANGELOG 3 years ago
David Peter 07bd7503c5 Update CHANGELOG.md 3 years ago
John Meow 1b5af89ddd Move changelog entry to unreleased 3 years ago
John Meow 3d07dec8fd Use Briles/gruvbox .tmTheme files instead of peaceant's port 3 years ago
Mitchell Kember 3099f51ba7 Add ansi theme to replace ansi-light and ansi-dark
This combines ansi-light and ansi-dark into a single theme that works
with both light and dark backgrounds. Instead of specifying white/black,
the ansi theme uses the terminal's default foreground/background color
by setting alpha=01, i.e. #00000001. This is in addition to the alpha=00
encoding where red contains an ANSI color palette number.

Now, `--theme ansi-light` and `--theme ansi-dark` will print a
deprecation notice and use ansi instead (unless the user has a custom
theme named ansi-light or ansi-dark, which would take precedence).
3 years ago
sharkdp 19e7763f35 Add changelog entry 3 years ago
David Peter 947133d295 Update CHANGELOG.md 3 years ago
Stefan Kunkel cffacad306 make bat -L use pager 3 years ago
David Peter 73c16574e6
Merge branch 'master' into fix-1438-newline-can-be-added-even-if-style-plain 3 years ago
Martin Nordholts 60e00d49a9
Fix #1443 macOS: regression_test.sh: mktemp: illegal option (#1444)
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.

So to make the script work on macOS, stop using the --suffix option.

The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.

[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
3 years ago
Martin Nordholts 68d525cd8b Don't add artificial newline to last line if --style=plain
This fixes #1438.

Note however, that using a pager such as less will add a newline itself.
So to actually not print a newline for such files, you need to either
disable paging:

  bat --style=plain --paging=never no-newline-at-end-of-file.txt

or use a "pager" that does not add a newline:

  bat --style=plain --pager=cat no-newline-at-end-of-file.txt

Note that we also update syntax tests file since a bunch of them had
missing newlines on the last lines.
4 years ago
rsteube 84b0702399 only print themes hint in interactive mode 4 years ago
purvesh-linux11 f3489ffa29 add packaging in unreleased section 4 years ago
purvesh-linux11 8e6ba2a3e1 update changelog file 4 years ago
purvesh-linux11 bc01999f0d update chagelog.md 4 years ago
purvesh-linux11 b0fcb3065f add snap installtion command 4 years ago
Martin Nordholts 986d0e9777 Ignore PAGER=most by default with a warning to stderr
closes #1063
4 years ago
sharkdp 6d981498d8 Bump version to 0.17.1 4 years ago
sharkdp 8884104e82 Bump version to v0.17.0 4 years ago
sharkdp 35da065445 Add zsh completion fix to CHANGELOG 4 years ago
Ethan P 61f947a580
Merge pull request #1276 from tommilligan/style-rule
style: add component 'rule' for horizontal file delimiter
4 years ago
sharkdp c4bbf28862 Highlight ebuild/eclass files with shell syntax
Upstream patch: https://github.com/sublimehq/Packages/pull/2541

closes #1292
4 years ago
Adrian Rivera 456216ab37 Update CHANGELOG.md 4 years ago
Adrian Rivera c747ac181d Updates CHANGELOG entry 4 years ago
Kyle Hubert 072fb380d8
Add Svelte as a syntax 4 years ago
sharkdp 95954b7c57 Update CHANGELOG 4 years ago
Armand Philippot a707f81726 Add Coldark in New Themes 4 years ago
Keith Hall 5d9adc14e7 Include details about Manpage syntax improvements in the changelog 4 years ago
Tom Milligan d7da4f5f2b
update changelog 4 years ago
gahag 83ecc3d3ac Update changelog 4 years ago
henil b8535689d3 update CHANGELOG.md 4 years ago
sharkdp a74d35582e Update CHANGELOG for 0.16 4 years ago
sharkdp 8d531b6436 Update CHANGELOG 4 years ago
Ethan P fd52c01e78 Add custom languages/themes sections to manpage 4 years ago
sharkdp 1c24ec16e2 Update CHANGELOG 4 years ago
sharkdp f18009e5d5 Remove 'liquid' dependency 4 years ago
Kienyew 6bc477e88f Update CHANGELOG.md 4 years ago
sharkdp a4ffc9d5ed Update CHANGELOG 4 years ago
Kienyew aa182dad76 Update CHANGELOG.md 4 years ago
Alexander Karlis 6017989c4c removed printlns, updated Changelog, updated man 4 years ago
Niklas Mohrin 57a8122a6b Document PR in CHANGELOG.md 4 years ago
Mitchell Kember f9d5e81f0e Add new theme: base16-256
Bat already has a base16 theme. The new base16-256 theme is for users
of base16-shell, who configure their terminal with a 256-color variant
of a base16 theme. These variants put some of the base16 colors in
elsewhere in the 256-color table to avoid clobbering bright color slots
(ansi codes 8 to 15) with colors that don't respect the ordinary meaning
of that slot (e.g. bright green in ordinary base16 is not green).

For more details, see https://github.com/chriskempson/base16-shell
4 years ago
Dash Peters 0e38c1728e Update changelog 4 years ago
Dash Peters c264f74771 Hide alias in help, update man and completions
A long alias doesn't make sense, since `--paging=never` already exists
4 years ago
David Peter 3a62e3d188
Merge pull request #1066 from gsomix/feature/1061-show-all-redirected
Enable non-printable characters for redirected output
4 years ago
Evgeniy Andreev (gsomix) 3c5ce9f86c Enable non-printable chars for redirected output (#1061) 4 years ago
David Peter 611c6e9c74
Merge branch 'master' into add_gruvbox_theme 4 years ago
Kyle Ondy 541f014d50
add peaceant's port of gruvbox themes
This adds Martin Radimec's [1] port [2] of the gruvbox theme [3].

Brian Reilly (Briles) [4] has a pretty complete collection of gruvbox
ports [5] but they are all in `sublime-color-scheme` which is not yet
supported in bat, see #759 [6].

[1] https://github.com/peaceant
[2] https://github.com/peaceant/gruvbox
[3] https://github.com/morhetz/gruvbox
[4] https://github.com/Briles
[5] https://github.com/Briles/gruvbox
[6] https://github.com/sharkdp/bat/issues/759
4 years ago
Caio Alonso 233d375983 Adds GLSL syntax 4 years ago
sharkdp 5ebf0215c5 Update CHANGELOG 4 years ago
Ethan P 9957da6b93 Remove <font> tag from CHANGELOG.md 4 years ago
Ethan P c03a027240 Move PR changes in README to unreleased section 4 years ago
Ethan P 0319149b4d [breaking] Remove special handling for theme previews 4 years ago
Ethan P 2f823d59b0 Add PrettyPrinter::input function 4 years ago
Ethan P 981352992b Add InputDescription API 4 years ago
Ethan P 8b481dd41f Add support for NO_COLOR env var (#1021) 4 years ago
David Peter 6f88ba0e6f
Update CHANGELOG.md 4 years ago
sharkdp 9e65ecd03e Updates for v0.15.4 4 years ago
sharkdp 69e6cae0a7 Fix CHANGELOG 4 years ago
sharkdp 2e2043971b Update CHANGELOG for 0.15.3 4 years ago
sharkdp 3f6e88b4be Remove dummy line from CHANGELOG 4 years ago
sharkdp 28af18ba27 Bump version to 0.15.2 4 years ago
sharkdp 8f1babf346 Mark 'vcs_modification_markers' as deprecated 4 years ago
sharkdp fa25695b74 Make 'vcs_modification_markers' change non-breaking 4 years ago
sharkdp 943b1f82b6 Fix syntax detection for symlinks
closes #1001
4 years ago
sharkdp b7a09516e7 Update CHANGELOG 4 years ago
sharkdp d6abad908a Update README and CHANGELOG, see #650 4 years ago
sharkdp 7e84477408 Add CHANGELOG entry 4 years ago
sharkdp 3094ac90b7 Update CHANGELOG entry 4 years ago
Ethan P 35b6067496 Print error message when invalid syntax is specified 4 years ago
Ethan P f03ab11623
Update CHANGELOG.md 4 years ago
Ethan P 403ab6e443
Update CHANGELOG.md 4 years ago
sharkdp ee287447c5 Update CHANGELOG 4 years ago
Prat T 491a5a17f3 Update CHANGELOG 4 years ago
sharkdp 48441b99ef Patch Markdown syntax
closes #963
see #977
4 years ago
sharkdp ce4717144a Update CHANGELOG 4 years ago
pylipp 74ec390770 Add QML syntax
QML.sublime-syntax file generated from Support/QML.tmLanguage using
Sublime's built-in converter.
Fix sharkdp/bat#962
4 years ago
Mario Zaizar 9014ffcfd8 Adds Email (https://github.com/mariozaizar/email.sublime-syntax) 4 years ago
sharkdp 296bad8ffd Update CHANGELOG 4 years ago
sharkdp 38c096bf79 Update CHANGELOG 4 years ago
sharkdp 696d1b3ed3 Update CHANGELOG 4 years ago
sharkdp 989109145a Add '-d' for '--diff' 4 years ago
sharkdp 82e7786e74 Implementation of 'bat --diff'
This adds a new `--diff` option that can be used to only show lines
close to Git changes (added/removed/modified lines). The amount of
additional context can be controlled with `--diff-context=N`.

closes #23
4 years ago
sharkdp c8abe3f235 Update CHANGELOG 4 years ago
sharkdp 7a87315b94 Fix #937 4 years ago
sharkdp 371c929ede Update CHANGELOG 4 years ago
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
4 years ago
sharkdp 95a56a2795 Typo in CHANGELOG 4 years ago
sharkdp ce583eb9bf Revert "Pass '--mouse' to less versions >= 551"
This reverts commit cb21b74ecd.
4 years ago
sharkdp 47abb192bc Patch Rust syntax file
closes #924
4 years ago
sharkdp a927815292 Update CHANGELOG 4 years ago
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
4 years ago
sharkdp 97ea3dd4dc Update CHANGELOG 4 years ago
sharkdp 0ecc94956b Add performance patch for Makefile syntax
Thanks to @keith-hall!

closes #750
4 years ago
David Peter 61e47e0c13
Add Stylus syntax (#917)
closes #915
4 years ago
sharkdp 8b3d54ce29 Update CHANGELOG 4 years ago
sharkdp 3355aeba22 Update CHANGELOG 4 years ago
sharkdp 9a050cd87f Update CHANGELOG 4 years ago
sharkdp 522ab7a83c CHANGELOG: Add entries for upcoming release 4 years ago