summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBarnaby Keene <hello@southcla.ws>2020-04-05 20:42:55 +0100
committerGitHub <noreply@github.com>2020-04-05 21:42:55 +0200
commitb685bb2954ac08a524e7af4f18bc8bf34bd7b366 (patch)
tree5c4e18e3d19b278dbbcd74766d5b712e45bde9c7 /docs
parent7a39ba6ff11eabc8a57980f07748cc03141c474c (diff)
feat: add docker context module (#996)
* feat: add docker context module Adds a simple module that checks for a Docker config file and if present, reads the `currentContext` value out and displays on the prompt with a whale. * feat: add `only_with_compose_yml` option to docker_context When enabled, will only show the docker context name if there's a docker-compose.yml file in the current directory. * Update src/modules/docker_context.rs Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com> * Update src/modules/docker_context.rs Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com> * rename `only_with_compose_yml` configuration key to a more generic `only_with_files` * Update src/modules/docker_context.rs Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com> * re-order configuration table * Update docs/config/README.md Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com> * Update src/configs/docker_context.rs Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com> Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 3de40b5ee..8c0131fb0 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -100,6 +100,7 @@ prompt_order = [
"git_state",
"git_status",
"hg_branch",
+ "docker_context",
"package",
"dotnet",
"elixir",
@@ -405,6 +406,30 @@ a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/
truncation_length = 8
```
+## Docker Context
+
+The `docker_context` module shows the currently active
+[Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to
+`default`.
+
+### Options
+
+| Variable | Default | Description |
+| ----------------- | ------------- | ---------------------------------------------------------------------------- |
+| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . |
+| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
+| `style` | `"bold blue"` | The style for the module. |
+| `disabled` | `true` | Disables the `docker_context` module. |
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[docker_context]
+symbol = "🐋 "
+```
+
## Dotnet
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If