1
0
mirror of https://github.com/sharkdp/bat.git synced 2026-02-08 00:32:08 +00:00
Commit Graph

614 Commits

Author SHA1 Message Date
Keith Hall
579d371378 Ensure --help respects valid config file
While still ignoring ignoring invalid arguments in the config
2025-12-01 05:30:05 +02:00
Keith Hall
602df893de Add additional test cases for -n in loop through mode 2025-11-30 05:02:13 +02:00
Keith Hall
abc7261488 Fix -n flag to show line numbers in loop-through mode
When the -n/--number flag is passed on the command line, bat now shows
line numbers even when piping output to another process (loop-through
mode), similar to how `cat -n` behaves.

This change detects if -n or --number was passed on the CLI (before
merging with config file and environment variables) and disables
loop-through mode in that case, allowing the InteractivePrinter to
add line numbers.

The existing behavior is preserved:
- Styles from config/env are still ignored when piping (unless --decorations=always is set)
- Only the -n flag from CLI enables line numbers in piped mode
- -p and --style options from CLI do not disable loop-through mode
2025-11-30 05:02:13 +02:00
Keith Hall
7d37325c19 Fix to not show style decorations in auto mode when piping 2025-11-30 05:02:13 +02:00
Keith Hall
efa9f0e63d add integration test to prove that building the cache finds all contexts 2025-11-24 22:20:44 +02:00
Muntasir Mahmud
70ec3fc24e feat: add paging to '-h' and '--help' (#3478)
* feat: add paging to '-h' and '--help'

Fixes #1587
2025-11-23 20:10:56 +00:00
AldanTanneo
1abecd2c93 update Ada syntax gitmodule 2025-11-14 11:41:08 +01:00
Louis Maddox
52a792d46f fix: allow hyphen values to -r/--line-range
via #2944
2025-10-19 21:24:59 +01:00
Louis Maddox
7eedc0f854 feat(pipe-style): make output pipeable (any style) 2025-10-18 10:29:39 +01:00
Keith Hall
8920c738c5 chore: update highlighted test Markdown with embedded Typescript file 2025-10-14 22:02:16 +03:00
MuntasirSZN
0139c9d9ae chore: add a test typescript file 2025-10-14 15:38:26 +06:00
Keith Hall
c0389b0e5c add integration test for ANSI theme with simple JSON 2025-10-08 23:12:39 +03:00
Keith Hall
2badaf5d99 cargo fmt 2025-10-08 22:45:50 +03:00
Keith Hall
588ff32d18 Fix help/version/diagnostic commands with invalid config 2025-10-08 22:45:50 +03:00
DarkMatter-999
7b67981fb9 tests: fix highlights for Go module syntax 2025-10-03 13:26:59 +05:30
DarkMatter-999
28ab873a3f tests: add syntax tests for go.mod and go.sum 2025-10-03 13:00:09 +05:30
jyn
c8b8132228 Only leave space for git diff markers if any line is modified (#3406)
Previously, setting `--style=changes` would always print a 2-space
indent, even if the file was unmodified. This changes the style to only
print an indent if there is at least one +/- git marker in the sidebar.
2025-09-22 07:42:56 +02:00
Sorin Sbarnea
d291b3e5fa chore: Fix some typos (#3244) 2025-08-28 17:30:50 +00:00
John Cavanaugh
36d25c8642 Merge branch 'master' into master 2025-08-19 20:34:08 -07:00
Yuri Astrakhan
d9fbd18541 inline format arguments
In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
2025-08-19 05:07:54 +02:00
Keith Hall
96ce80d0e2 Apply same fix and tests for UTF16BE 2025-08-16 15:36:45 +03:00
Keith Hall
40c4c8e542 More thorough tests for UTF16LE 2025-08-16 15:35:57 +03:00
John Cavanaugh
f79adaf607 test: 🚨 update tests for truncated multiline.txt
test(tests/examples/multiline.txt): 🚨 trim sample file to 10 lines to match new behavior
test(tests/integration_tests.rs): 🚨 adjust line ranges and expected outputs for 10-line sample; add multi-range context test
2025-08-15 05:57:41 -07:00
John Cavanaugh
58bfcd9051 style: 🎨 reformat predicate assertions
style(integration_tests.rs): 🎨 doh, run cargo fmt
2025-08-13 23:31:17 -07:00
John Cavanaugh
67e3e42531 test: 🚨 extend line-range tests
test(tests/examples/multiline.txt): 🚨 add lines 5-20 to sample file for expanded line-range tests
test(tests/integration_tests.rs): 🚨 update expected outputs and add comprehensive context and error tests for line-range feature
2025-08-13 23:29:58 -07:00
Keith Hall
9d3245eebe Replace missing asset submodules 2025-08-07 22:45:22 +03:00
Keith Hall
8b12191bda Make map-syntax target case insensitive 2025-07-17 22:19:54 +03:00
Stéphane Blondon
9121746f05 test: code coverage for list-languages parameter 2025-07-14 16:40:14 +02:00
Y.D.X.
4661f22e81 Merge remote-tracking branch 'upstream/master' into lean 2025-07-11 13:03:06 +08:00
Y.D.X. (Gitpod)
bfd8776042 chore: Follow Lean upstream 2025-07-11 12:56:46 +08:00
Jerry
a0b4397ddf Merge branch 'master' into syntax-vhdl 2025-07-09 04:33:36 +05:00
Jerry
9776ebfa0f Send errors to stderr (#3336)
* fix: send errors to stderr by default (#2561)

Closes #2561

* chore: add changelog entry

* chore: change PR id

* chore: add github username

* chore: cargo fmt...

* chore: move changelog line to bugfixes
2025-07-08 20:42:22 +02:00
JerryImMouse
bdc971eca3 feat(syntax): add syntax highlighting for VHDL 2025-07-07 19:20:23 +05:00
Y.D.X.
288b7e9ca3 docs: Add Lean/LICENSE.md
> Jeremy Avigad:
> Patrick and I decided that it makes sense to release the text of MIL under CC BY 4.0 and the repository code (exercises, solutions, etc.) under Apache 2.0. We'll put the Apache license in the repo and figure out where to at the CC BY notice, but in the meantime, you can take this message as a declaration.

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/License.20of.20Mathematics.20in.20Lean.3F/near/523527618
2025-06-11 22:06:52 +08:00
Y.D.X.
0918984249 Update Lean.sublime-syntax from Lean 3 to Lean 4
Resolves #3286

1. `lean4.json` → `lean4.tmLanguage`

    1. Download `vscode-lean4/syntaxes/lean4.json` from https://github.com/leanprover/vscode-lean4/pull/623 (now merged).
    2. Install the VS Code extension [TextMate Languages (pedro-w)](https://marketplace.visualstudio.com/items?itemName=pedro-w.tmlanguage).
    3. Open `lean4.json` in VS Code, <kbd>F1</kbd>, and “Convert to tmLanguage PLIST File”.

2. `lean4.tmLanguage` → `lean4.sublime-syntax`

    Open `lean4.tmLanguage` in Sublime text, “Tools → Developer → New Syntax from lean4.tmLanguage…”.
2025-06-10 17:41:33 +08:00
SchweGELBin
4cfc50c358 theme: add Catppuccin 2025-05-31 14:56:10 +02:00
Chad Skeeters
4c9a51990c Corrects spelling mistake in syntax-test for Typst 2025-05-20 16:35:47 -05:00
Chad Skeeters
fb514ca90f Adds Typst syntax from hyrious/typst-syntax-highlight 2025-05-20 14:43:21 -05:00
Keith Hall
e42883bf2c Merge branch 'master' into read-from-tail 2025-04-15 20:27:26 +03:00
chetanjangir0
14064dd987 regenerated the highlighted file 2025-04-12 19:14:15 +05:30
chetanjangir0
3eef8590f4 genereated highlighted syntax test file 2025-04-12 18:00:43 +05:30
chetanjangir0
3e7ad18fe3 fixed merge conflicts 2025-04-12 17:22:18 +05:30
HSM95
b38ee77628 Merge branch 'master' into fix/multibyte-chars 2025-04-03 00:49:55 -07:00
Dan Hipschman
9272e09058 Make highlight tests fail when new syntaxes don't have fixtures 2025-04-01 13:08:19 -07:00
Haris Mohamedy
18b71743c8 Fix for multibyte characters in file path 2025-03-31 17:29:18 -07:00
Chetan
2e7ab99099 Add Odin submodule and syntax test file 2025-03-28 12:17:45 +00:00
Chetan
207f90f01b Add GDScript submodule and syntax test file for GDScript support, see #XXX (@chetanjangir0) 2025-03-23 13:24:30 +00:00
Keith Hall
ffc094bd91 Add debsources syntax 2025-02-25 22:17:00 +02:00
Keith Hall
d31bc4347a Map various .NET file extensions to XML syntax 2025-02-23 20:20:52 +02:00
Keith Hall
2843a2c0e8 Add mapping for ndjson file extension to JSON syntax 2025-02-15 08:46:22 +02:00