aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorsabricot <julien.sabre@epitech.eu>2016-03-06 20:25:17 +0300
committersabricot <julien.sabre@epitech.eu>2016-03-06 20:25:17 +0300
commit3c95feb0bdefc22a9a37529dc6f48b31a18d3a20 (patch)
tree7dea5ed4234704e70788316bf99bd6d53cc7de33 /powerlevel9k.zsh-theme
parentd0e9baf45390ed8b4d9ae3ca007da526c4eb4f12 (diff)
Add a docker machine segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme11
1 files changed, 10 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2ef4fe3c..64ad1391 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
}