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

style-guide: reorganize mnemonic guide (#16955)

This commit is contained in:
Managor 2025-06-24 19:19:08 +03:00 committed by GitHub
parent 44189b0ae5
commit 7f4c95ea60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -424,8 +424,8 @@ For example, `[d]ownload` in English may be translated into `[d]escargar` in Spa
### Option syntax
- For user-friendliness, prefer **GNU-style long options** (like `--help` rather than `-h`). Make sure that the options are cross-platform compatible (intended to work the same across multiple platforms) for pages in the `common` directory.
- If a command only supports short options or the short option greatly differs from the long option, attempt to document what the letter is short for with a [mnemonic](#short-option-mnemonics).
- For letting the client decide whether to show long or short options in commands, use an option placeholder i.e. `{{[-o|--output]}}`.
- If a command only supports short options or the short option greatly differs from the long option, attempt to document what the letter is short for with a [mnemonic](#short-option-mnemonics).
- Prefer grouping flag options together when the program supports it (i.e. `{{[-it|--interactive --tty]}}` instead of `{{[-i|--interactive]}} {{[-t|--tty]}}`).
- 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.