From 409b104837f96e1979474e081169f7916fa52e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Thu, 4 Dec 2014 23:54:39 +0100 Subject: [PATCH] README: fix missing guard around liquidprompt for bashrc instructions Fixes https://github.com/nojhan/liquidprompt/issues/291 --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbf9ccf..0b19a50 100644 --- a/README.md +++ b/README.md @@ -92,10 +92,13 @@ git clone https://github.com/nojhan/liquidprompt.git source liquidprompt/liquidprompt ``` -To use it every time you start a shell add the following line to your +To use it every time you start a shell add the following lines to your `.bashrc` (if you use bash) or `.zshrc` (if you use zsh): -`source ~/liquidprompt/liquidprompt` +``` +# Load Liquid Prompt only in interactive shells, not from a script or from scp +[[ $- = *i* ]] && source ~/liquidprompt/liquidprompt +``` Next up is the configuration, you can skip this step if you already like the defaults: