A PowerShell module which provides the status of the vagrant machines on the system and the current directory.
This is a fork of https://github.com/muteldar/posh-git-vagrant-status with the Posh-Git parts removed. However I have kept the Posh-Git license as used in the original.
Add Write-VagStatus to your prompt function to get the output:
`[^2 >1]`
This means that on the computer there are 2 Vagrant machines up and 1 of those machines is in the current directory.
^2- this means that there are two machines up globally (ie. anywhere on the device) - this case 2 vagrant machines are up globally;>1- this indicates that there is one machine up locally (ie. in this current folder) - in this case there is 1 machine up locally;
Clone this repository and put into a folder on the PSModulePath.
Install from the PowerShell Gallery:
Install-Module -Name PSVagrant
- Add configuration of what is displayed just like in Posh-Git;
- Reformat code, add help and comments;
- Create Pester tests;
- Add functions to simply manage Vagrant globally (so you can down machines from any directory not just where the Vagrantfile is);
- Add code to Get-LocalStatus to not have it get the global status again (if you're using it in the prompt you already have the global status so no point in getting it again);
- Look at adding other Vagrant machine states (see for examples);
Pull requests are very welcome.
- 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