From ea29f12c98abae9ca16a7095a1ff162adf29f031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 15 Jan 2020 18:09:34 +0100 Subject: [PATCH] change test if shell is interactive --- bashrc_add | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bashrc_add b/bashrc_add index ded762a..713cacb 100755 --- a/bashrc_add +++ b/bashrc_add @@ -5,7 +5,10 @@ if [ -z ${SSHS+x} ]; then SSHS=false;fi # check if we are a interactive shell -if [ -n "$PS1" ] ;then +# https://guide.bash.academy/expansions/ +# https://www.tldp.org/LDP/abs/html/refcards.html#AEN22473 +if [[ $- = *i* ]] ; then +#if [ -n "$PS1" ] ;then #echo "interactive shell" >&2