diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 01:34:03 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 01:34:03 +1300 |
commit | 31bd3ac2e6eec954eb8b2d429a4bd58a089964e7 (patch) | |
tree | ccb738577cd23625a631b3f4b3d495767a6d31ad /bash | |
parent | Add an issue with text filename completion (diff) | |
download | dotfiles-31bd3ac2e6eec954eb8b2d429a4bd58a089964e7.tar.gz dotfiles-31bd3ac2e6eec954eb8b2d429a4bd58a089964e7.zip |
Use more idiomatic short-circuit for -r in bashrc
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 4 |
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 |