From 91a05aae84d1a087d7ec6c0003488fe5abac6e61 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 25 May 2015 14:08:41 +1200 Subject: Nix .bashrc if running in restricted shell --- bash/bashrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bash/bashrc') diff --git a/bash/bashrc b/bash/bashrc index 917526ce..7210113a 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -8,6 +8,11 @@ if [[ $- != *i* ]] ; then return fi +# Don't do anything if running a restricted shell +if shopt -q restricted_shell ; then + return +fi + # Keep around a million lines of history in file HISTFILESIZE=$((2 ** 20)) -- cgit v1.2.3