1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-27 03:42:39 +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

@ -711,11 +711,11 @@ The `docker_context` module shows the currently active
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | | ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$context]($style) "` | The format for the module. | | `format` | `"via [$symbol$context]($style) "` | The format for the module. |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `style` | `"blue bold"` | The style for the module. | | `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. | | `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. | | `disabled` | `true` | Disables the `docker_context` module. |
### Variables ### Variables

View File

@ -20,7 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
if config.only_with_files if config.only_with_files
&& !context && !context
.try_begin_scan()? .try_begin_scan()?
.set_files(&["docker-compose.yml", "Dockerfile"]) .set_files(&["docker-compose.yml", "docker-compose.yaml", "Dockerfile"])
.is_match() .is_match()
{ {
return None; return None;