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

Replace token with placeholder (#9529)

This commit is contained in:
Emily Grace Seville 2022-12-13 14:23:03 +10:00 committed by GitHub
parent 68b69b0ade
commit ff14fd5fd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,17 +109,17 @@ Example:
- Use GNU-style **long options** (like `--help` rather than `-h`) when they are cross-platform compatible (intended to work the same across multiple platforms).
- In other cases use short options (like `-h`).
## Token syntax
## Placeholder syntax
User-provided values should use the `{{token}}` syntax
User-provided values should use the `{{placeholder}}` syntax
in order to allow `tldr` clients to highlight them.
Keep the following guidelines in mind when choosing tokens:
Keep the following guidelines in mind when choosing placeholders:
### Naming
- Use short but descriptive tokens,
- Use short but descriptive placeholders,
such as `{{source_file}}` or `{{wallet.txt}}`.
- Use [`snake_case`](https://wikipedia.org/wiki/snake_case) for multi-word tokens.
- Use [`snake_case`](https://wikipedia.org/wiki/snake_case) for multi-word placeholders.
- Use an actual value rather than a generic placeholder where appropriate.
For example, use `iostat {{2}}` rather than `iostat {{interval_in_secs}}`.
@ -153,7 +153,7 @@ Keep the following guidelines in mind when choosing tokens:
- If a command can take a variable number of arguments, use an ellipsis: `{{arg1 arg2 ...}}`.
If one of the multiple options is possible, write it as `{{either|or}}`.
In general, tokens should make it as intuitive as possible
In general, placeholders should make it as intuitive as possible
to figure out how to use the command and fill it in with values.
Technical wording on description lines should use the `backtick` syntax.