Commit Graph

79 Commits (master)

Author SHA1 Message Date
rhysd 8e66bc8722 Make the error handler `FnMut` 5 months ago
Anomalocaridid e32ad0b048
Add `$LESSOPEN` and `$LESSCLOSE` support (#2444) 10 months ago
Peter Hebden 72e1a40bab Remove leftover unwrap 10 months ago
Peter Hebden 906e774372 Handle todos 10 months ago
Peter Hebden d929becefc Fix signatures 10 months ago
Peter Hebden 103a2f0d9b Add `OutputHandle` enum to use instead of `&mut dyn io::Write` 10 months ago
rhysd f28d9db3d0 use io::Empty instead of crafted dummy stdin struct 3 years ago
rhysd deb80af449 remove unused lifetime parameter 3 years ago
rhysd dc0acbbb90 inline a closure which is called only once 3 years ago
rhysd 92ba42a602 do not take stdin lock when stdin is not used 3 years ago
Diva M ce4ddc0911 use saturating substraction to calculate Line ranges 3 years ago
Marcin Puc 7956485e37 Improve iterator usage 3 years ago
Martin Nordholts ed09f90e5e Fix all lints that are new with Rust 1.54
They are all of the following type:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
3 years ago
Niklas Mohrin 694b31909a Change circle detection to use new more conservative method and run in main loop instead of before the loop 3 years ago
Niklas Mohrin 21ae26cb17 Add cycle detection with clircle, now v0.2 3 years ago
Lovecraftian Horror b349155f2f Remove repeated `contains` calls 4 years ago
sharkdp a6810e3353 Revert "Add io cycle detection with clircle"
This reverts commit aa2ae19dfd.
4 years ago
MarcoIeni 43b2ee5e71 fix some clippy warnings 4 years ago
Niklas Mohrin 31793cfa62 Add io cycle detection with clircle 4 years ago
gahag bbef2f41ec Add `-S` flag to less when `--wrap=never` (closes #1255)
Prevent less from wrapping lines by setting the proper flag when `--wrap=never`.
If the user set a custom value for `--pager`, no additional flag is set.
4 years ago
Evgeniy Andreev (gsomix) 3c5ce9f86c Enable non-printable chars for redirected output (#1061) 4 years ago
Ethan P 35b6067496 Print error message when invalid syntax is specified 4 years ago
Prat T 0040fef215 Add padding above headers when no grid 4 years ago
sharkdp 48a7ce3bf2 Write error messages to pager, if attached
closes #946
4 years ago
sharkdp 5fe8a8342b Add annotations again 4 years ago
sharkdp 23afc8e90c Skip non-file inputs when using --diff 4 years ago
Lzu Tao e37e9c1214 Fix some clippy lints
Some might actually improve perf
4 years ago
sharkdp 82e7786e74 Implementation of 'bat --diff'
This adds a new `--diff` option that can be used to only show lines
close to Git changes (added/removed/modified lines). The amount of
additional context can be controlled with `--diff-context=N`.

closes #23
4 years ago
sharkdp 8961f7aef8 Move PagingMode to separate module 4 years ago
sharkdp 12eee0c590 Fix warnings for --no-default-features mode 4 years ago
sharkdp 702cb198da Rename error module 4 years ago
sharkdp 26c951fec4 Fix warnings, sort imports, input from string 4 years ago
sharkdp 590960f7f5 Completely refactor 'input' module 4 years ago
sharkdp f3b90ddb38 Add InputDescription 4 years ago
sharkdp f8d0956893 Rename InputFile => Input 4 years ago
sharkdp 1dc328ad49 Separate inputs from config 4 years ago
sharkdp 057e4eced1 Large refactoring towards a better builder structure 4 years ago
sharkdp 34619a2e89 Small refactoring, handle invalid UTF-8 filenames 4 years ago
sharkdp 1b8ce60054 Pass stdin as a generic BufRead, fix stdin tests 4 years ago
Kyle Criddle 04fa84aea7 Moved user_provided_filename to be contained within OrdinaryFile struct 4 years ago
Kyle Criddle a3f8140fbe Use --file-name to detect syntax highlighting
Closes #891
4 years ago
David Tolnay 42e3825daf Updates for review of PR 899 4 years ago
Kyle Criddle 83772bd2cf Minor --file-name code hygeine 4 years ago
Kyle Criddle 38178fedf4 Merge branch 'master' into fix_654_stdin_filename 4 years ago
Kyle Criddle 59f2e2d58d Implemented --file-name for multiple files + tests 4 years ago
sharkdp 84ba323b1c Rename output component to 'style compinent', move wrap to separate module 4 years ago
sharkdp fc1ca0875a Move error handling to a callback 4 years ago
sharkdp a7338e2ea2 Run cargo fmt 4 years ago
sharkdp 9b8ddb24d1 move Config struct to separate file 4 years ago
sharkdp 4855a47105 Rename enum field 4 years ago