From 0a9db856de13ab51000cff1c312a41c3d51a6de1 Mon Sep 17 00:00:00 2001 From: Ben Iofel Date: Mon, 11 Jan 2021 11:38:58 -0500 Subject: [PATCH] fix(docker_context): enable if either yml or yaml is found (#2053) * fix(docker_context): enable if either yml or yaml is found * Update docs --- docs/config/README.md | 14 +++++++------- src/modules/docker_context.rs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index 47507ea8..8d3bd167 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -710,13 +710,13 @@ 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` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | 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. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | ### Variables diff --git a/src/modules/docker_context.rs b/src/modules/docker_context.rs index ae56f19f..e88c657d 100644 --- a/src/modules/docker_context.rs +++ b/src/modules/docker_context.rs @@ -20,7 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { if config.only_with_files && !context .try_begin_scan()? - .set_files(&["docker-compose.yml", "Dockerfile"]) + .set_files(&["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]) .is_match() { return None;