- Config: Add `cache_dir` to `[directories]` section
- Logic to handle legacy env var, config override and default cache dir
selection is now in the `Config::try_from(RawConfig)` impl
- Deprecate old `TEALDEER_CACHE_DIR` env variable
- Update docs
Co-authored-by: Hans Gaiser <hansg91@gmail.com>
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.
The Apple computer operating system was renamed from "OS X" to "macOS"
in 2016. We should accept "macos" instead of "osx" in all our CLI APIs,
and the docs should also mention this alias instead of "osx".
For backwards compatibility and for compatibility with the tldr client
specification, we should still accept "osx" though.
This makes it compliant with the client spec.
The `-p` flag was previously used for the pager, using the pager now
requires using the long flag (`--pager`). Alternatively the pager can be
configured through the config file.
This commit also renames OsType to PlatformType.