Hakil
ad608014d9
fix issue #3526 ( #3529 )
2025-12-23 19:08:38 +02:00
Alex Kirk
4549ab3f22
Move the strip_overstrike check
2025-12-11 06:06:07 +01:00
Alex Kirk
629a8968fc
Remove unnecessary code change
2025-12-11 05:54:30 +01:00
Alex Kirk
de414ed631
Limit overstrike stripping to man pages and help
2025-12-11 05:49:46 +01:00
Alex Kirk
f97f9ebf03
Remove double backspace scan
2025-12-11 05:49:46 +01:00
Alex Kirk
64a4b204a2
Only strip overstrike when a syntax highlighting theme is used
2025-12-11 05:49:46 +01:00
Alex Kirk
5fb8a25c30
Performance optimization
2025-12-11 05:49:46 +01:00
Alex Kirk
51bdaa5f88
Strip overstriking to better support man pages
2025-12-11 05:49:46 +01:00
Keith Hall
b7dd88eafd
Support custom assets (themes) when displaying help output
2025-12-10 22:30:01 +02:00
Keith Hall
1796324531
Fix --help --pager=builtin
...
Previously it still used less
2025-12-04 21:53:45 +02:00
Keith Hall
0e469634a3
return None for get_pager_executable when builtin pager is used ( #3498 )
2025-12-01 20:02:55 +00:00
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
Cedric Staniewski
a6e0057c12
Add syntax mapping for podman's artifact quadlet files
2025-11-30 14:18:12 +02:00
Keith Hall
3755f788ca
Improve -n detection to handle combined flags correctly
...
Updated the logic to correctly handle combined short flags like -pn and -np.
The -n flag is only honored when it's either:
1. A standalone flag (-n or --number)
2. The last flag in a combined form that includes -p (e.g., -pn), or
3. In a combined form without -p (e.g., -An)
This ensures that -np (where -p overrides -n) correctly produces plain output,
while -pn (where -n overrides -p) produces line numbers.
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
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
Keith Hall
cfe49779fa
Merge branch 'master' into fix/list-themes-pager-hang
2025-11-15 15:41:07 +02:00
cyqsimon
f5a934c213
Update quadlet syntax mapping to include *.{build,pod} files
2025-11-13 13:44:24 +08:00
Abhinav Diwakar
24813db49f
Merge branch 'master' into fix/list-themes-pager-hang
2025-11-06 23:26:06 +05:30
Benjamin A. Beasley
ce856dbba7
Update etcetera to 0.11; no longer depend on home; MSRV 1.87
...
Release 0.11 of `etcetera` requires MSRV 1.87, in which
`std::env::home_dir` is no longer deprecated,
https://github.com/rust-lang/rust/pull/137327 .
Update to that MSRV and to `etcetera`, and drop the dependency on the
`home` crate just as `etcetera` 0.11 did.
2025-11-03 19:06:33 +01:00
abhinavcool42
8b09724420
change imports
2025-11-02 11:55:30 +05:30
abhinavcool42
2af7be1b65
fix prefix
2025-11-02 11:51:00 +05:30
abhinavcool42
9456f7d8cd
list-themes buffer added
2025-11-02 11:31:07 +05:30
abhinavcool42
1852dea96a
Fix --list-themes pager init so less stays interactive
2025-10-30 18:42:35 +05:30
abhinavcool42
6a99915afe
fix --list-themes hang
2025-10-28 16:10:32 +05:30
Louis Maddox
52a792d46f
fix: allow hyphen values to -r/--line-range
...
via #2944
2025-10-19 21:24:59 +01:00
Louis Maddox
200924772f
docs: amend man page (style modifies cat-like piping)
2025-10-18 10:29:39 +01:00
Louis Maddox
7eedc0f854
feat(pipe-style): make output pipeable (any style)
2025-10-18 10:29:39 +01:00
suranmiao
f1a0d8b3f7
chore: fix some minor issues in the comments ( #3439 )
...
Signed-off-by: suranmiao <solsui@outlook.com >
2025-10-18 00:13:18 +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
Keith Hall
839bfded39
Map /var/log/dmesg to Syslog syntax
2025-09-27 22:48:13 +03:00
Ritoban Dutta
e879f532a7
Mapping .kshrc to bash for syntax highlighting #3361 ( #3364 )
...
* Add syntax highlighting support for .kshrc files and update mapping in KornShell syntax #3361
2025-09-23 16:56:52 +00:00
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
Academician
c29f1875d3
Add --builtin=pager to readme, completions, and man pages
2025-09-09 16:26:49 -04:00
Daniel Waechter
a470cebf32
Add a "builtin" pager using the Minus crate
2025-09-09 16:15:54 -04:00
Eric Menne
d397bea6dc
Fix typo and clarify description
2025-08-22 17:49:53 +03:00
Eric Menne
d9dd9729b8
Add flag to less to enable quitting on Ctrl-C
2025-08-22 17:49:53 +03:00
John Cavanaugh
36d25c8642
Merge branch 'master' into master
2025-08-19 20:34:08 -07:00
Yuri Astrakhan
503c50b1ec
chore: address all cargo clippy lints
...
* also do a bit of a doc cleanup for the `load_from_folder` fn
2025-08-19 05:22:47 +02: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
bdaf25793d
cargo fmt
2025-08-16 15:36:45 +03: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
Keith Hall
6675153460
Fix the read_line method for utf16le input
...
to determine the end of the line, instead of reading until \n (0x0A) and then reading until 0x00 and calling it done, read until we find 0x00 preceded by 0x0A.
2025-08-16 15:35:57 +03:00
John Cavanaugh
3fd3f1def8
Merge branch 'master' into master
2025-08-13 23:27:26 -07:00
Ferenc Géczi
20caaf26c8
Add syntax mapping for flatpakrepo
...
Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com >
2025-07-31 00:00:00 +00:00
Ferenc Géczi
3574118e17
Add syntax mapping for flatpakref
...
Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com >
2025-07-31 00:00:00 +00:00
Tau Gärtli
feb0bc1ae6
Update terminal-colorsaurus to 1.0
2025-07-22 07:15:52 +02:00