-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
PrettyPrint wrapper, custom 'Read' input, bugfixes, major refactoring #936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@dandavison Would an API like this work for |
This looks great! However, regarding delta, the only things it uses from bat are the pager spawning code ( |
|
I see. Than you for the clarification. |
This is a major update of "bat as a library". I have implemented a new
PrettyPrinterstruct which is a builder-like wrapper to configure and control the pretty-printing process. I tried to make it similar toprettyprint::PrettyPrinterby @mre, but it will not be a drop-in replacement, unfortunately.Major new functionality: the
batlibrary can now accept arbitraryReaders as input. This also includes input from a (byte) string.Here are a few examples of how the library can be used (see
examplesfolder for more):simple.rscat.rsyaml.rsadvanced.rscloses #884
closes #937
closes #729
closes #730