No description
Find a file
Emmanuel Garette e45d779b59 [tutorial 004] Limits the possible values for the variable
"Foo" should not be an option to the "proxy_mode" variable.

Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.

We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.
2025-11-07 06:37:09 +01:00
firefox [tutorial 004] Limits the possible values for the variable 2025-11-07 06:37:09 +01:00
firefox.png [tutorial v1.1_001)] A first variable with only a name (config and doc) 2025-11-07 06:37:07 +01:00
foxyproxy.png [init] Discover Rougail 2025-11-07 06:37:05 +01:00
README.md [tutorial v1.1_004)] Limits the possible values for the variable (config and doc) 2025-11-07 06:37:09 +01:00

[tutorial v1.1_004)] Limits the possible values for the variable

View the diff

Screenshot

Firefox Proxy setting

Structure

firefox/00-proxy.yml

%YAML 1.2
---
version: 1.1

proxy_mode:
  description: Configure Proxy Access to the Internet
  choices:
    - No proxy
    - Auto-detect proxy settings for this network
    - Use system proxy settings
    - Manual proxy configuration
    - Automatic proxy configuration URL
  default: No proxy
...

Let's generate the documentation

foo@bar:~$ git switch --detach v1.1_004
foo@bar:~$ rougail -m firefox/ -o doc
Variable                                                                                        Description                                                                                    
proxy_mode
choice mandatory
Configure Proxy Access to the Internet.
Choices:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL

Let's generate the changelog

foo@bar:~$ git switch --detach v1.1_004
foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog

Modified variable

Variable                                                                                                                Description                                                                                                            
proxy_mode
string choice mandatory
Configure Proxy Access to the Internet.
Choices:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL