diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2016-03-22 19:11:45 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2016-03-22 19:11:45 +0300 |
commit | 2d3131fb8ab712d169539f8e139e7899aa6d014a (patch) | |
tree | e36774184f259091d26aa954d37dac933d1549be /powerlevel9k.zsh-theme | |
parent | 81706dfe8d3bacabc99d35d8cb45a039fda0e1f2 (diff) | |
parent | 8feee5d4ccfe1486ad8b15e8e234f68d1ceb6997 (diff) |
Merge pull request #230 from sabricot/docker_machine
Add a new segment for current active docker machine
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index cb1ab338..bba5a6f6 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -463,6 +463,15 @@ prompt_dir() { fi } +# Docker machine +prompt_docker_machine() { + local docker_machine="$DOCKER_MACHINE_NAME" + + if [[ -n "$docker_machine" ]]; then + "$1_prompt_segment" "$0" "$2" "magenta" "$DEFAULT_COLOR" "$docker_machine" 'SERVER_ICON' + fi +} + # GO prompt prompt_go_version() { local go_version @@ -572,7 +581,7 @@ prompt_nodeenv() { local nodeenv_path="$NODE_VIRTUAL_ENV" if [[ -n "$nodeenv_path" && "$NODE_VIRTUAL_ENV_DISABLE_PROMPT" != true ]]; then local info="$(node -v)[$(basename "$nodeenv_path")]" - "$1_prompt_segment" "$0" "$2" "black" "green" "$info" 'NODE_ICON' + "$1_prompt_segment" "$0" "$2" "black" "green" "$info" 'NODE_ICON' fi } |