Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIENT-SPECIFICATION: add longform/shortform specifications #15253

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CLIENT-SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ Option | Required? | Meaning
`-u`, `--update` | Conditional | Updates the offline cache of pages. MUST be implemented if caching is supported.
`-l`, `--list` | No | Lists all the pages in the current platform to the standard output.
`-L`, `--language` | No | Specifies the preferred language for the page returned. Overrides other language detection mechanisms. See the [language section](#language) for more information.
`-S`, `--shortform`| No | If set, will filter {{-*\|--*}} patterns in examples to only show their shortform option.
`-V`, `--longform` | No | If set, will filter {{-*\|--*}} patterns in examples to only show their longform option.

Clients MUST implement both the short and long versions of an option.

If shortform and and longform options are implemented, the options MUST behave in an Exclusive Or manner. If both are set, both will show and if neither is set, both will show.

Some pages like `rsync` use multiple options in a single shortform/longform placeholder. These MUST be accounted for. Example below:

`rsync {{-zvhP|--compress --verbose --human-readable --partial --progress}} {{path/to/source}} {{path/to/destination}}`

Additional decoration MAY be printed if the standard output is a [TTY](https://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 one page name per line (to enable easy manipulation using standard CLI tools such as `grep` etc.).

Clients MAY support additional custom arguments and syntax not documented here.
Expand Down
Loading