1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-26 11:37:32 +00:00

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
This commit is contained in:
Ben Iofel 2021-01-11 11:38:58 -05:00 committed by GitHub
parent 42c4590da9
commit 0a9db856de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -20,7 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
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;