Sha256: 45f2bd8c50785c8e5fb1357ed60b35cd460f7faec658f13dbeedff643e67b2f3

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

```opts :(document_options)
execute_in_own_window: false
output_execution_report: false
output_execution_summary: false
pause_after_script_execution: true
```
The hidden block "(defaults)" sets the environment variable VAULT to "default" if it is unset.
```bash :(defaults)
: ${VAULT:=default}
```

::: Click below to trigger. If it prints "VAULT: default", the shell block was processed.
The named block prints the environment variable VAULT. It requires hidden block "(defaults)" before printing.
    ```bash :show_vars +(defaults)
    source bin/colorize_env_vars.sh
    colorize_env_vars '' VAULT
    ```

The block sets the environment variable VAULT to "11".
When clicked, it adds the variable to the inherited code. It does not output.
    ```vars :[set_vault_11]
    VAULT: 11
    ```

# DOES NOT WORK 2024-07-20
## This does not evaluate the shell block.
::: Click below to trigger. If it prints "VAULT: 22", the shell block was processed.
The block sets the environment variable VAULT to "22". It requires block "show_vars". Notice block "show_vars" is called after the variable is set.
    ```vars :[set_with_show] +show_vars
    VAULT: 22
    ```

## This outputs the value before the variable is set.
The named block prints the environment variable VAULT. It requires block "set".
    ```bash :show_with_set +[set_vault_11]
    source bin/colorize_env_vars.sh
    colorize_env_vars '' VAULT
    ```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
markdown_exec-2.3.0 examples/vars-blocks.md
markdown_exec-2.2.0 examples/vars-blocks.md