The plugin displays the name of current docker machine (if not default). The plugin has been tested only with oh-my-zsh and p10k
To use it:
- clone repo to your plugin directory
git clone https://github.com/pomarec/docker-machine-prompt-p10k.git $ZSH/custom/plugins/
- add
docker-machine-prompt-p10kto the plugins array of your zshrc file:
plugins=(... docker-machine-prompt-p10k)
- add
docker-machineto thePOWERLEVEL9K_LEFT_PROMPT_ELEMENTSorPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTSarray of your p10k.zsh file:
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# =========================[ Line #1 ]=========================
os_icon # os identifier
dir # current directory
vcs # git status
docker-machine # current docker machine
# =========================[ Line #2 ]=========================
newline # \n
prompt_char # prompt symbol
)
