diff --git a/README.adoc b/README.adoc index 58891a6..4d17b83 100644 --- a/README.adoc +++ b/README.adoc @@ -51,6 +51,14 @@ Alternative way to include .sshrc by detecting SSH connection. [source,bash] ---- # User specific aliases and functions + +# test if the prompt var is not set +# See https://unix.stackexchange.com/questions/154395/running-scp-when-bashrc-of-remote-machine-includes-source-command +if [ -z "$PS1" ]; then + # prompt var is not set, so this is *not* an interactive shell + return +fi + if [ -f ~/.sshrc ] && [ -z "$SSH_CLIENT" ]; then echo "Not a ssh connection" else