From dc6d368db29dd5bccfbd35a4175802315d275b50 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Thu, 25 May 2017 02:56:49 +0200 Subject: Detect if inside container --- conf.d/60-prompt.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf.d/60-prompt.zsh b/conf.d/60-prompt.zsh index d1d7fae..c21aafc 100644 --- a/conf.d/60-prompt.zsh +++ b/conf.d/60-prompt.zsh @@ -58,7 +58,8 @@ left_prompt() { *) echo -n $USER esac - if test -n "$SSH_TTY"; then + if test -n "$SSH_TTY" \ + || [ -f /.dockerenv ]; then zcol "$fg[cyan]" echo -n "@$(hostname | tr -d '\n') " fi -- cgit v1.2.3