preliminary + choice

This commit is contained in:
gwen 2025-11-27 18:26:09 +01:00
parent b5c919dc8d
commit 9ca4f31986
4 changed files with 22 additions and 10 deletions

View file

@ -47,7 +47,7 @@ with the `choice` variable's parameter:
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_010/firefox/00-proxy.yml>`
Let's run the Rougail CLI with this new structure file:
Let's run the Rougail CLI with these available values:
.. code-block:: text
:class: terminal
@ -71,11 +71,6 @@ We have an output like this one:
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
</pre>
The `proxy_mode` variable requires a value, that's why we have set a `No proxy` default value.
.. note:: As we have set the `proxy_mode`'s value as `No proxy` by default, we have set a value
which appears in yellow in the rougail CLI output, which means : "value set by default".
`No proxy` is an available variable's value. We say that the `proxy_mode` variable is *constrained*
by the possibilities of the `choice` parameter.

View file

@ -43,12 +43,13 @@ We'll learn in this tutorial how to set the values of the configuration options
.. prerequisites:: Important advice
It is advisable to follow this tutorial with the help of the corresponding :tutorial:`Rougail git repository tutorial <>`.
It is advisable to follow this tutorial with the help of the corresponding :tutorial:`Rougail git repository tutorial <src/branch/1.1>`.
If you use this rougail tutorial repository, you will have all the necessary files distributed in the correct tree structure.
::
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1
Of course, you can also decide to start from scratch and copy/paste the tutorial files content.
@ -59,7 +60,7 @@ We'll learn in this tutorial how to set the values of the configuration options
preliminary
choice
proxymode
family
disabled
boolean
dynfam

View file

@ -188,6 +188,23 @@ Let's add a default value to this `proxy_mode` variable.
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_003/firefox/00-proxy.yml>`
The `proxy_mode` variable requires a value, that's why we have set a `No proxy` default value.
.. raw:: html
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_003/config/01/output_ro.html
:class: output
..
<pre>╭─────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span> │
╰────────────────────────╯
Variables:
<span style="color: #5c5cff">┗━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
</pre>
As we have set the `proxy_mode`'s value as `No proxy` by default,
The chosen value is indicated in the rougail's CLI output as the default choice.
.. glossary::
short-hand notation
@ -225,7 +242,6 @@ Let's add a default value to this `proxy_mode` variable.
There are some other short-hand ways with rougail that you may encounter
as you read the rougail's documentation and tutorial.
.. admonition:: how to set a value -- the assignment
A default value has been set, great. This raises a question about what a normal value is.