- Adapt to `thing.paint(style)` API; was `style.paint(thing)`
- Remove `yansi::Paint::enable_windows_ascii()` in style usage decision;
removed in yansi commit b186eb5bfb, which introduced "automatic"
support for Windows: "If support is not available, styling is disabled
and no styling sequences are emitted", fitting the `Auto` option
- Respect `--color=always` even if we know it won't work
---------
Co-authored-by: Niklas Mohrin <dev@niklasmohrin.de>
Right now we only support building with Rustls. However, there are quite
a few architectures that aren't yet supported by "ring" (the crypto
library used by Rustls), for example MIPS, PowerPC or SPARC.
To offer an alternative, I added the "native-tls" feature that can be
used instead of "native-roots". When used, the native TLS stack is used
instead of Rustls (i.e. SChannel on Windows, Secure Transport on macOS
and OpenSSL otherwise).
ansi_term is not actively maintained anymore (see
https://rustsec.org/advisories/RUSTSEC-2021-0139). Replace it with a
suitable alternative.
I looked at termcolor, owo-colors and yansi and picked yansi:
- It is very simple
- It does not do terminal color support checking (we already do that in
tealdeer)
- Its color enum type is almost identical to the one from ansi_term, so
migrating is easy
The only change from a config API point of view is that "purple" is now
renamed to "magenta", but "purple" still works.
By getting rid of the bzip2 and time features, we reduce the number of
dependencies. The official tldr pages archive uses deflate compression,
so that should be sufficient.
Instead of downloading the GitHub repository archive, download the pages
from the official URL instead.
Squashed commits:
- chore: use recommended tldr-pages archive url
- chore: extract pages dir to constant
- chore(deps): install zip crate
- feat: use zip crate to unpack archive
- chore(deps): drop flate2
It's a transitive dependency of the `tempdir` crate. It was pinned to a
specific version to achieve compatibility with Rust 1.39, but we now run
on 1.53.