Ethan P
9bb0271e7d
Update CHANGELOG.md (PR #1441 )
2024-02-24 13:51:40 +01:00
Ethan P and einfachIrgendwer0815
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
0c7e5299bf
Add squeeze_empty_lines to PrettyPrinter
2024-02-24 13:51:05 +01:00
Ethan P and einfachIrgendwer0815
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.
84d80eebd0
Test for correct categorization of SGR sequences
...
This adds a regression test for the fix in the previous commit.
2024-02-11 19:40:29 -08:00
Ethan P.
915dd9fbf8
Fix incorrect categorization of SGR sequences
...
Specifically, prevent other attributes from leaking into the
bold/dim/italic/underline attributes, and ensure that bright backgrounds
are put into the background attribute instead of the foreground
attribute.
2024-02-11 19:35:54 -08:00
Ethan P.
9d77c1373c
Fix off-by-one error in line number continuation
2024-02-11 16:49:06 -08:00
Ethan P
5a2a20af42
Merge pull request #2544 from eth-p/fix-2541
...
Treat OSC ANSI Sequences as Invisible Text & Add OSC 8 Support
2024-02-09 22:20:30 -08:00
Ethan P
61029c8bd2
Update changelog for fix of ANSI OSC sequences
2024-02-09 22:09:40 -08:00
Ethan P
1023399c5e
Remove hyperlink when wrapping lines
2024-02-09 22:09:39 -08:00
Ethan P
6549e26f5d
Re-emit hyperlinks 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
6b9b085be3
Add EscapeSequenceIterator
...
This is an iterator for escape sequences, using
EscapeSequenceOffsetsIterator for the underlying parsing of individual
escape sequences.
2024-02-09 22:09:39 -08:00
Ethan P
2d46d54ae3
Add tests for re-emitting SGR sequences on wrap
2024-02-09 22:09:39 -08:00
Ethan P
3d04699710
Add regression test for #2541
...
More specifically, the test ensures that OSC sequences don't end up
wrapping the 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
Ethan P
414403b062
Add EscapeSequenceOffsetsIterator
...
This can be used to extract a subset of ANSI escape sequences from a
string of text. I have big plans for this eventually, but for now, it'll
be used to strip OSC before printing.
2024-02-09 22:09:35 -08:00
Ethan P
c29bf2ff28
Update git2 dependency
2024-02-09 22:05:30 -08:00
Ethan P.
adfaef19da
Clarify when/how default args are added to less
2024-02-07 21:22:08 -08:00
Ethan P
63ad53817d
Improved ANSI passthrough ( #1596 )
...
Improve handling of ANSI passthrough. Fix ANSI passthrough for --wrap=never. Add test for ANSI passthrough.
2021-12-08 16:06:42 +01:00
Ethan P
aa09a9dc04
Update changelog for #1589
2021-04-06 15:33:34 -07:00
Ethan P
f874c8e4db
Use less binary specified in bat config for --diagnostic
2021-02-16 09:11:27 +01:00
Ethan P
025c5c061b
Make less version check accept a path to the less binary
2021-02-16 09:11:27 +01:00
Ethan P
3ed0081f1f
Improve benchmark script to support cargo/config target-dir
2020-12-29 15:07:22 -08:00
Ethan P
894d3f1722
Replace SCSS example with unlicensed one
2020-10-06 06:51:51 +02:00
Ethan P
83d96e2bbb
Rename SASS tests to SCSS, since they're using SCSS syntax
2020-10-06 06:51:51 +02:00
Ethan P
e26ec31463
Add option to specify exact binary in run-benchmarks.sh
2020-10-05 15:47:28 -07:00
Ethan P
e3bc41dbe6
Add option to specify bat target in run-benchmarks.sh
2020-10-05 15:47:22 -07:00
Ethan P
96151c44aa
Add a batgrep as Bash script syntax tests
2020-10-04 11:00:57 +02:00
Ethan P
02dcb01120
Add a simple Bash script for syntax tests
2020-10-04 11:00:57 +02:00
Ethan P
51d25e5859
Fix syntax highlighting test update.sh to work on Mac OS
2020-10-04 11:00:57 +02:00
Ethan P
fd52c01e78
Add custom languages/themes sections to manpage
2020-10-01 20:57:18 +02:00
Ethan P
9957da6b93
Remove <font> tag from CHANGELOG.md
2020-05-29 22:13:10 +02:00
Ethan P
342cae2dc6
Change use of 'BatInput' to 'input::Input'
2020-05-29 22:13:10 +02:00
Ethan P
d2b26a5f1f
Remove unnecessary '-> ()'s
2020-05-29 22:13:10 +02:00
Ethan P
9d08c0102e
Replace Input::stdin_as_file with bat-application functions
2020-05-29 22:13:10 +02:00
Ethan P
a3357547ea
Remove unused with_name for theme preview file
2020-05-29 22:13:10 +02:00
Ethan P
7a9decad70
Remove Input.as_file and add Input::stdin_as_file
2020-05-29 22:13:10 +02:00
Ethan P
c4d0d068e4
Update input API example
2020-05-29 22:13:10 +02:00
Ethan P
c03a027240
Move PR changes in README to unreleased section
2020-05-29 22:13:10 +02:00
Ethan P
a8d7141c4c
Improve documentation for Input API
2020-05-29 22:13:10 +02:00
Ethan P
3eb704e016
Update examples
2020-05-29 22:13:10 +02:00
Ethan P
0f06d3b90d
Reexport bat::pretty_printer::Input as bat::Input
2020-05-29 22:13:10 +02:00
Ethan P
589c94aa93
Fix regression with --list-themes and --language
2020-05-29 22:13:10 +02:00
Ethan P
798b742617
Refactor InputDescription API into Input API
2020-05-29 22:13:10 +02:00
Ethan P
11a72ab765
Fix a typo
2020-05-29 22:13:10 +02:00
Ethan P
0319149b4d
[breaking] Remove special handling for theme previews
2020-05-29 22:13:10 +02:00
Ethan P
2f823d59b0
Add PrettyPrinter::input function
2020-05-29 22:13:10 +02:00
Ethan P
981352992b
Add InputDescription API
2020-05-29 22:13:10 +02:00
Ethan P
384ea38bd9
Add documentation to InputDescription
2020-05-29 22:13:10 +02:00
Ethan P
8b481dd41f
Add support for NO_COLOR env var ( #1021 )
2020-05-28 21:49:10 +02:00
Ethan P
35b6067496
Print error message when invalid syntax is specified
2020-05-16 13:44:26 +02:00
Ethan P
5aa20c090b
Refactor HighlightingAssets::get_syntax to return Result type
2020-05-16 13:44:26 +02:00
Ethan P
f03ab11623
Update CHANGELOG.md
2020-05-15 14:03:04 -07:00
Ethan P
887e61a99d
Allow application to be built without git support
...
Caveats:
The help descriptions aren't changed with you remove the "git" feature.
2020-05-15 13:58:48 -07:00
Ethan P
0aca8cab0b
Remove vcs_modification_markers from PrettyPrinter 'git' feature disabled
2020-05-15 13:58:48 -07:00
Ethan P
403ab6e443
Update CHANGELOG.md
2020-05-15 13:23:24 -07:00
Ethan P
b8687bc969
Merge branch 'master' of github.com:sharkdp/bat into string-input
2020-05-15 13:22:24 -07:00
Ethan P
9166c9dd35
Remove unnecessary clone in integration tests
2020-05-15 12:29:01 -07:00
Ethan P
cc52f79e42
Add helper fn for checking if opened input is theme preview file
2020-05-15 12:20:20 -07:00
Ethan P
59140b458c
Consolidate syntax detection behavior for all InputKind types
2020-05-13 02:53:30 -07:00
Ethan P
82981c9663
Add regression test for detected syntax differing for stdin and files
2020-05-13 02:53:19 -07:00
Ethan P
157b8dd848
Rename test for checking if inputkinds are consistent
2020-05-13 00:47:18 -07:00
Ethan P
1fb669ae1a
Test that OrdinaryFile consistent with CustomReader
2020-05-13 00:38:56 -07:00
Ethan P
7d07aa395a
Change assets.rs tests to use InputKind::CustomReader
...
This should avoid errors in filesystems that don't
support UTF-8 or invalid UTF-8.
2020-05-13 00:38:41 -07:00
Ethan P
1a6e8d297f
Update README to mention batcat for Debian/Ubuntu
2020-05-12 11:08:21 +02:00
Ethan P
f39487fca9
Make syntax detection more consistent for Reader and File inputs
2020-05-11 19:44:09 -07:00
Ethan P
dcfdbf82dd
Do not warn if both 'bat' and 'batcat' are available in info.sh
2020-05-02 10:39:58 +02:00
Ethan P
0cb884d501
Prevent batcat warning from being in output of info.sh
2020-05-02 10:39:58 +02:00
Ethan P
7bc4020a92
Check for 'batcat' in info.sh
2020-05-02 10:39:58 +02:00
Ethan P
116d76a00f
Reformat info.sh
2020-04-09 09:20:03 +02:00
Ethan P
dd336e6fb2
Fix wrapper detection failing on non-English LANG in info.sh
2020-04-09 09:20:03 +02:00
Ethan P
c33af3581a
Fix missing shell '-i' option when checking for wrapper in info.sh
2020-04-09 09:20:03 +02:00
Ethan P
2f4ecf8fc5
Add zsh wrapper detection to info.sh
2020-04-09 09:20:03 +02:00
Ethan P
e037afeaca
Add custom theme/syntax detection to info.sh
2020-04-09 09:02:23 +02:00
Ethan P
b63f31e15d
Fix broken link in issue template.
2020-03-03 13:09:31 -08:00
Ethan P
993b76654d
Change bug_report template to accomodate info.sh output
2020-02-28 08:03:13 +01:00
Ethan P
2b2743b120
Change output format of info.sh to markdown
2020-02-28 08:03:13 +01:00
Ethan P
f01263bcff
Fix typo causing missing command warning in info.sh
2020-02-28 08:03:13 +01:00
Ethan P
8648b86a73
Add detection of a wrapper function to info.sh
2020-02-28 08:03:13 +01:00
Ethan P
39d9343a7d
Change a word in bug_report.md
2020-02-28 08:03:13 +01:00
Ethan P
5faf7ca158
Change ISSUE_TEMPLATE files based on feedback in #837
2020-02-28 08:03:13 +01:00
Ethan P
ebe475247c
Change consent banner (and fix tput) in info.sh
2020-02-28 08:03:13 +01:00
Ethan P
63f6343cf1
Add issue templates
2020-02-28 08:03:13 +01:00
Ethan P
ad42b275a9
Add script to use for diagnosing issues
2020-02-28 08:03:13 +01:00
Ethan P
2dac1c8785
Add @sharkdp's regression test for #798
2020-02-28 07:56:24 +01:00
Ethan P
1225e65299
Fix #798
2020-02-28 07:56:24 +01:00
Ethan P
ab2a6ad1d5
Add more colors to fstab syntax
2019-10-29 09:20:14 +01:00
Ethan P
962abcef80
Update create.sh to quickly check for and update missing submodules
2019-10-10 23:49:39 +02:00
Ethan P
95f2e5bbb7
Ensure submodules are updated before creating asset cache
2019-10-10 23:49:39 +02:00
Ethan P
f09b75dafa
Revert changing generated file names based on parameters
...
It should be handled by a packaging script, not a build script.
2019-09-27 12:34:08 -07:00
Ethan P
54ec2e7bd0
Fix CI before_deploy to use parameterized names
2019-09-27 12:29:22 -07:00
Ethan P
e57b2e9528
Add generated files to gitignore
2019-09-27 12:14:43 -07:00
Ethan P
ea2179b352
Update fish completions to use parameterized names
2019-09-27 12:13:55 -07:00
Ethan P
c8478cedc5
Update manual page to use parameterized names
2019-09-27 12:06:54 -07:00
Ethan P
30ee2a464f
Add eth-p/bat-extras integrations to README
2019-09-21 08:42:56 +02:00
Ethan P
7a5d1f27e7
Fix missing and inconsistent code fences in REAMDE
2019-09-21 08:42:56 +02:00
Ethan P
7f2e61d579
Add new style component to separate multiple '--line-range's
2019-08-31 13:46:48 +02:00