mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Check vagrant status of current directory
This commit is contained in:
parent
d51ee38906
commit
29e6d20cf6
1 changed files with 6 additions and 0 deletions
|
|
@ -208,6 +208,12 @@ prompt_status() {
|
|||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
|
||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
|
||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
|
||||
|
||||
if [[ -d ./.vagrant/machines ]]; then
|
||||
if [[ $(VBoxManage list runningvms | grep -c $(/bin/cat .vagrant/machines/*/*/id)) -gt 0 ]]; then
|
||||
symbols+="%{%F{red}%}⚙"
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue