From b95faef950ee178a82728416db7e732ce83c76c2 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Tue, 13 Jan 2026 17:39:19 +0200 Subject: [PATCH] jj-config*: add page (#20713) Signed-off-by: Emmanuel Ferdman --- pages/common/jj-config-edit.md | 17 +++++++++++++++++ pages/common/jj-config-get.md | 22 ++++++++++++++++++++++ pages/common/jj-config-list.md | 33 +++++++++++++++++++++++++++++++++ pages/common/jj-config-path.md | 17 +++++++++++++++++ pages/common/jj-config-set.md | 26 ++++++++++++++++++++++++++ pages/common/jj-config-unset.md | 17 +++++++++++++++++ pages/common/jj-config.md | 29 +++++++++++++++++++++++++++++ 7 files changed, 161 insertions(+) create mode 100644 pages/common/jj-config-edit.md create mode 100644 pages/common/jj-config-get.md create mode 100644 pages/common/jj-config-list.md create mode 100644 pages/common/jj-config-path.md create mode 100644 pages/common/jj-config-set.md create mode 100644 pages/common/jj-config-unset.md create mode 100644 pages/common/jj-config.md diff --git a/pages/common/jj-config-edit.md b/pages/common/jj-config-edit.md new file mode 100644 index 0000000000..21a1d85fe6 --- /dev/null +++ b/pages/common/jj-config-edit.md @@ -0,0 +1,17 @@ +# jj config edit + +> Start an editor on a config file. +> See also: `jj config path`. +> More information: . + +- Start an editor on the user-level config file: + +`jj config {{[e|edit]}} --user` + +- Start an editor on the repo-level config file: + +`jj config {{[e|edit]}} --repo` + +- Start an editor on the workspace-level config file: + +`jj config {{[e|edit]}} --workspace` diff --git a/pages/common/jj-config-get.md b/pages/common/jj-config-get.md new file mode 100644 index 0000000000..e5a8833f7a --- /dev/null +++ b/pages/common/jj-config-get.md @@ -0,0 +1,22 @@ +# jj config get + +> Get the value of a given config option. +> Unlike `jj config list`, the result is printed without extra formatting for use in scripts. +> See also: `jj config list`. +> More information: . + +- Get the value of a config option: + +`jj config {{[g|get]}} {{name}}` + +- Get the configured user name: + +`jj config {{[g|get]}} user.name` + +- Get the configured user email: + +`jj config {{[g|get]}} user.email` + +- Get the default revset for the log command: + +`jj config {{[g|get]}} revsets.log` diff --git a/pages/common/jj-config-list.md b/pages/common/jj-config-list.md new file mode 100644 index 0000000000..238861c0bf --- /dev/null +++ b/pages/common/jj-config-list.md @@ -0,0 +1,33 @@ +# jj config list + +> List variables set in config files, along with their values. +> See also: `jj config get`. +> More information: . + +- List all config variables and their values: + +`jj config {{[l|list]}}` + +- List a specific config option: + +`jj config {{[l|list]}} {{name}}` + +- List user-level config variables: + +`jj config {{[l|list]}} --user` + +- List repo-level config variables: + +`jj config {{[l|list]}} --repo` + +- List config variables including built-in default values: + +`jj config {{[l|list]}} --include-defaults` + +- List config variables including overridden values: + +`jj config {{[l|list]}} --include-overridden` + +- List config variables with a custom template: + +`jj config {{[l|list]}} {{[-T|--template]}} {{template}}` diff --git a/pages/common/jj-config-path.md b/pages/common/jj-config-path.md new file mode 100644 index 0000000000..b75dc44dd5 --- /dev/null +++ b/pages/common/jj-config-path.md @@ -0,0 +1,17 @@ +# jj config path + +> Print the paths to the config files. +> See also: `jj config edit`. +> More information: . + +- Print the path to the user-level config file: + +`jj config {{[p|path]}} --user` + +- Print the path to the repo-level config file: + +`jj config {{[p|path]}} --repo` + +- Print the path to the workspace-level config file: + +`jj config {{[p|path]}} --workspace` diff --git a/pages/common/jj-config-set.md b/pages/common/jj-config-set.md new file mode 100644 index 0000000000..823a32dd49 --- /dev/null +++ b/pages/common/jj-config-set.md @@ -0,0 +1,26 @@ +# jj config set + +> Set a config option to a given value. +> The value is specified as a TOML expression. +> See also: `jj config unset`. +> More information: . + +- Set the user name in the user-level config: + +`jj config {{[s|set]}} --user user.name "{{name}}"` + +- Set the user email in the user-level config: + +`jj config {{[s|set]}} --user user.email "{{email}}"` + +- Set a config option in the repo-level config: + +`jj config {{[s|set]}} --repo {{name}} {{value}}` + +- Set a config option in the workspace-level config: + +`jj config {{[s|set]}} --workspace {{name}} {{value}}` + +- Set a boolean config option: + +`jj config {{[s|set]}} --user {{name}} {{true|false}}` diff --git a/pages/common/jj-config-unset.md b/pages/common/jj-config-unset.md new file mode 100644 index 0000000000..364f36e29d --- /dev/null +++ b/pages/common/jj-config-unset.md @@ -0,0 +1,17 @@ +# jj config unset + +> Unset a config option. +> See also: `jj config set`. +> More information: . + +- Unset a config option in the user-level config: + +`jj config {{[u|unset]}} --user {{name}}` + +- Unset a config option in the repo-level config: + +`jj config {{[u|unset]}} --repo {{name}}` + +- Unset a config option in the workspace-level config: + +`jj config {{[u|unset]}} --workspace {{name}}` diff --git a/pages/common/jj-config.md b/pages/common/jj-config.md new file mode 100644 index 0000000000..08aa6e22e1 --- /dev/null +++ b/pages/common/jj-config.md @@ -0,0 +1,29 @@ +# jj config + +> Manage config options. +> Some subcommands such as `edit`, `get`, `list`, `path`, `set`, `unset` have their own usage documentation. +> More information: . + +- Start an editor on the user-level config file: + +`jj config {{[e|edit]}} --user` + +- Get the value of a config option: + +`jj config {{[g|get]}} {{name}}` + +- List all config variables and their values: + +`jj config {{[l|list]}}` + +- Print the path to the user-level config file: + +`jj config {{[p|path]}} --user` + +- Set a config option in the user-level config: + +`jj config {{[s|set]}} --user {{name}} {{value}}` + +- Unset a config option in the user-level config: + +`jj config {{[u|unset]}} --user {{name}}`