diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-05-25 14:08:41 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-05-25 14:08:41 +1200 |
commit | 91a05aae84d1a087d7ec6c0003488fe5abac6e61 (patch) | |
tree | 8d757c604a9d9ecd23295c3edc3b9bc9e271a80e | |
parent | Slightly clearer comment (diff) | |
download | dotfiles-91a05aae84d1a087d7ec6c0003488fe5abac6e61.tar.gz dotfiles-91a05aae84d1a087d7ec6c0003488fe5abac6e61.zip |
Nix .bashrc if running in restricted shell
-rw-r--r-- | bash/bashrc | 5 |
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)) |