mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +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'
|
function __bobthefish_prompt_vagrant -S -d 'Display Vagrant status'
|
||||||
[ "$theme_display_vagrant" != 'yes' ]; and return
|
[ "$theme_display_vagrant" = 'yes' -a -f Vagrantfile ]; or return
|
||||||
if [ -f Vagrantfile ]
|
|
||||||
if type -q VBoxManage
|
if type -q VBoxManage
|
||||||
__bobthefish_prompt_vagrant_vbox
|
__bobthefish_prompt_vagrant_vbox
|
||||||
else if grep vmware_fusion Vagrantfile >/dev/null ^&1
|
else if grep vmware_fusion Vagrantfile >/dev/null ^&1
|
||||||
__bobthefish_prompt_vagrant_vmware
|
__bobthefish_prompt_vagrant_vmware
|
||||||
end
|
end
|
||||||
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
|
cat .vagrant/machines/**/id
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_prompt_vagrant_vbox -S -d 'Display VirtualBox Vagrant status'
|
function __bobthefish_prompt_vagrant_vbox -S -d 'Display VirtualBox Vagrant status'
|
||||||
set -l 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)
|
set -l vm_status (VBoxManage showvminfo --machinereadable $id ^/dev/null | grep 'VMState=' | tr -d '"' | cut -d '=' -f 2)
|
||||||
switch "$vm_status"
|
switch "$vm_status"
|
||||||
case 'running'
|
case 'running'
|
||||||
|
Loading…
Reference in New Issue
Block a user