1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-25 20:35:25 +02:00

style-guide: be explicit on how to handle options and arguments that don't have a space in between (#16914)

This commit is contained in:
Managor 2025-06-21 18:47:18 +03:00 committed by GitHub
parent c675540c89
commit 4f792a645a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -430,6 +430,7 @@ For example, `[d]ownload` in English may be translated into `[d]escargar` in Spa
- Prefer not grouping options that take in arguments (i.e. `{{[-it|--interactive --tty]}} {{[-w|--workdir]}} {{path/to/directory}}` instead of `{{[-itw|--interactive --tty --workdir]}} {{path/to/directory}}`)
- Prefer using a space instead of the equals sign (`=`) to separate options from their arguments (i.e. use `--opt arg` instead of `--opt=arg`), unless the program does not support it.
- Likewise prefer separating shortform options from their arguments with a space (i.e. use `-o arg` instead of `-oarg`), unless the program does not support it.
- If a command only supports `-oarg` and `--opt=arg` the option placeholder should be written like this `{{[-o|--opt=]}}arg`. Keep in mind how the command would look if a client were to display only short or only long options.
### Placeholder syntax