From 4d612862149ca2337f0e78a14eb6a2f43de0ab5c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 17 Aug 2016 18:42:56 +1200 Subject: Move interactive tests back into *rc files I don't fully understand why I have to do it this way yet, but if I don't, calling SSH with a command raises "stdin: not a terminal" because ~/.bashrc was called. --- bash/bashrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bash/bashrc') diff --git a/bash/bashrc b/bash/bashrc index 56ab7fda..5b04f979 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -8,6 +8,12 @@ elif ((BASH_VERSINFO[0] == 2)) && return fi +# Make sure the shell is interactive +case $- in + *i*) ;; + *) return ;; +esac + # Don't do anything if running a restricted shell if shopt -q restricted_shell ; then return -- cgit v1.2.3