mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 20:35:26 +02:00
style-guide: reorganize mnemonic guide (#16955)
This commit is contained in:
parent
44189b0ae5
commit
7f4c95ea60
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue