mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Fix copywritting in plugin README
This commit is contained in:
parent
b96868bfc4
commit
d7ce9109d2
1 changed files with 11 additions and 6 deletions
|
|
@ -33,21 +33,26 @@ plugins=(... opentofu)
|
||||||
| `ttws`| `tofu workspace`|
|
| `ttws`| `tofu workspace`|
|
||||||
|
|
||||||
|
|
||||||
## Prompt function
|
## Prompt functions
|
||||||
|
|
||||||
You can add the current OpenTofu workspace in your prompt by adding `$(tofu_prompt_info)`,
|
- `tofu_prompt_info`: shows the current workspace when in an OpenTofu project directory.
|
||||||
`$(tofu_version_prompt_info)` to your `PROMPT` or `RPROMPT` variable.
|
|
||||||
|
- `tofu_version_prompt_info`: shows the current version of the `tofu` commmand.
|
||||||
|
|
||||||
|
To use them, add them to a `PROMPT` variable in your theme or `.zshrc` file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
RPROMPT='$(tofu_prompt_info)'
|
PROMPT='$(tofu_prompt_info)'
|
||||||
RPROMPT='$(tofu_version_prompt_info)'
|
RPROMPT='$(tofu_version_prompt_info)'
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also specify the PREFIX and SUFFIX for the workspace with the following variables:
|
You can also specify the PREFIX and SUFFIX strings for both functions, with the following variables:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# for tofu_prompt_info
|
||||||
ZSH_THEME_TOFU_PROMPT_PREFIX="%{$fg[white]%}"
|
ZSH_THEME_TOFU_PROMPT_PREFIX="%{$fg[white]%}"
|
||||||
ZSH_THEME_TOFU_PROMPT_SUFFIX="%{$reset_color%}"
|
ZSH_THEME_TOFU_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
# for tofu_version_prompt_info
|
||||||
ZSH_THEME_TOFU_VERSION_PROMPT_PREFIX="%{$fg[white]%}"
|
ZSH_THEME_TOFU_VERSION_PROMPT_PREFIX="%{$fg[white]%}"
|
||||||
ZSH_THEME_TOFU_VERSION_PROMPT_SUFFIX="%{$reset_color%}"
|
ZSH_THEME_TOFU_VERSION_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
```
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue