Upgrade "time" (and its dependency chain rooted at "plist"), the previous
version did not build with 1.80.
Tell the new 'unexpected_cfgs' lint that 'tarpaulin_include' is okay
Mark one clippy lint as a false positive
Use new, smaller PagerCfg instead of the full Config, as for
pager output only 3 variables are relevant.
oneshot_write() can be used to write paginated output, usually
before exiting.
Sets `LESSUTFCHARDEF` (unless already present), a new env var introduced
by this less version to always print characters from the Private Use Area
of Unicode as-is, even if the terminal does not understand them.
This simplifies the call sites.
Also skip updating if the path is already absolute, and handle
'/dev/null' on Windows so it is no longer converted to '\dev\null'.
* Fix clippy warnings
* Repair --default-language, and highlight using full filename
Fixed that the "txt" fallback was used instead of --default-language
And when looking for syntax highlighting, keep the filename around
as long as possible.
Using simple custom logic (filename > 4) a Makefile can be highlighted
with make syntax, but a 'cc' or 'ini' file does not get treated like
a *.cc or *.ini file.
Currently the underlying highlighting lib syntect and the sublime syntax
definitions can not make this distinction
(<http://www.sublimetext.com/docs/syntax.html>).
* Move tabs logic into utils
* Re-use buffer returned by tabs::expand
* Add TabCfg to configure tabs
Use the String from this config for the tab replacement. This avoids
creating a new String for each processed line.
* Avoid unicode segmentation for each line just to remove a prefix
In some code paths no prefix is removed, and in almost all other
cases the prefix is just ascii.
This simplifies a lot of calls.
* Set default tab with to 8
Editors like vim, emacs, nano and most terminal emulators set
this value as the default tab display width.
The `error_chain` crate is now deprecated for a long time and `anyhow`
has proven to be a popular replacement for applications.
This also improves the current error messages for panics.
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: \
Error(Msg("Could not parse pager command."), State { next_error: Some(ParseError), \
backtrace: InternalBacktrace })', src/main.rs:136:88
```
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Could not parse pager command.
Caused by:
missing closing quote', src/main.rs:125:88
```
* Update direct dependencies
* Update transient dependencies
* Switch back to `dirs` crate
The `dirs`/`dirs-sys` repositories are unarchived and the crates are
maintained again, while `dirs-next` crates aren't.
Following fixes are included:
* derive_partial_eq_without_eq:
Eq trait was added by running `cargo clippy --fix --no-deps`.
* get_first:
Function was replaced by running `cargo clippy --fix --no-deps`.
* unnecessary_to_owned:
This check was disabled for ANSIString as to_string call is required
to enforce formatting. Otherwise the underlying string was returned
directly (probably due to Deref implementation).
* type_complexity:
Closure type was simplified and Box<> usage was removed.
The test_process_calling_cmdline test only allows "cargo test" and
"cargo tarpaulin" for running the testsuite, for "cargo t" is a
built-in alias for "cargo test" and should be allowed, too.
This allow to no longer ignore some tests (marked previously as FIXME)
by storing the env at the start of the program (Or creating a custom env
for test purpose)
This centralize almost alls calls to std::env inside one wrapper
Add a test profile to increase speed for testing (5min -> 20sec on my
machine)
clean a few code style like this:
```
if Some(value) = ...
if value
```
to
```
if Some(true) = ...
```
Co-authored-by: William Escande <wescande@google.com>
The env var DELTA_CALLING_PROCESS_QUERY_ALL re-enables this
last resort method. However usually this is just an expensive
scan which doesn't find the caller anyhow.
Fix file paths and hyperlinks
With this commit the target of a hyperlink should always be an absolute path. This should be true for all file hyperlinks, e.g.
- File hyperlink
- Hunk header hyperlink
- Line number hyperlink
Fixes#890