aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-05-25 14:08:41 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-05-25 14:08:41 +1200
commit91a05aae84d1a087d7ec6c0003488fe5abac6e61 (patch)
tree8d757c604a9d9ecd23295c3edc3b9bc9e271a80e /bash/bashrc
parentSlightly clearer comment (diff)
downloaddotfiles-91a05aae84d1a087d7ec6c0003488fe5abac6e61.tar.gz
dotfiles-91a05aae84d1a087d7ec6c0003488fe5abac6e61.zip
Nix .bashrc if running in restricted shell
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc5
1 files changed, 5 insertions, 0 deletions
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))