mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Add OpenTofu plugin
This commit is contained in:
parent
c8ba08581d
commit
2fbbb82723
3 changed files with 629 additions and 0 deletions
53
plugins/opentofu/README.md
Normal file
53
plugins/opentofu/README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# OpenTofu plugin
|
||||
|
||||
Plugin for OpenTofu, a fork of Terraform that is open-source, community-driven, and managed by the Linux Foundation.. It adds
|
||||
completion for `opentofu`, as well as aliases and a prompt function.
|
||||
|
||||
To use it, add `opentofu` to the plugins array of your `~/.zshrc` file:
|
||||
|
||||
```shell
|
||||
plugins=(... opentofu)
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- [OpenTofu](https://opentofu.org/)
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
| ----- | --------------- |
|
||||
| `tt` | `tofu` |
|
||||
| `tta` | `tofu apply` |
|
||||
| `ttc` | `tofu console` |
|
||||
| `ttd` | `tofu destroy` |
|
||||
| `ttf` | `tofu fmt` |
|
||||
| `tti` | `tofu init` |
|
||||
| `tto` | `tofu output` |
|
||||
| `ttp` | `tofu plan` |
|
||||
| `ttv` | `tofu validate` |
|
||||
| `tts` | `tofu state` |
|
||||
| `ttsh`| `tofu show` |
|
||||
| `ttr` | `tofu refresh` |
|
||||
| `ttt` | `tofu test` |
|
||||
| `ttws`| `tofu workspace`|
|
||||
|
||||
|
||||
## Prompt function
|
||||
|
||||
You can add the current OpenTofu workspace in your prompt by adding `$(tofu_prompt_info)`,
|
||||
`$(tofu_version_prompt_info)` to your `PROMPT` or `RPROMPT` variable.
|
||||
|
||||
```sh
|
||||
RPROMPT='$(tofu_prompt_info)'
|
||||
RPROMPT='$(tofu_version_prompt_info)'
|
||||
```
|
||||
|
||||
You can also specify the PREFIX and SUFFIX for the workspace with the following variables:
|
||||
|
||||
```sh
|
||||
ZSH_THEME_TOFU_PROMPT_PREFIX="%{$fg[white]%}"
|
||||
ZSH_THEME_TOFU_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_TOFU_VERSION_PROMPT_PREFIX="%{$fg[white]%}"
|
||||
ZSH_THEME_TOFU_VERSION_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue