mirror of https://github.com/CrimsonTome/tldr.git
client spec: Add --platform, -p, and : syntax
parent
d8df0d5e11
commit
a7d03607e5
|
@ -39,6 +39,7 @@ Argument | Meaning
|
||||||
`--version`, `-v` | Shows the current version of the client, and the version of this specification that it implements.
|
`--version`, `-v` | Shows the current version of the client, and the version of this specification that it implements.
|
||||||
`--list`, `-l` | Lists all the pages in the current platform to the standard output. If the special platform `all` is specified a list of all pages in all platforms MUST be displayed.
|
`--list`, `-l` | Lists all the pages in the current platform to the standard output. If the special platform `all` is specified a list of all pages in all platforms MUST be displayed.
|
||||||
`--pretty` | OPTIONAL. Forces the output to contain all additional decorations, even if the standard output is not a TTY.
|
`--pretty` | OPTIONAL. Forces the output to contain all additional decorations, even if the standard output is not a TTY.
|
||||||
|
`--platform`, `-p` | Specifies the platform that should be used for resolving page names. If specified, the named platform MUST be checked first instead of the host platform as described below.
|
||||||
|
|
||||||
Additional decoration MAY be printed if the standard output is a [TTY](http://www.linusakesson.net/programming/tty/index.php). If not, then the output MUST not contain any additional decorations. For example a page list MUST be formatted with 1 page name per line (to enable easy manipulation using standard CLI tools such as `grep` etc.).
|
Additional decoration MAY be printed if the standard output is a [TTY](http://www.linusakesson.net/programming/tty/index.php). If not, then the output MUST not contain any additional decorations. For example a page list MUST be formatted with 1 page name per line (to enable easy manipulation using standard CLI tools such as `grep` etc.).
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ Here are some examples invocations using the above flags:
|
||||||
```bash
|
```bash
|
||||||
tldr --update
|
tldr --update
|
||||||
tldr --version
|
tldr --version
|
||||||
tldr -a
|
tldr -l
|
||||||
```
|
```
|
||||||
|
|
||||||
### Page Names
|
### Page Names
|
||||||
|
@ -77,6 +78,14 @@ tldr git checkout
|
||||||
tldr --foo bar bash
|
tldr --foo bar bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Furthermore, clients may OPTIONALLY support a colon to specify the platform name in addition to the `--platform`, `-p` syntax described above Here are some examples:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tldr platform:page
|
||||||
|
tldr windows:type
|
||||||
|
tldr common:git checkout
|
||||||
|
```
|
||||||
|
|
||||||
#### Specifying the Platform
|
#### Specifying the Platform
|
||||||
As pages are grouped by platform, a user may want to access a platform-specific version of a page. This MUST be supported by prefixing the page name as follows:
|
As pages are grouped by platform, a user may want to access a platform-specific version of a page. This MUST be supported by prefixing the page name as follows:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue