From b0fe52d90ba0067bfb2f07455c5e0dc828ef8956 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 5 Jun 2017 18:41:33 +0200 Subject: Show connected docker machines in prompt --- conf.d/60-prompt.zsh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'conf.d') 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:~:" -- cgit v1.2.3