diff options
Diffstat (limited to 'plugins/jenv')
-rw-r--r-- | plugins/jenv/README.md | 18 | ||||
-rw-r--r-- | plugins/jenv/jenv.plugin.zsh | 2 |
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/jenv/README.md b/plugins/jenv/README.md index 8899d21ae..c043c626e 100644 --- a/plugins/jenv/README.md +++ b/plugins/jenv/README.md @@ -1,9 +1,9 @@ # jenv plugin [jenv](https://www.jenv.be/) is a Java version manager similiar to [rbenv](https://github.com/rbenv/rbenv) -and [pyenv]|(https://github.com/yyuu/pyenv). +and [pyenv](https://github.com/yyuu/pyenv). -This plugin initializes jenv and adds provides the jenv_prompt_info function to add Java +This plugin initializes jenv and provides the `jenv_prompt_info` function to add Java version information to prompts. To use, add `jenv` to your plugins array in your zshrc file: @@ -11,3 +11,17 @@ To use, add `jenv` to your plugins array in your zshrc file: ```zsh plugins=(... jenv) ``` + +## 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 +``` diff --git a/plugins/jenv/jenv.plugin.zsh b/plugins/jenv/jenv.plugin.zsh index 14c586be9..2eda8037b 100644 --- a/plugins/jenv/jenv.plugin.zsh +++ b/plugins/jenv/jenv.plugin.zsh @@ -1,4 +1,4 @@ -jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv") +jenvdirs=("$HOME/.jenv" "/usr/local" "/usr/local/jenv" "/opt/jenv") FOUND_JENV=0 for jenvdir in $jenvdirs; do |