From d9a32684054b8c5f7b7cf7bd38294d655ed76744 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 22 Sep 2017 11:33:42 +0200 Subject: [PATCH] Explain relationship between 'c' and 'config.set' better [ci skip] --- doc/help/configuring.asciidoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/help/configuring.asciidoc b/doc/help/configuring.asciidoc index 23368a5ff..38bc8ede7 100644 --- a/doc/help/configuring.asciidoc +++ b/doc/help/configuring.asciidoc @@ -88,7 +88,9 @@ Two global objects are pre-defined when running `config.py`: `c` and `config`. Changing settings ~~~~~~~~~~~~~~~~~ -`c` is a shorthand object to easily set settings like this: +While you can set settings using the `config.set()` method (which is explained +in the next section), it's easier to use the `c` shorthand object to easily set +settings like this: .config.py: [source,python] @@ -136,6 +138,8 @@ If you want to set settings based on their name as a string, use the .config.py: [source,python] ---- +# Equivalent to: +# c.content.javascript.enabled = False config.set('content.javascript.enabled', False) ---- @@ -143,6 +147,8 @@ To read a setting, use the `config.get` method: [source,python] ---- +# Equivalent to: +# color = c.colors.completion.fg color = config.get('colors.completion.fg') ----