summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMauricio Teixeira <mauricio.teixeira@gmail.com>2020-10-24 05:46:43 -0400
committerGitHub <noreply@github.com>2020-10-24 11:46:43 +0200
commiteec961caaf41407545e81b5fb89745db0f0fa751 (patch)
tree25bb60de1f899aff084ac62a450239efc336623f /docs
parent745a554fdc5aeb4e238d6e7fb71154f8c48abda3 (diff)
feat(openstack): Add module for OpenStack (#1664)
* first (crude) attempt to implement the openstack module * Attempt to follow OpenStack standards for clouds.yaml location * fmt * provide unittest * add documentation * fix fmt * fix clippy * fix clippy * fix fmt * fix small nitpicks * expand openstack explanation * load config file using find_map * fix fmt * add test for valid config, plus fix test for invalid config * fix fmt * re-add forgotten comment
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 53d3f8a59..ef6a871af 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -223,6 +223,7 @@ $conda\
$memory_usage\
$aws\
$gcloud\
+$openstack\
$env_var\
$crystal\
$cmd_duration\
@@ -1786,6 +1787,44 @@ The module will be shown if any of the following conditions are met:
format = "via [🐪 $version]($style) "
```
+## OpenStack
+
+The `openstack` module shows the current OpenStack cloud and project. The module
+only active when the `OS_CLOUD` env var is set, in which case it will read
+`clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files).
+to fetch the current project in use.
+
+### Options
+
+| Option | Default | Description |
+| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
+| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
+| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
+| `style` | `"bold yellow"` | The style for the module. |
+| `disabled` | `false` | Disables the `OpenStack` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| -------- | ---------- | ------------------------------------ |
+| cloud | `corp` | The current OpenStack cloud |
+| project | `dev` | The current OpenStack project |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[openstack]
+format = "on [$symbol$cloud(\\($project\\))]($style) "
+style = "bold yellow"
+symbol = "☁️ "
+```
+
## Perl
The `perl` module shows the currently installed version of Perl.