In zsh
theme file:
# Dm: docker machine
prompt_dm() {
local dm="$DOCKER_MACHINE_NAME"
if [[ -n $dm ]]; then
prompt_segment 020 159 $dm
fi
}
## Main prompt
build_prompt() {
# ...
prompt_dir
prompt_dm
prompt_git
# ...
}
In zsh
theme file:
# Dm: docker machine
prompt_dm() {
local dm="$DOCKER_MACHINE_NAME"
if [[ -n $dm ]]; then
prompt_segment 020 159 $dm
fi
}
## Main prompt
build_prompt() {
# ...
prompt_dir
prompt_dm
prompt_git
# ...
}