<commit_before># Vagrant PS1

Provides visual feedback if a Vagrant virtual machine has been launched from
the current working directory.

When properly configured you should see a green ‣ in your PS1:

![](http://img16.imageshack.us/img16/6660/vagrantps1.png)

## Requirements

* `php` binary must be available in your $PATH to execute script that
  compares current dir VM to running VMs

## Installation

1. Clone directory to your `~/.vagrant.d` directory:
```
git clone <EMAIL>/johnkary/vagrant_ps1.git ~/.vagrant.d/
```

2. Source the `dir.sh` file in this repository into your `~/.bash_profile`:
```bash
source ~/.vagrant.d/vagrant_ps1/dir.sh
```

3. From your `~/.bash_profile`, add the bash function `\$(__vagrant_dir)` to
  your PS1 where you'd like the indicator to appear. This example would prepend
  it to your current PS1:
```bash
export PS1="\$(__vagrant_dir)$PS1"
```

4. Open a new bash session or source your `~/.bash_profile`:
```
$ source ~/.bash_profile
```

## TODO

* Port current PHP script to Ruby so an additional binary is not needed.
  Vagrant already needs `ruby` to run, so the script that checks for it
  should also be written in that language.<commit_msg>Add step to ensure working properly<commit_after># Vagrant PS1

Provides visual feedback if a Vagrant virtual machine has been launched from
the current working directory.

When properly configured you should see a green ‣ in your PS1:

![](http://img16.imageshack.us/img16/6660/vagrantps1.png)

## Requirements

* `php` binary must be available in your $PATH to execute script that
  compares current dir VM to running VMs

## Installation

1. Clone directory to your `~/.vagrant.d` directory:
```
git clone <EMAIL>/johnkary/vagrant_ps1.git ~/.vagrant.d/
```

2. Source the `dir.sh` file in this repository into your `~/.bash_profile`:
```bash
source ~/.vagrant.d/vagrant_ps1/dir.sh
```

3. From your `~/.bash_profile`, add the bash function `\$(__vagrant_dir)` to
  your PS1 where you'd like the indicator to appear. This example would prepend
  it to your current PS1:
```bash
export PS1="\$(__vagrant_dir)$PS1"
```

4. Open a new bash session or source your `~/.bash_profile`:
```
$ source ~/.bash_profile
```

5. Change into a directory where you have a `Vagrantfile` and launch the
   VM. You should then see a green ‣ in your PS1.
```
$ cd myproject
$ vagrant up
‣$
```

## TODO

* Port current PHP script to Ruby so an additional binary is not needed.
  Vagrant already needs `ruby` to run, so the script that checks for it
  should also be written in that language.
{'fraction_non_alphanumeric': 0.10846664065548185, 'fraction_numerical': 0.017167381974248927, 'mean_word_length': 4.047244094488189, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2418909', 'n_tokens_mistral': 890, 'n_tokens_neox': 822, 'n_words': 343}