sharkdp
fc1ca0875a
Move error handling to a callback
2020-03-21 22:21:23 +01:00
sharkdp
a7338e2ea2
Run cargo fmt
2020-03-21 22:21:23 +01:00
sharkdp
9b8ddb24d1
move Config struct to separate file
2020-03-21 22:21:23 +01:00
sharkdp
4855a47105
Rename enum field
2020-03-21 19:19:15 +01:00
Ethan P
1225e65299
Fix #798
2020-02-28 07:56:24 +01:00
Fahmi Akbar Wildana
0273848f54
Run cargo fmt
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana
e542621125
Move back printer.rs and others into lib
...
others:
bin/bat/{controller,decorations,output,printer}.rs
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana
cfd33168af
Fix all compile errors in lib.rs 🚚
...
* Move {controller,output,printer,decorations}.rs into src/bin/
* Add `mod errors` from main.rs
2019-10-20 21:43:51 +02:00
Ethan P
7f2e61d579
Add new style component to separate multiple '--line-range's
2019-08-31 13:46:48 +02:00
Wild Kat
28266ee441
use explicit dyn with Write to appease compiler
2019-08-02 18:50:55 +02:00
Daniele Esposti
82f14121bd
Applied linter fixes
2019-03-09 07:43:41 +01:00
Daniele Esposti
a21ae614e6
Migrated to Rust 2018
2019-03-09 07:43:41 +01:00
Reid Wagner
76b7418e35
Only print contents if file wasn't empty, or EOF wasn't first thing received from stdin.
2019-02-11 20:33:16 +01:00
Reid Wagner
10c5f79640
Revert "Check result of read_until, and return Error if 0, which indicates EOF was found before delimeter."
...
This reverts commit 61e888de7f
.
2019-02-11 20:33:16 +01:00
Reid Wagner
61e888de7f
Check result of read_until, and return Error if 0, which indicates EOF was found before delimeter.
2019-02-07 07:32:28 +01:00
sharkdp
397def1320
Omit launching of pager if NO file exists
...
closes #387
2018-12-14 22:53:31 +01:00
sharkdp
e81f9b23e6
Fix --show-all
for UTF-16 encoding
2018-11-01 22:00:47 +01:00
sharkdp
ecd862d9ff
Feature: Highlight non-printable characters
...
Adds a new `-A`/`--show-all` option (in analogy to GNU Linux `cat`s option) that
highlights non-printable characters like space, tab or newline.
This works in two steps:
- **Preprocessing**: replace space by `•`, replace tab by `├──┤`, replace
newline by ``, etc.
- **Highlighting**: Use a newly written Sublime syntax to highlight
these special symbols.
Note: This feature is not technically a drop-in replacement for GNU `cat`s
`--show-all` but it has the same purpose.
2018-11-01 22:00:47 +01:00
Park Juhyung
154186a58d
Add --pager option
2018-10-21 22:42:11 +02:00
sharkdp
496e0bc046
Allow for multiple line ranges
...
See #23
2018-10-20 10:44:13 +02:00
sharkdp
2109a7830b
Add error handling for parsing errors
2018-10-17 21:08:32 +02:00
sharkdp
278bde5cee
Continue with output after "is directory"-error
2018-10-11 21:54:19 +02:00
sharkdp
0502a3bd4a
Add first-line detection for all input types
...
closes #205
2018-10-07 15:34:37 +02:00
sharkdp
6d1cc8c2c8
Move read_line functionality to inputfile module
2018-10-07 15:34:37 +02:00
sharkdp
d5b0502419
Move get_reader into inputfile module
2018-10-07 15:34:37 +02:00
sharkdp
860f3e9006
Move InputFile to separate module
2018-10-07 15:34:37 +02:00
sharkdp
da09f3877b
Remove unnecessary scope
2018-10-07 10:09:10 +02:00
sharkdp
e098eb43a2
Do not show file header for directories
...
This also adds a better error message.
closes #292
2018-09-12 21:53:41 +02:00
sharkdp
c7afcdebf8
Move theme_preview file to constant
2018-08-28 22:16:42 +02:00
sharkdp
8cacd9b432
Include theme_preview file in binary
2018-08-28 20:24:13 +02:00
sharkdp
627181bcb6
Always call the syntax highlighter
2018-08-23 23:35:57 +02:00
sharkdp
226d9a573a
Add simple loop-through mode
...
Use a loop-through mode that simply copies input to output if a
non-interactive terminal is detected.
see #150
2018-08-23 23:13:24 +02:00
sharkdp
246cf79dbd
Split into Controller and Printer
2018-08-23 22:37:27 +02:00