diff --git a/docs/formatting.md b/docs/formatting.md index 3a9ac302..53cba565 100644 --- a/docs/formatting.md +++ b/docs/formatting.md @@ -19,7 +19,6 @@ While simple names are usually enough, more complex forms like accessing values | Alternatives | `{empty\|title}` | `Hello World` | | Element Access | `{user[name]}` | `John Doe` | | Attribute Access | `{extractor.url}` | `https://example.org/` | -| Environment Variable | `{_env[FOO]}` | `BAR` | All of these methods can be combined as needed. For example `{title[24]|empty|extractor.url[15:-1]}` would result in `.org`. @@ -197,6 +196,46 @@ For example `{foo:?//RF/B/Ro/e/> 10}` -> `   Bee Bar` - `> 10` - Left-fills the string with spaces until it is 10 characters long +## Global Replacement Fields + +Replacement field names that are available in all format strings. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescriptionExampleResult
_envEnvironment variables{_env[HOME]}/home/john
_nowCurrent local date and time{_now:%Y-%m}2022-08
_litString literals{_lit[foo]}foo
{'bar'}bar
+ + ## Special Type Format Strings Starting a format string with '\f ' allows to set a different format string type than the default. Available ones are: