feat(docker_context): Configure when module is shown (#2315)

* feat(docker_context): Configure when module is shown

This makes it possible to configure when the docker_context module is
shown based on the contents of a directory. This should make it possible
to be a lot more granular when configuring the module.

* Update docs/config/README.md

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Thomas O'Donnell
2021-02-16 20:05:43 +01:00
committed by GitHub
parent 856610d53b
commit e8f463bb57
3 changed files with 20 additions and 8 deletions
+10 -7
View File
@@ -726,13 +726,16 @@ The `docker_context` module shows the currently active
### Options
| Option | Default | Description |
| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `style` | `"blue bold"` | The style for the module. |
| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. |
| `disabled` | `false` | Disables the `docker_context` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `only_with_files` | `true` | Only show when there's a match |
| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). |
| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). |
| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `docker_context` module. |
### Variables