0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-12 04:01:14 +02:00
ohmyzsh/plugins/vagrant-prompt
2024-08-09 09:44:46 +02:00
..
README.md docs: improve several plugin READMEs and add one for ssh plugin 2024-08-09 09:44:46 +02:00
vagrant-prompt.plugin.zsh docs: improve several plugin READMEs and add one for ssh plugin 2024-08-09 09:44:46 +02:00

vagrant-prompt

This plugin prompts the status of the Vagrant VMs. It supports single-host and multi-host configurations as well.

To use it, add vagrant-prompt to the plugins array in your zshrc file:

plugins=(... vagrant-prompt)

Alberto Re alberto.re@gmail.com

Usage

To display Vagrant info on your prompt add the vagrant_prompt_info to the $PROMPT or $RPROMPT variable in your theme. Example:

PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(vagrant_prompt_info)$(svn_prompt_info)$(git_prompt_info)%(!.#.$) '

vagrant_prompt_info makes use of some custom variables. This is an example definition:

ZSH_THEME_VAGRANT_PROMPT_PREFIX="%{$fg_bold[blue]%}["
ZSH_THEME_VAGRANT_PROMPT_SUFFIX="%{$fg_bold[blue]%}]%{$reset_color%} "
ZSH_THEME_VAGRANT_PROMPT_RUNNING="%{$fg_no_bold[green]%}●"
ZSH_THEME_VAGRANT_PROMPT_POWEROFF="%{$fg_no_bold[red]%}●"
ZSH_THEME_VAGRANT_PROMPT_SUSPENDED="%{$fg_no_bold[yellow]%}●"
ZSH_THEME_VAGRANT_PROMPT_NOT_CREATED="%{$fg_no_bold[white]%}○"