<commit_before>#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "$CURRENT_DIR/helpers.sh"

vm_option_string="@vm_icon"

vm_icon_osx="⧉ "
vm_icon="VM: "

vm_icon_default() {
	if is_osx; then
		echo "$vm_icon_osx"
	else
		echo "$vm_icon"
	fi
}

vm_count() {
  VM="0"
	if is_osx; then
    if [[ -d '/Applications/VMware Fusion.app' ]]; then
      VM=$(($VM+`"/Applications/VMware Fusion.app/Contents/Library/vmrun" -T fusion list | awk 'NR==1{print $4}'`))
    fi
  fi

	if is_linux; then
    if command_exists "vmrun"; then
      VM=$(($VM+`vmrun -T ws list | awk 'NR==1{print $4}'`))
    fi
  fi

	if command_exists "VBoxManage"; then
    VM=$(($VM+`VBoxManage list runningvms | wc -l`))
	fi
<commit_msg>Add check for VirtualBox driver. After every VB update vboxdrv must be re-builded. Why VB do no do this automatically?<commit_after>#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "$CURRENT_DIR/helpers.sh"

vm_option_string="@vm_icon"

vm_icon_osx="⧉ "
vm_icon="VM: "

vm_icon_default() {
	if is_osx; then
		echo "$vm_icon_osx"
	else
		echo "$vm_icon"
	fi
}

vm_count() {
  VM="0"
	if is_osx; then
    if [[ -d '/Applications/VMware Fusion.app' ]]; then
      VM=$(($VM+`"/Applications/VMware Fusion.app/Contents/Library/vmrun" -T fusion list | awk 'NR==1{print $4}'`))
    fi
  fi

	if is_linux; then
    if command_exists "vmrun"; then
      VM=$(($VM+`vmrun -T ws list | awk 'NR==1{print $4}'`))
    fi
  fi

	if command_exists "VBoxManage"; then
    if [ `VBoxManage list runningvms | grep vboxdrv` ]; then
      VM="VirtualBox driver not loaded properly"
    else
      VM=$(($VM+`VBoxManage list runningvms | wc -l`))
    fi
	fi

{'fraction_non_alphanumeric': 0.1685002895193978, 'fraction_numerical': 0.006948465547191662, 'mean_word_length': 3.620320855614973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '878755', 'n_tokens_mistral': 722, 'n_tokens_neox': 686, 'n_words': 169}