From f678b7544409524393252150909619e59eaa5bd6 Mon Sep 17 00:00:00 2001 From: Louis Westerheide Date: Fri, 17 Apr 2026 14:54:55 +0200 Subject: [PATCH 1/7] add configuration resolution order section --- .../configuration/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index 8dce0e91..702bfa6d 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -38,3 +38,18 @@ In order to work with cmemc, you have to configure it according to your needs. In addition to that, cmemc can work with [custom certificates](certificate-handling-and-ssl-verification/index.md). + +## Configuration value resolution order + +When the same key is defined in multiple places, cmemc resolves values in the following order: + +1. **Named connection section** — When you run cmemc with a specific connection (e.g. `-c my-connection`), +all keys from the corresponding `[my-connection]` section are used. This takes full precedence, +including over OS environment variables, so you can define self-contained, reproducible +connection profiles that are not affected by your shell environment. + +2. **OS environment variables** — If a key is set as an environment variable and no named connection +section is active, the environment variable value is used. + +3. **`[DEFAULT]` section** — The `[DEFAULT]` section in `~/.config/cmemc/cmemc.ini` acts as a fallback +for all connections. Its values are ignored if the same key is already set as an environment variable. From dddb5ea3843dc9dbb49b71283d3000202107e773 Mon Sep 17 00:00:00 2001 From: Louis Westerheide Date: Mon, 20 Apr 2026 14:48:41 +0200 Subject: [PATCH 2/7] add fallback section to documentation --- .../cmemc-command-line-interface/configuration/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index 702bfa6d..2ec2a1de 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -53,3 +53,5 @@ section is active, the environment variable value is used. 3. **`[DEFAULT]` section** — The `[DEFAULT]` section in `~/.config/cmemc/cmemc.ini` acts as a fallback for all connections. Its values are ignored if the same key is already set as an environment variable. +Keys present in the `[DEFAULT]` section but absent from the named connection section still +apply as a fallback. From 264b76e992959bbf5a5ec3c5d3f0ccb887ac8c84 Mon Sep 17 00:00:00 2001 From: Louis Westerheide Date: Mon, 20 Apr 2026 14:56:40 +0200 Subject: [PATCH 3/7] fix linter issue --- .../cmemc-command-line-interface/configuration/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index 2ec2a1de..daa57adb 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -53,5 +53,4 @@ section is active, the environment variable value is used. 3. **`[DEFAULT]` section** — The `[DEFAULT]` section in `~/.config/cmemc/cmemc.ini` acts as a fallback for all connections. Its values are ignored if the same key is already set as an environment variable. -Keys present in the `[DEFAULT]` section but absent from the named connection section still -apply as a fallback. +Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. From ff5c41a5cb0868fbfab85dde6455dcb73745ae07 Mon Sep 17 00:00:00 2001 From: Sebastian Tramp Date: Mon, 20 Apr 2026 15:01:17 +0200 Subject: [PATCH 4/7] add link --- .../cmemc-command-line-interface/configuration/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index daa57adb..a4f5cdae 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -48,9 +48,9 @@ all keys from the corresponding `[my-connection]` section are used. This takes f including over OS environment variables, so you can define self-contained, reproducible connection profiles that are not affected by your shell environment. -2. **OS environment variables** — If a key is set as an environment variable and no named connection +2. **Environment variables** — If a key is set as an environment variable and no named connection section is active, the environment variable value is used. -3. **`[DEFAULT]` section** — The `[DEFAULT]` section in `~/.config/cmemc/cmemc.ini` acts as a fallback +3. **`[DEFAULT]` section** — The `[DEFAULT]` section in [`cmemc.ini`](file-based-configuration/index.md) acts as a fallback for all connections. Its values are ignored if the same key is already set as an environment variable. Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. From 9262dcc7799851ad73347c4043afbdb16fdc4939 Mon Sep 17 00:00:00 2001 From: Sebastian Tramp Date: Mon, 20 Apr 2026 15:13:04 +0200 Subject: [PATCH 5/7] use info section --- .../configuration/index.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index a4f5cdae..b970051f 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -39,18 +39,16 @@ In order to work with cmemc, you have to configure it according to your needs. -## Configuration value resolution order +!!! info "Configuration value resolution order" -When the same key is defined in multiple places, cmemc resolves values in the following order: + When the same key is defined in multiple places, cmemc resolves values in the following order: -1. **Named connection section** — When you run cmemc with a specific connection (e.g. `-c my-connection`), -all keys from the corresponding `[my-connection]` section are used. This takes full precedence, -including over OS environment variables, so you can define self-contained, reproducible -connection profiles that are not affected by your shell environment. + 1. **Named connection section** — When you run cmemc with a specific connection (e.g. `-c my-connection`), all keys from the corresponding `[my-connection]` section are used. + This takes full precedence, including over OS environment variables, so you can define self-contained, reproducible connection profiles that are not affected by your shell environment. -2. **Environment variables** — If a key is set as an environment variable and no named connection -section is active, the environment variable value is used. + 2. **Environment variables** — If a key is set as an [environment variable](environment-based-configuration/index.md) and no named connection section is active, the environment variable value is used. + + 3. **`[DEFAULT]` section** — The `[DEFAULT]` section in [`cmemc.ini`](file-based-configuration/index.md) acts as a fallback for all connections. + Its values are ignored if the same key is already set as an environment variable. + Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. -3. **`[DEFAULT]` section** — The `[DEFAULT]` section in [`cmemc.ini`](file-based-configuration/index.md) acts as a fallback -for all connections. Its values are ignored if the same key is already set as an environment variable. -Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. From 0b943dcf65047d9e3c29df0fc7dbe611a0e7a8b8 Mon Sep 17 00:00:00 2001 From: Louis Westerheide Date: Wed, 22 Apr 2026 14:04:26 +0200 Subject: [PATCH 6/7] update documentation about command specific env variables --- .../cmemc-command-line-interface/configuration/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index b970051f..c93738ed 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -45,6 +45,7 @@ In order to work with cmemc, you have to configure it according to your needs. 1. **Named connection section** — When you run cmemc with a specific connection (e.g. `-c my-connection`), all keys from the corresponding `[my-connection]` section are used. This takes full precedence, including over OS environment variables, so you can define self-contained, reproducible connection profiles that are not affected by your shell environment. + Keys not defined in [my-connection] fall back to `[DEFAULT]`. 2. **Environment variables** — If a key is set as an [environment variable](environment-based-configuration/index.md) and no named connection section is active, the environment variable value is used. @@ -52,3 +53,5 @@ In order to work with cmemc, you have to configure it according to your needs. Its values are ignored if the same key is already set as an environment variable. Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. + 4. **Command specific environment variables** — Command-specific variables (e.g. CMEMC_GRAPH_LIST_ID_ONLY) are never overridden or cleared when switching connections. + They apply regardless of whether -c is active, from either the config file or the environment. From 53b8086750ba993838a7bbcd1d776b0c5808e04b Mon Sep 17 00:00:00 2001 From: Louis Westerheide Date: Wed, 22 Apr 2026 14:15:26 +0200 Subject: [PATCH 7/7] niceup formatting of documentation --- .../cmemc-command-line-interface/configuration/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/automate/cmemc-command-line-interface/configuration/index.md b/docs/automate/cmemc-command-line-interface/configuration/index.md index c93738ed..072ba950 100644 --- a/docs/automate/cmemc-command-line-interface/configuration/index.md +++ b/docs/automate/cmemc-command-line-interface/configuration/index.md @@ -45,7 +45,6 @@ In order to work with cmemc, you have to configure it according to your needs. 1. **Named connection section** — When you run cmemc with a specific connection (e.g. `-c my-connection`), all keys from the corresponding `[my-connection]` section are used. This takes full precedence, including over OS environment variables, so you can define self-contained, reproducible connection profiles that are not affected by your shell environment. - Keys not defined in [my-connection] fall back to `[DEFAULT]`. 2. **Environment variables** — If a key is set as an [environment variable](environment-based-configuration/index.md) and no named connection section is active, the environment variable value is used. @@ -53,5 +52,5 @@ In order to work with cmemc, you have to configure it according to your needs. Its values are ignored if the same key is already set as an environment variable. Keys present in the `[DEFAULT]` section but absent from the named connection section still apply as a fallback. - 4. **Command specific environment variables** — Command-specific variables (e.g. CMEMC_GRAPH_LIST_ID_ONLY) are never overridden or cleared when switching connections. + 4. **Command specific environment variables** — Command-specific variables (e.g. `CMEMC_GRAPH_LIST_ID_ONLY`) are never overridden or cleared when switching connections. They apply regardless of whether -c is active, from either the config file or the environment.