mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
style-guide: rework option syntax instructions (#15911)
This commit is contained in:
parent
2d313c1dd0
commit
c64c22c878
1 changed files with 3 additions and 3 deletions
|
@ -418,15 +418,15 @@ For example, `[d]ownload` in English may be translated into `[d]escargar` in Spa
|
|||
|
||||
> [!NOTE]\
|
||||
> In cases where the character isn't present in the translated word, you can highlight the option before/next to the equivalent word or you can add the English work beside the translation inside a bracket.
|
||||
> For example, `E[x]tract` in English maybe translated into `[x] ekstrak` or `ekstrak [x]` or `ekstrak (E[x]tract)` in Indonesian.
|
||||
> For example, `E[x]tract` in English may be translated into `ekstrak [x]` or `ekstrak (E[x]tract)` in Indonesian.
|
||||
|
||||
## Example commands
|
||||
|
||||
### Option syntax
|
||||
|
||||
- For commonly/frequently used commands (e.g. `grep`, `tar`, etc.), we prefer using short options along with [mnemonics](#short-option-mnemonics) or both inside a placeholder.
|
||||
- For user-friendliness, prefer **GNU-style long options** (like `--help` rather than `-h`) when they 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, 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]}}`.
|
||||
- For user-friendliness, use **GNU-style long options** (like `--help` rather than `-h`) when they are cross-platform compatible (intended to work the same across multiple platforms) for pages in the `common` 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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue