Commit graph

17 commits

Author SHA1 Message Date
Danilo Bargen
1c05333de6 Allow setting platform to all
The goal is supporting the special `all` platform that results in pages
for all platforms being listed when calling `--list`. It's part of the
tldr client specification.

However, `All` should not be a variant of the `PlatformType` enum,
because `Current` isn't a `PlatformType` either. Thus, we accept the
string `all` but convert it into the current platform when parsing.

For consistency, the same is done when no platform is specified, by
introducing yet another possible value `current` which is used by
default. This way, we get rid of the `Option`.

To simplify handling of os / platform arguments, a conflict between
`--platform` and `--os` was introduced.
2021-12-06 00:35:14 +01:00
Danilo Bargen
72d753c52b
Add "macos" alias for "osx" (#215)
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.
2021-12-05 16:38:35 +01:00
Danilo Bargen
0fbc95cb71
Rename -o / --os to -p / --platform (#217)
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.
2021-12-05 13:28:58 +01:00
Marcin Puc
3beed4ad48
Simplify clap derive definition (#221)
- Use `possible_values`
- Change `render` field type to `PathBuf`
- Add comment about explicit field names
2021-10-24 23:17:43 +02:00
Danilo Bargen
618ecaf71f Add @niklasmohrin to crate authors 2021-10-17 22:23:35 +02:00
Danilo Bargen
371f1d2ace Help: Add a link to the online docs 2021-10-17 22:22:45 +02:00
Danilo Bargen
8833b6b401 Rename -m / --markdown to -r / --raw
That flag name is clearer: We output raw page data without processing.
2021-10-17 21:12:08 +02:00
Danilo Bargen
5ad7dcfa34 Argument parsing: Switch from docopt to clap 2021-10-17 21:12:08 +02:00
Tsvetomir Bonev
3f49100307
Docs: Add funtoo package to list (#208) 2021-10-03 16:10:30 +02:00
Danilo Bargen
49f2f8a3dd Mention italic styling in docs 2021-09-06 17:02:53 +02:00
Rithvik Vibhu
187214e39e
Remove AUR links for tealdeer and tealdeer-bin (#196)
The package is now in the community repos.
2021-07-19 13:57:16 +02:00
Cameron Tod
25f736564d
Docs: Fix packet/package typo (#185) 2021-05-13 00:25:41 +02:00
Danilo Bargen
978debe6ae Implement new --show-dirs command
The command prints out the different directories (config, cache, etc)
used by tealdeer.
2021-01-30 21:32:39 +01:00
Danilo Bargen
931a5fc13c Docs: Document location of cache directory 2020-11-15 00:00:15 +01:00
Danilo Bargen
c33c146a17 Docs: Add README 2020-11-14 23:55:49 +01:00
Danilo Bargen
dff8da40a5 Docs: Add screenshot to intro page 2020-11-01 01:52:01 +01:00
Danilo Bargen
ddeb81b249 Add mdbook documentation 2020-11-01 01:39:47 +01:00