feat: Implement terraform module with workspace and version (#644)

This commit is contained in:
wdullaer
2019-12-09 08:42:51 +07:00
committed by Matan Kushner
parent f458a5e8c9
commit 44b37a7bac
11 changed files with 377 additions and 0 deletions
+28
View File
@@ -103,6 +103,7 @@ prompt_order = [
"python",
"ruby",
"rust",
"terraform",
"nix_shell",
"conda",
"memory_usage",
@@ -989,6 +990,33 @@ The module will be shown if any of the following conditions are met:
symbol = "⚙️ "
```
## Terraform
The `terraform` module shows the currently selected terraform workspace and version.
By default the terraform version is not shown, since this is slow on current versions of terraform when a lot of plugins are in use.
The module will be shown if any of the following conditions are met:
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` extension
### Options
| Variable | Default | Description |
| -------------- | ------------- | ----------------------------------------------------------- |
| `symbol` | `"💠 "` | The symbol used before displaying the terraform workspace. |
| `style` | `"bold 105"` | The style for the module. |
| `disabled` | `false` | Disables the `terraform` module. |
| `show_version` | `false` | Shows the terraform version. Very slow on large workspaces. |
### Example
```toml
# ~/.config/starship.toml
[terraform]
symbol = "🏎💨 "
```
## Time
The `time` module shows the current **local** time.