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. --- sh/shrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sh/shrc') diff --git a/sh/shrc b/sh/shrc index e46ec2d8..3e657d4c 100644 --- a/sh/shrc +++ b/sh/shrc @@ -1,3 +1,9 @@ +# Make sure the shell is interactive +case $- in + *i*) ;; + *) return ;; +esac + # Load all the POSIX-compatible functions from ~/.shrc.d; more advanced shells # like bash will have their own functions for shrc in "$HOME"/.shrc.d/*.sh ; do -- cgit v1.2.3