summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTill Höppner2017-06-05 18:41:33 +0200
committerTill Höppner2017-06-05 18:41:33 +0200
commitb0fe52d90ba0067bfb2f07455c5e0dc828ef8956 (patch)
tree74f66917059b011a303bc939dec1eacbaf197340
parentae50dcd19349bccf3727b76ae6d87c2c61df534f (diff)
downloadzsh-b0fe52d90ba0067bfb2f07455c5e0dc828ef8956.tar.gz
zsh-b0fe52d90ba0067bfb2f07455c5e0dc828ef8956.tar.xz
zsh-b0fe52d90ba0067bfb2f07455c5e0dc828ef8956.zip
Show connected docker machines in prompt
-rw-r--r--conf.d/60-prompt.zsh5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf.d/60-prompt.zsh b/conf.d/60-prompt.zsh
index c21aafc..1ae2531 100644
--- a/conf.d/60-prompt.zsh
+++ b/conf.d/60-prompt.zsh
@@ -64,6 +64,11 @@ left_prompt() {
echo -n "@$(hostname | tr -d '\n') "
fi
+ if test -n "$DOCKER_HOST"; then
+ zcol "$fg[cyan]"
+ echo -n "$(basename "$DOCKER_HOST") "
+ fi
+
zcol "$fg[green]"
{ pwd; echo -n " " } | tr -d '\n' | sed -e "s:^$HOME:~:"