mirror of
				https://github.com/oh-my-fish/theme-bobthefish.git
				synced 2025-06-13 13:03:54 +00:00 
			
		
		
		
	Fix some vagrant segment copypasta
This commit is contained in:
		
							parent
							
								
									29d78ebaf3
								
							
						
					
					
						commit
						47eace4182
					
				@ -189,23 +189,21 @@ end
 | 
			
		||||
# ===========================
 | 
			
		||||
 | 
			
		||||
function __bobthefish_prompt_vagrant -S -d 'Display Vagrant status'
 | 
			
		||||
  [ "$theme_display_vagrant" != 'yes' ]; and return
 | 
			
		||||
  if [ -f Vagrantfile ]
 | 
			
		||||
  [ "$theme_display_vagrant" = 'yes' -a -f Vagrantfile ]; or return
 | 
			
		||||
  if type -q VBoxManage
 | 
			
		||||
    __bobthefish_prompt_vagrant_vbox
 | 
			
		||||
  else if grep vmware_fusion Vagrantfile >/dev/null ^&1
 | 
			
		||||
    __bobthefish_prompt_vagrant_vmware
 | 
			
		||||
  end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function __bobthefish_vagrant_vmware_ids -S -d 'List Vagrant machine ids'
 | 
			
		||||
function __bobthefish_vagrant_ids -S -d 'List Vagrant machine ids'
 | 
			
		||||
  cat .vagrant/machines/**/id
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function __bobthefish_prompt_vagrant_vbox -S -d 'Display VirtualBox Vagrant status'
 | 
			
		||||
  set -l vagrant_status
 | 
			
		||||
  for id in __bobthefish_vagrant_ids
 | 
			
		||||
  for id in (__bobthefish_vagrant_ids)
 | 
			
		||||
    set -l vm_status (VBoxManage showvminfo --machinereadable $id ^/dev/null | grep 'VMState=' | tr -d '"' | cut -d '=' -f 2)
 | 
			
		||||
    switch "$vm_status"
 | 
			
		||||
      case 'running'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user