A PowerShell prompt modification that shows the basic status of Vagrant machines in the current directory.
- Clone this repo
- In PowerShell make sure that your ExecutionPolicy is Unrestricted
- Get-ExecutionPolicy will show you current ExecutionPolicy.
- Set-ExecutionPolicy Unrestricted will set your ExecutionPolicy to Unrestricted.
- Run install.ps1 to install to your profile
The prompt is defined in the profile.base.ps1 which will output a working directory as well as a simple/detailed vagrant status indicator depending on your choice. profile.base.ps1 has two options which can be commented in or out. Don't leave both out or in.
A basic example layout of this status is [D:0 R:1].
The D(own) or 'poweroff/aborted in vagrant status' collects the number of machines for the current directory (vagrant environment) that are in that state. This will be colored in gray
The R(unning) or 'running in vagrant status' collects the number of machines for the current directory (vagrant environment) that are in that state. This will be colored in green
If there is a vagrantfile but no (D)own or (R)unning aka 'not created in vagrant status' machines you will see [-] in grey. This is to convey that there is a dormant vagrant environment in the current directory.
If there is an active Vagrant machine(s) you will see [^] the ^ is colorized in green. If there is a vagrantfile and/or folder but no Vagrant machine(s) active you will see [-].
vagrant-status can be installed with posh-git from the following repo posh-git-vagrant-status
This project is based on the great PowerShell prompt plug-in posh-git
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request