mirror of https://github.com/CrimsonTome/tldr.git
style-guide: add Range syntax (#9646)
* style-guide: standardize range syntax * Simplify syntax for arbitraty integer placeholders * Describe syntax for arbitraty floatspull/3/head
parent
1b05651161
commit
2190f4031f
|
@ -109,6 +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).
|
- 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`).
|
- In other cases use short options (like `-h`).
|
||||||
|
|
||||||
|
## Range syntax
|
||||||
|
|
||||||
|
All borders of integer and float ranges are included. If you wanna exclude
|
||||||
|
one border then use incremented or decremented values to do it:
|
||||||
|
`{{1..5}}` == `[1-6)`.
|
||||||
|
|
||||||
|
- Use `{{from..to}}` syntax for closed ranges.
|
||||||
|
- Use `{{-infinity..to}}` or `{{from..infinity}}` syntax for integer partially closed ranges.
|
||||||
|
- Use `{{integer}}` syntax for values where any integer is valid.
|
||||||
|
- Use `{{float}}` syntax for values where any float is valid.
|
||||||
|
|
||||||
## Placeholder syntax
|
## Placeholder syntax
|
||||||
|
|
||||||
User-provided values should use the `{{placeholder}}` syntax
|
User-provided values should use the `{{placeholder}}` syntax
|
||||||
|
|
Loading…
Reference in New Issue