dddffgg
783acbc83d
feat: implement quiet_empty behavior in printer
2026-01-31 16:42:28 +08: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
51bdaa5f88
Strip overstriking to better support man pages
2025-12-11 05:49:46 +01: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
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
e42883bf2c
Merge branch 'master' into read-from-tail
2025-04-15 20:27:26 +03:00
Keith Hall
44a6e29da7
Merge branch 'master' into fix/multibyte-chars
2025-04-12 11:20:48 +03:00
Haris Mohamedy
b5413cc015
Do not split into graphemes if not necessary
2025-04-03 00:49:14 -07:00
einfachIrgendwer0815
12a2a451b4
Add paging to --list-themes
2025-04-02 11:27:37 +02:00
Haris Mohamedy
18b71743c8
Fix for multibyte characters in file path
2025-03-31 17:29:18 -07:00
einfachIrgendwer0815
52252b15d6
Fix clippy::needless_lifetimes warnings
2025-02-02 15:08:15 +01:00
einfachIrgendwer0815
cbc9c3629d
Fix clippy::manual_pattern_char_comparison warnings
2025-02-02 15:08:13 +01:00
einfachIrgendwer0815
3d0f0c0565
Fix clippy::unnecessary_map_or warnings
2025-02-02 15:08:12 +01:00
einfachIrgendwer0815
3d442cdf98
Fix clippy::needless_borrow warnings
2025-02-02 15:08:11 +01:00
einfachIrgendwer0815
0c3b22e0f0
Run syntax highlighting when --binary=as-text
2024-08-18 10:06:12 +02:00
einfachIrgendwer0815
7f089ead62
Add option --binary
...
`--binary` allows to specify how to deal with binary content. Current
options are not printing anything or treating the binary data as text.
2024-08-18 10:05:37 +02:00
Alex
571970f8ff
Merge branch 'master' into read-from-tail
2024-08-10 11:34:45 +02:00
Alex Jesipow
569286055c
Support relative negative line ranges
2024-08-10 10:37:19 +02:00
Ethan P.
9e8176b1c6
Add --strip-ansi=auto option
...
When using `auto`, escape sequences will be stripped unless printing
plain text.
2024-06-17 18:27:33 -07:00
Ethan P.
70ff93d238
Add --strip-ansi option
2024-06-16 16:49:07 -07:00
Hamir Mahal
07c26adc35
style: simplify equality check
2024-03-11 18:57:51 +01:00
Hamir Mahal
c290bfff1e
refactor: remove reference that is unnecessary
2024-03-10 11:17:02 +01:00
Lena
4c85483486
Inline format! args wherever possible
2024-02-25 00:38:11 +01:00
einfachIrgendwer0815
6c2ce63101
Add squeeze functionality to SimplePrinter
2024-02-24 13:51:44 +01:00
Ethan P
0e4e10edb6
Add --squeeze-limit to specify max number of consecutive empty lines
...
Co-authored-by: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com >
2024-02-24 13:51:06 +01:00
Ethan P
c36ed32816
Add --squeeze/-s option
...
Co-authored-by: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com >
2024-02-24 13:51:00 +01:00
Ethan P.
25b5a41189
Skip syntax parsing when color output disabled
2024-02-11 22:49:49 -08:00
Ethan P.
c94cf4e14e
Split syntax highlighting from print_line into fn
...
This simplifies the `print_line` function a little bit while also
providing a way for syntax highlighting to be skipped when it's
not being used (i.e. `--color=never`).
2024-02-11 22:27:35 -08:00
Ethan P
1023399c5e
Remove hyperlink when wrapping lines
2024-02-09 22:09:39 -08:00
Ethan P
165c495e75
Replace AnsiCodeIterator in printer.rs
...
This uses the new EscapeSequenceIterator, saving us a preprocessing step
for each line.
2024-02-09 22:09:39 -08:00
Ethan P
054421268f
Strip OSC sequences before printing
...
This commit strips OSC (Operating System Command) sequences before
printing lines. Eventually when time permits, I want to add back
support for printing OSC sequences (and improve it to treat hyperlinks
like an attribute).
Until then, this should help prevent garbled output :)
2024-02-09 22:09:39 -08:00
Filip Razek
e586751208
Attempt to fix integration test
2024-01-21 19:48:26 +01:00
Filip Razek
5c1f47359e
Run cargo fmt
2024-01-21 19:48:26 +01:00
Filip Razek
45ee2dc4c7
fix: Wrap file name in header
2024-01-21 19:48:26 +01:00
rhysd
e5c81ed41e
Replace our own macros to write buffers with standard macros
2023-10-05 09:21:26 +02:00
David Peter
b06f13f0c5
Merge pull request #2618 from Piturnah/feat/write-to-buffer
...
feat: Optionally write to a buffer instead of stdout
2023-09-01 21:18:04 +02:00
Peter Hebden
b2c28cdddb
Clippy lints
2023-09-01 20:52:55 +02:00
Peter Hebden
906e774372
Handle todos
2023-09-01 20:52:55 +02:00
Peter Hebden
d929becefc
Fix signatures
2023-09-01 20:52:55 +02:00
Peter Hebden
103a2f0d9b
Add OutputHandle enum to use instead of &mut dyn io::Write
2023-09-01 20:52:55 +02:00
rhysd
d33b2e158e
Replace unmaintained encoding with encoding_rs
2023-09-01 20:41:55 +02:00
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.
2023-03-24 17:42:54 +01:00
David Peter
231ad86f04
Merge pull request #2502 from Enselic/clippy-1.68
...
Fix clippy warnings with Rust 1.68
2023-03-15 08:36:28 +01:00
einfachIrgendwer0815
8f99a78cf1
Print non-printable characters using caret notation ( #2443 )
...
When the new flag is set, non-printable characters are printed using caret notation.
2023-03-14 22:21:30 +01:00
Martin Nordholts
40a423905a
Fix clippy warnings with Rust 1.68
2023-03-14 21:19:14 +01:00