mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-27 19:54:55 +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
@ -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
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user