aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-01 01:34:03 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-01 01:34:03 +1300
commit31bd3ac2e6eec954eb8b2d429a4bd58a089964e7 (patch)
treeccb738577cd23625a631b3f4b3d495767a6d31ad
parente95d9579b8354640e52de0ff8056e7bb0bd38ba4 (diff)
downloaddotfiles-31bd3ac2e6eec954eb8b2d429a4bd58a089964e7.tar.gz
dotfiles-31bd3ac2e6eec954eb8b2d429a4bd58a089964e7.zip
Use more idiomatic short-circuit for -r in bashrc
-rw-r--r--bash/bashrc4
1 files changed, 1 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc
index dcf3df53..3b4c91bd 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -6,9 +6,7 @@ esac
# Don't do anything if restricted, not even sourcing the ENV file
# Testing $- for "r" doesn't work
-if shopt -q restricted_shell >/dev/null 2>&1 ; then
- return
-fi
+! shopt -q restricted_shell >/dev/null 2>&1 || return
# Clear away all aliases; we do this here rather than in the $ENV file shared
# between POSIX shells, because ksh relies on aliases to implement certain