summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTill Höppner2017-05-25 02:56:49 +0200
committerTill Höppner2017-05-25 02:56:49 +0200
commitdc6d368db29dd5bccfbd35a4175802315d275b50 (patch)
treeccfa7f733f8f3beb4d2e48c776b45a41694e46c0
parentf4c8911ff43b0585b8ab99a98292925723decfbc (diff)
downloadzsh-dc6d368db29dd5bccfbd35a4175802315d275b50.tar.gz
zsh-dc6d368db29dd5bccfbd35a4175802315d275b50.tar.xz
zsh-dc6d368db29dd5bccfbd35a4175802315d275b50.zip
Detect if inside container
-rw-r--r--conf.d/60-prompt.zsh3
1 files changed, 2 insertions, 1 deletions
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