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:
parent
42c4590da9
commit
0a9db856de
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user