forked from mirrors/jj
config.md
: expand on equivalence of headers and dotted keys
Now that we use headers to define `[template-aliases]`, I thought we should explain how they are also equivalent to dotted keys. Alternatively, we could rewrite them all in the dotted style, but it would look awkward.
This commit is contained in:
parent
78cdf71d9a
commit
6cc7aa72e8
1 changed files with 13 additions and 5 deletions
|
@ -17,11 +17,19 @@ e.g. `user.name = "YOUR NAME"` is equivalent to:
|
||||||
name = "YOUR NAME"
|
name = "YOUR NAME"
|
||||||
```
|
```
|
||||||
|
|
||||||
Headings only need to be set once in the real config file but Jujutsu favors the
|
For a more complicated example,
|
||||||
dotted style in these instructions, if only because it's easier to write down in
|
|
||||||
an unconfusing way. If you are confident with TOML then use whichever suits you
|
```toml
|
||||||
in your config. If you mix the styles, put the dotted keys before the first
|
[template-aliases]
|
||||||
heading.
|
"format_short_id(id)" = "id.shortest(12)"
|
||||||
|
```
|
||||||
|
|
||||||
|
is equivalent to `template-aliases."format_short_id(id)" = "id.shortest(12)"`.
|
||||||
|
|
||||||
|
Jujutsu favors the dotted style in these instructions, if only because it's
|
||||||
|
easier to write down in an unconfusing way. If you are confident with TOML
|
||||||
|
then use whichever suits you in your config. If you mix dotted keys and headings,
|
||||||
|
**put the dotted keys before the first heading**.
|
||||||
|
|
||||||
The other thing to remember is that the value of a setting (the part to the
|
The other thing to remember is that the value of a setting (the part to the
|
||||||
right of the `=` sign) should be surrounded in quotes if it's a string. That's
|
right of the `=` sign) should be surrounded in quotes if it's a string. That's
|
||||||
|
|
Loading…
Reference in a new issue