change test if shell is interactive
This commit is contained in:
parent
d353f294f2
commit
ea29f12c98
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue