forked from mirrors/jj
config.md docs: document jj config edit
and jj config path
This changes the intro section to recommend using `jj config edit` to edit the config instead of looking for the files manually.
This commit is contained in:
parent
e9c482c017
commit
b3c47953e8
1 changed files with 33 additions and 7 deletions
|
@ -5,15 +5,29 @@ These are the config settings available to jj/Jujutsu.
|
||||||
|
|
||||||
## Config files and TOML
|
## Config files and TOML
|
||||||
|
|
||||||
The config settings are loaded from the following locations. Less common ways to
|
`jj` loads several types of config settings:
|
||||||
specify `jj` config settings are discussed in a later section.
|
|
||||||
|
|
||||||
* [The user config file]
|
- The built-in settings. These cannot be edited. They can be viewed in the
|
||||||
* `.jj/repo/config.toml` (per-repository)
|
`cli/src/config/` directory in `jj`'s source repo.
|
||||||
|
|
||||||
See the [TOML site] and the [syntax guide] for a description of the syntax.
|
- The user settings. These can be edited with `jj config edit --user`. User
|
||||||
|
settings are located in [the user config file], which can be found with `jj
|
||||||
|
config path --user`.
|
||||||
|
|
||||||
[The user config file]: #user-config-file
|
- The repo settings. These can be edited with `jj config edit --repo` and are
|
||||||
|
located in `.jj/repo/config.toml`.
|
||||||
|
|
||||||
|
- Settings [specified in the command-line](#specifying-config-on-the-command-line).
|
||||||
|
|
||||||
|
These are listed in the order they are loaded; the settings from earlier items
|
||||||
|
in
|
||||||
|
the list are overridden by the settings from later items if they disagree. Every
|
||||||
|
type of config except for the built-in settings is optional.
|
||||||
|
|
||||||
|
See the [TOML site] and the [syntax guide] for a detailed description of the
|
||||||
|
syntax. We cover some of the basics below.
|
||||||
|
|
||||||
|
[the user config file]: #user-config-file
|
||||||
[TOML site]: https://toml.io/en/
|
[TOML site]: https://toml.io/en/
|
||||||
[syntax guide]: https://toml.io/en/v1.0.0
|
[syntax guide]: https://toml.io/en/v1.0.0
|
||||||
|
|
||||||
|
@ -561,7 +575,17 @@ executable on your system](https://facebook.github.io/watchman/docs/install).
|
||||||
|
|
||||||
Debugging commands are available under `jj debug watchman`.
|
Debugging commands are available under `jj debug watchman`.
|
||||||
|
|
||||||
# User config file
|
## Ways to specify `jj` config: details
|
||||||
|
|
||||||
|
### User config file
|
||||||
|
|
||||||
|
An easy way to find the user config file is:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
jj config path --user
|
||||||
|
```
|
||||||
|
|
||||||
|
The rest of this section covers the details of where this file can be located.
|
||||||
|
|
||||||
On all platforms, the user's global `jj` configuration file is located at either
|
On all platforms, the user's global `jj` configuration file is located at either
|
||||||
`~/.jjconfig.toml` (where `~` represents `$HOME` on Unix-likes, or
|
`~/.jjconfig.toml` (where `~` represents `$HOME` on Unix-likes, or
|
||||||
|
@ -584,6 +608,8 @@ default locations. For example,
|
||||||
env JJ_CONFIG=/dev/null jj log # Ignores any settings specified in the config file.
|
env JJ_CONFIG=/dev/null jj log # Ignores any settings specified in the config file.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Specifying config on the command-line
|
||||||
|
|
||||||
You can use one or more `--config-toml` options on the command line to specify
|
You can use one or more `--config-toml` options on the command line to specify
|
||||||
additional configuration settings. This overrides settings defined in config
|
additional configuration settings. This overrides settings defined in config
|
||||||
files or environment variables. For example,
|
files or environment variables. For example,
|
||||||
|
|
Loading…
Reference in a new issue