README.md 652 Bytes
Newer Older
Marc Cornellà's avatar
Marc Cornellà committed
1
# jenv plugin
John Burwell's avatar
John Burwell committed
2

Marc Cornellà's avatar
Marc Cornellà committed
3
[jenv](https://www.jenv.be/) is a Java version manager similiar to [rbenv](https://github.com/rbenv/rbenv)
Marc Cornellà's avatar
Marc Cornellà committed
4
and [pyenv](https://github.com/yyuu/pyenv).
Marc Cornellà's avatar
Marc Cornellà committed
5

Marc Cornellà's avatar
Marc Cornellà committed
6
This plugin initializes jenv and provides the `jenv_prompt_info` function to add Java
Marc Cornellà's avatar
Marc Cornellà committed
7
8
9
10
11
12
13
version information to prompts.

To use, add `jenv` to your plugins array in your zshrc file:

```zsh
plugins=(... jenv)
```
Marc Cornellà's avatar
Marc Cornellà committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27

## Theme example

You can modify your `$PROMPT` or `$RPROMPT` variables to run `jenv_prompt_info`.

For example:
```
PROMPT="%~$ "
RPROMPT='$(jenv_prompt_info)'
```
changes your prompt to:
```
~/java/project$ ▋                                       oracle64-1.6.0.39
```