bat/src
Martin Nordholts 47bb4a9c0f Introduce bat_warning! helper macro
This macro is intended to be package-internal and is not to be
considered part of the public lib API.

Use it in three places to reduce code duplication. However, main reason
for this refactoring is to allow us to fix #1063 without duplicating the
code yet another time.

The macro can also be used for the "Binary content from {} will not be
printed to the terminal" message if that message starts to use eprintln!
instead (if ever).

To trigger/verify the changed code, the following commands can be used:

    cargo run -- --theme=ansi-light tests/examples/single-line.txt
    cargo run -- --theme=does-not-exist tests/examples/single-line.txt
    cargo run -- --style=grid,rule tests/examples/single-line.txt
2020-12-28 09:27:40 +01:00
..
bin/bat Introduce bat_warning! helper macro 2020-12-28 09:27:40 +01:00
assets.rs Introduce bat_warning! helper macro 2020-12-28 09:27:40 +01:00
assets_metadata.rs Fix some clippy lints 2020-04-24 16:11:05 +02:00
config.rs Skip non-file inputs when using --diff 2020-04-24 16:12:38 +02:00
controller.rs Remove repeated `contains` calls 2020-12-21 09:41:29 +01:00
decorations.rs Reduce public API 2020-04-22 23:55:28 +02:00
diff.rs Move git changes support behind a feature 2020-03-31 09:27:56 +02:00
error.rs Throws an error when `bat` is being user as pager. 2020-10-29 19:33:58 +01:00
input.rs Revert "Add io cycle detection with clircle" 2020-11-24 21:40:11 +01:00
less.rs Move paging support behind a feature 2020-03-31 09:27:56 +02:00
lib.rs Introduce bat_warning! helper macro 2020-12-28 09:27:40 +01:00
line_range.rs Fix some clippy lints 2020-04-24 16:11:05 +02:00
macros.rs Introduce bat_warning! helper macro 2020-12-28 09:27:40 +01:00
output.rs remove all matches 2020-11-23 14:25:01 +01:00
paging.rs Move PagingMode to separate module 2020-04-22 23:55:28 +02:00
preprocessor.rs replace_nonprintable: Keep \n around 2020-12-19 10:27:06 +01:00
pretty_printer.rs fix some clippy warnings 2020-11-23 14:25:01 +01:00
printer.rs Add ansi theme to replace ansi-light and ansi-dark 2020-12-21 17:05:10 +01:00
style.rs style: add component 'rule' for horizontal file delimiter 2020-10-12 09:04:27 +01:00
syntax_mapping.rs Simplify code 2020-10-01 21:06:37 +02:00
terminal.rs Add ansi theme to replace ansi-light and ansi-dark 2020-12-21 17:05:10 +01:00
wrapping.rs Rename wrap => wrapping 2020-04-22 23:55:28 +02:00